-
Notifications
You must be signed in to change notification settings - Fork 76
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
Aliasing of pointers cast from integers is unclear #140
Comments
There are a few bits of the SPIR-V spec that jump out at me:
Also
And:
All of these do seem to suggest how aliasing works for pointers, but says nothing about the aliasing (or decoration thereof) for pointer casts. Feels like we either need to make a ruling (that they're always aliased) or that we need to allow the decoration on casts. |
I believe this is the same as: #93 Clarifications would be most welcome ! |
The working group is actively discussing this and #93. Guidance will be provided shortly |
The SPIR-V Working believes that existing wording (added in SPIR-V 1.5) covers this case.
Also see this change in SPIR-V 1.5rev5
WIth these 2 existing paragraphs, we think pointers created 'out of thin air' are not 'memory object declarations' and are thus 'aliased' by default. Any thoughts? |
Thanks, makes sense as there's not much useful we can do with an out of thin air pointer that is unrelated to (doesn't alias) anything else, but it's great to have reassurance |
Consider the following GLSL program:
lines 21 and 22 each will be translated into a sequence of
OpConvertUToPtr
andOpStore
without any aliasing-related decorations. Vulkan SPIR-V doesn't seem to say anything about aliasing of pointers obtained by converting from an integer and it's thus unclear why the above program is valid.The text was updated successfully, but these errors were encountered: