diff --git a/reference/shaders/comp/coherent-image.comp b/reference/shaders/comp/coherent-image.comp index 97da6667..b3992f24 100644 --- a/reference/shaders/comp/coherent-image.comp +++ b/reference/shaders/comp/coherent-image.comp @@ -6,7 +6,7 @@ layout(binding = 1, std430) coherent restrict writeonly buffer SSBO ivec4 value; } _10; -layout(binding = 3, r32i) uniform coherent readonly mediump iimage2D uImage; +layout(binding = 3, r32i) uniform coherent restrict readonly mediump iimage2D uImage; void main() { diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index 5a92a0f3..7d9e9ea2 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -6079,6 +6079,8 @@ string CompilerGLSL::to_qualifiers_glsl(uint32_t id) { if (flags & (1ull << DecorationCoherent)) res += "coherent "; + if (flags & (1ull << DecorationRestrict)) + res += "restrict "; if (flags & (1ull << DecorationNonWritable)) res += "readonly "; if (flags & (1ull << DecorationNonReadable))