Bump github/codeql-action from 3.27.1 to 3.27.4
[glslang.git] / Test / spv.bufferhandle_Error.frag
blob4e2fc796961dcf74ac20454ab84d1fdda6449c9d
1 #version 450\r
2 \r
3 #extension GL_EXT_buffer_reference : enable\r
4 \r
5 layout(buffer_reference) buffer bufType1 { int x; };\r
6 layout(buffer_reference) buffer bufType2 { int x; };\r
7 layout(buffer_reference) uniform bufType3 { int x; };\r
8 \r
9 layout(buffer_reference) buffer;\r
10 layout(buffer_reference) uniform;\r
11 layout(buffer_reference) in;\r
12 layout(buffer_reference) out;\r
13 layout(buffer_reference) in badin { float x; } badin2;\r
14 layout(buffer_reference) out badout { float x; } badout2;\r
16 layout(buffer_reference) buffer bufType5;\r
18 layout(buffer_reference) buffer bufType6 { int x[]; };\r
20 layout(buffer_reference, std140, buffer_reference_align = 16) buffer bufType7;\r
21 layout(buffer_reference) buffer bufType7 { int x[]; };\r
23 buffer bufType4 {\r
24     bufType1 b1;\r
25     bufType2 b2;\r
26     bufType3 b3;\r
27     bufType6 b6;\r
28     bufType7 b7;\r
29 } b4;\r
31 void f()\r
32 {\r
33     bufType6 b;\r
34     b.x.length();\r
35     b4.b6.x.length();\r
36     b[2];               // ERROR, can't index due to unsized array\r
37 }\r
39 void main() {\r
40     bufType2 x1 = b4.b1;\r
41     bufType2 x2 = bufType2(b4.b1);\r
42     bufType2 x3 = bufType2(b4.b2);\r
43     bufType2 x4 = bufType2(b4.b3);\r
45     b4.b1 = b4.b2;\r
46     b4.b1 = b4.b3;\r
47     b4.b3 = b4.b2;\r
48 }\r
50 layout(buffer_reference) uniform bufType5 { int x; };\r