Skip to content

spirv: Recognize Restrict qualifiers on struct members

Niklas Haas requested to merge haasn/mesa:ssbo_restrict into main

This is allowed by GLSL (including mesa's glsl_to_nir.c), but somehow disallowed in SPIR-V. Despite this, existing SPIR-V compilers such as glslang emit such specifications, which mesa currently ignores. SPIRV-Cross also reflects such SPIR-V back into valid GLSL.

Accepting them goes against the written SPIR-V spec, but I suspect this was an oversight in SPIR-V, rather than an intended omission. (It's worth pointing out that the other four access qualifiers are legal in SPIR-V, just not Restrict)


Signed-off-by: Niklas Haas

Merge request reports