diff options
Diffstat (limited to 'tests/glsl/ssboStructInsideStructMemoryQualifierError.slang')
| -rw-r--r-- | tests/glsl/ssboStructInsideStructMemoryQualifierError.slang | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/glsl/ssboStructInsideStructMemoryQualifierError.slang b/tests/glsl/ssboStructInsideStructMemoryQualifierError.slang new file mode 100644 index 000000000..c5376b4a8 --- /dev/null +++ b/tests/glsl/ssboStructInsideStructMemoryQualifierError.slang @@ -0,0 +1,23 @@ +//TEST:SIMPLE(filecheck=CHECK-GLSL): -stage compute -entry computeMain -allow-glsl -target glsl +//TEST:SIMPLE(filecheck=CHECK-SPV): -stage compute -entry computeMain -allow-glsl -target spirv -emit-spirv-directly + +// This code should error since memory qualifiers are only allowed inside: +// Shader storage blocks, variables declared within shader storage blocks +// and variables declared as image types. Named structs inside a Interface +// block violates these rules +// CHECK-GLSL: error +// CHECK-SPV: error +buffer Block4 { + struct StructTmp + { + readonly int val; + }; + readonly structTmp myStruct; + coherent readonly vec4 member1; + coherent vec4 member2; +}inputBuffer4; + +layout(local_size_x = 1) in; +void computeMain() +{ +}
\ No newline at end of file |
