-
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
Missing ability to qualify struct members as Restrict? #97
Comments
Also worth pointing out that SPIRV-Cross takes the above (invalid) SPIR-V and reflects it back into (valid) GLSL:
|
Sounds like a bug in mesa to me. I don't see how you conclude the spec disallows restrict, it clearly allows it, GLSL buffers get translated to an Also the spec later says:
|
That bit of spect text is in reference to memory object declarations, not to structure members. It's saying that Restrict has no effect because it's the default. That doesn't mean you can put it anywhere you please when the spec for the Restrict qualifier explicitly says otherwise. |
I see, the problem is you can have Restrict on the pointer type for the OpVariable because that's a mem object declaration, but not on the members themselves. So basically #93 again, and a bug in glslang ? |
I was suggested to share the problem with WSL2 running If anyone has idea what problem I face here and how to address that. Appreciate!
|
GLSL spec says:
SPIR-V spec says:
Possibly relevant, from the change-log:
Was the intent to continue disallowing Restrict on members of blocks?
It's worth pointing out that glslang accepts GLSL code with such declarations, and turns them into what is technically invalid SPIR-V:
e.g.
becomes:
Which mesa's SPIRV-to-NIR compiler, in turn, rejects as invalid:
The text was updated successfully, but these errors were encountered: