Add restrict qualifier for images.

This commit is contained in:
Hans-Kristian Arntzen 2017-08-29 15:54:22 +02:00
parent d55898ec74
commit 11dfcb6531
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ layout(binding = 1, std430) coherent restrict writeonly buffer SSBO
ivec4 value; ivec4 value;
} _10; } _10;
layout(binding = 3, r32i) uniform coherent readonly mediump iimage2D uImage; layout(binding = 3, r32i) uniform coherent restrict readonly mediump iimage2D uImage;
void main() void main()
{ {

View File

@ -6079,6 +6079,8 @@ string CompilerGLSL::to_qualifiers_glsl(uint32_t id)
{ {
if (flags & (1ull << DecorationCoherent)) if (flags & (1ull << DecorationCoherent))
res += "coherent "; res += "coherent ";
if (flags & (1ull << DecorationRestrict))
res += "restrict ";
if (flags & (1ull << DecorationNonWritable)) if (flags & (1ull << DecorationNonWritable))
res += "readonly "; res += "readonly ";
if (flags & (1ull << DecorationNonReadable)) if (flags & (1ull << DecorationNonReadable))