KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.8k stars 467 forks source link

Can partially bound descriptors be destroyed while bound to an in flight command buffer? #1794

Closed TonyBarbour closed 2 years ago

TonyBarbour commented 2 years ago

REF: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/3729

The spec says that PARTIALLY_BOUND descriptors don't need to contain valid descriptors as long as the descriptor is not dynamically used. Does this imply that a descriptor that has been written can be destroyed as long as the descriptor is not dynamically used? VUID-vkDestroyBuffer-buffer-00922 is pretty clear in that a buffer written to a descriptor set that is bound in a command buffer would create a reference to that buffer and that buffer cannot be destroyed while the command buffer is in flight, but bindless / partially bound descriptors are often exceptions to the rules, and a clarification here would be appreciated.

HansKristian-Work commented 2 years ago

It is definitely the intention that PARTIALLY_BOUND descriptors are only referenced if they are dynamically accessed. Destroying a buffer that is part of a PARTIALLY_BOUND binding is fine as long as the buffer is never accessed.

oddhack commented 2 years ago

This should be fixed in the 1.3.210 spec update.