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)

cf. https://github.com/KhronosGroup/SPIRV-Registry/issues/97

Signed-off-by: Niklas Haas git@haasn.xyz

Merge request reports

Loading