-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation for relaxed control barrier with storage class semantics #5984
base: main
Are you sure you want to change the base?
Validation for relaxed control barrier with storage class semantics #5984
Conversation
Signed-off-by: Natalia Gavrilenko <[email protected]>
if (opcode == spv::Op::OpControlBarrier && value) { | ||
if (!num_memory_order_set_bits) { | ||
return _.diag(SPV_ERROR_INVALID_DATA, inst) | ||
<< _.VkErrorID(4649) << spvOpcodeString(opcode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This VUID does not exist. There needs to be a Vulkan-Docs PR to add this rule, at which point a VUID will be assigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created this one KhronosGroup/Vulkan-Docs#2495
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might take awhile (like 2 or 3 weeks) to get the VUID in and upstreamed, I am happy to come back here and apply it, but for the short term, just remove VkErrorID()
here, and the 4649
stuff everywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think waiting 2–3 weeks should be fine. The main change in this PR is adding a new validation rule, and without the new VUID, there wouldn’t be much left.
Add a new VUID for a relaxed control barrier with non-zero storage class semantics. PR in SPIRV-Tools: KhronosGroup/SPIRV-Tools#5984 Signed-off-by: Natalia Gavrilenko <[email protected]>
Add a new VUID for a relaxed control barrier with non-zero storage class semantics. PR in SPIRV-Tools: KhronosGroup/SPIRV-Tools#5984 Signed-off-by: Natalia Gavrilenko <[email protected]>
This commit aligns OpControlBarrier semantics validation with the Vulkan memory model. It disallows combining a relaxed memory order with non-zero storage class semantics in the Vulkan target environment. To my knowledge, this combination is not generated by any compiler.