I am wondering if it is possible to bind a descriptor in command buffer 1 (cb1) via
vkCmdBindDescriptorSets and use that binding recorded in cb1 in a draw call (e.g.
vkCmdDrawIndexed) recorded in command buffer 2 (cb2), given that cb1 is submitted to the same queue before cb2. (But no descriptor bindings are performed in cb2, only in cb1.)
I couldn’t find anything in the specification that would explicitly disallow this, except maybe the following:
Once bound, a descriptor set affects rendering of subsequent commands that interact with the given pipeline type in the command buffer until either a different set is bound to the same set number, or the set is disturbed as described in Pipeline Layout Compatibility.
where the specification says “in the command buffer”, which could indicate that the descriptor binding must happen inside the same command buffer as the draw call. But I’d say the wording is not unambiguously disallowing it.
In practice, the “cb1 then cb2” approach works on Nvidia, but does not work on AMD. A validation error is raised claiming that no descriptor set was bound during the draw call in cb2. I guess that this is not a false positive and the approach described above is, indeed, disallowed and only coincidentally works on Nvidia. Could that be the case? What’s the reasoning behind disallowing descriptor set bindings in a
different command buffer than issuing draw calls which use the descriptors?