Open scygan opened 8 months ago
So there is a lot to unpack
vkCmdPushConstants
with the non-compatible layout it is legal (but value is TBD)VUID-vkCmdDispatch-None-08600
I think my goal is to first write up a test to mimic this, then make sure it is not falsely reporting 08600
and figure out with the Working Group if there is suppose to be any VU related to 08600
for this case
@spencer-lunarg, yes I would call vkCmdPushConstants, I have removed this from above list of called functions.
However, having different push constant size should not invalidate bound descriptor sets. Only incompatible descriptor set layouts should invalidate descriptor sets.
Pinging @spencer-lunarg.
Is there any more info needed to fix this issue?
info, no... the blocking issue here is just time to spend looking into this and writing tests, sorry it has taken so long to get to this
This happened for me during development of not yet public product, so no steams / platform details are provided.
Describe the Issue
I am getting what seems to me a false positive:
In following scenario:
There are two pipelines used, A and B, used for subsequent compute dispatches. These pipelines use different pipeline layouts. However, both pipeline layouts are 'compatible for set 0', meaning the first descriptor set layout in each pipeline layout is identically defined (though it is not the same object).
Moreover, what seems important to this issue, the push constant range sizes are different in each pipeline layout.
It looks like during the
vkCmdBindDescriptorSet(firstSet=1, pipelineLayout=B)
call, following code resets the binding for set 0, bacauseset_info.compat_id_for_set != pipe_compat_ids[set_idx]
evaluates to true for set_index equal to 0:The problem is both
set_info.compat_id_for_set
andpipe_compat_ids[set_idx]
are hashed using a function, that includes push constant ranges in the hash, so the hashes (and compat_id, implied by hashes) are different if push constant range size differs:As a debugging measure, I have tried using same push constant range size for all pipeline layouts and the problem went away.
Expected behavior
Spec says:
When binding a descriptor set (see Descriptor Set Binding) to set number N, a previously bound descriptor set bound with lower index M than N is disturbed if the pipeline layouts for set M and N are not compatible for set M. Otherwise, the bound descriptor set in M is not disturbed. If, additionally, the previously bound descriptor set for set N was bound using a pipeline layout not compatible for set N, then all bindings in sets numbered greater than N are disturbed. When binding a pipeline, the pipeline can correctly access any previously bound descriptor set N if it was bound with compatible pipeline layout for set N, and it was not disturbed.
Especially: it seems to me the spec does not mention that "compatiblity for set" requires pipeline layouts to be “compatible for push constants” ...
Valid Usage ID
VUID-vkCmdDispatch-None-08600(