-
Notifications
You must be signed in to change notification settings - Fork 533
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
spirv-val: Add OpPtrAccessChain Base checks #4965
Conversation
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.
The ArrayStride check is too restrictive.
e98081f
to
ec81fa0
Compare
f7474f1
to
b9f29c0
Compare
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 don't think the build failures are caused by this change.
source/val/validate_memory.cpp
Outdated
} else if (base_type_storage_class == | ||
SpvStorageClassPhysicalStorageBuffer) { | ||
if (_.addressing_model() != SpvAddressingModelPhysicalStorageBuffer64) { |
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 feels like the wrong spot for this check. This probably belongs in the validation of OpTypePointer.
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.
So the VUID was for a OpPtrAccessChain
who's Base
's is using PhysicalStorageBuffer
so I guess not sure how I would be able to check that in OpTypePointer
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.
Well in the SPIR-V spec for the physical storage buffer rules it says:
If the addressing model is not PhysicalStorageBuffer64, then the PhysicalStorageBuffer storage class must not be used.
That's why I suggested OpTypePointer. It will catch more cases.
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.
Ok I see, I agree, I think the VUID-StandaloneSpirv-Base-04707
probably could just be reworded, going to remove this check from this PR (and make a new PR with it in OpTypePointer
and have more tests aimmed towards that) and going to remove the VUID label as it will probably get a new one after my purposed spec clarification
b9f29c0
to
1b14ebb
Compare
adds
VUID-StandaloneSpirv-Base-04707
and the SPIR-V spec forShader
saying