Vulkan descriptor binding

前端 未结 2 1470
生来不讨喜
生来不讨喜 2021-01-14 03:45

In my vulkan application i used to draw meshes like this when all the meshes used the same texture

Updatedescriptorsets(texture)

Command buffer record
{
 Fo         


        
2条回答
  •  渐次进展
    2021-01-14 04:15

    If you update a descriptor set then all command buffers that this descriptor set is bound to will become invalid. Invalid command buffers cannot be submitted or be executed by the GPU.

    What you basically need to do is to update descriptor sets before you bind them.

    This odd behavior is there because in vkCmdBindDescriptorSets some implementations take the vulkan descriptor set, translate it to native descriptor tables and then store it in the command buffer. So if you update the descriptor set after vkCmdBindDescriptorSets the command buffer will be seeing stale data. VK_EXT_descriptor_indexing extension relaxed this behavior under some circumstances.

提交回复
热议问题