You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Too often do people going between GPU vendors, especially the newer coders, get tripped up by vkAllocateDescriptorSets returning VK_SUCCESS even tho the pool sizes was too small to allocate the set.
I would like to suggest this get a Best Practice check tho none of the current options seem too suited, maybe a new "PC Portability Best Practice"? This check should effectively be a ref counter incrementing on vkAllocateDescriptorSets and decrementing on vkFreeDescriptorSets or vkResetDescriptorPool, and then if vkAllocateDescriptorSets succeeds but the ref counter overflows the sizes on creation does it emit a warning.
The text was updated successfully, but these errors were encountered:
Then every call to vkAllocateDescriptorSets we lookup what are the descriptor counts in the set layout and increment the counters for the respective VkDescriptorType, call the actual vkAllocateDescriptorSets, if it returns VK_SUCCESS we loop over all the counters and check counter > limit if true then emit the warning
EDIT:
I forgot about
If multiple VkDescriptorPoolSize structures containing the same descriptor type appear in the pPoolSizes array then the pool will be created with enough storage for the total number of descriptors of each type.
So the for loop in vkCreateDescriptorPool needs to do an addition rather than an assignment
Too often do people going between GPU vendors, especially the newer coders, get tripped up by vkAllocateDescriptorSets returning VK_SUCCESS even tho the pool sizes was too small to allocate the set.
I would like to suggest this get a Best Practice check tho none of the current options seem too suited, maybe a new "PC Portability Best Practice"? This check should effectively be a ref counter incrementing on vkAllocateDescriptorSets and decrementing on vkFreeDescriptorSets or vkResetDescriptorPool, and then if vkAllocateDescriptorSets succeeds but the ref counter overflows the sizes on creation does it emit a warning.
The text was updated successfully, but these errors were encountered: