Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
[platform/upstream/glslang.git] / Test / spv.300layout.vert
1 #version 310 es\r
2 \r
3 layout(location = 7) in vec3 c;\r
4 layout(LocatioN = 3) in vec4 p;\r
5 layout(location = 9) in ivec2 aiv2;\r
6 out vec4 pos;\r
7 out vec3 color;\r
8 flat out int iout;\r
9 \r
10 layout(row_major) uniform; // default is now row_major\r
11 \r
12 layout(std140) uniform Transform { // layout of this block is std140\r
13     mat4 M1; // row_major\r
14     layout(column_major) mat4 M2; // column major\r
15     mat3 N1; // row_major\r
16     int iuin;\r
17 } tblock;\r
18 \r
19 uniform T2 { // layout of this block is shared\r
20     bool b;\r
21     mat4 t2m;\r
22 };\r
23 \r
24 layout(column_major) uniform T3 { // shared and column_major\r
25     mat4 M3; // column_major\r
26     layout(row_major) mat4 M4; // row major\r
27     mat2x3 N2; // column_major\r
28     layout(align=16, offset=2048) uvec3 uv3a[4];\r
29 };\r
30 \r
31 in uint uiuin;\r
32 \r
33 struct S {\r
34     vec3 c;\r
35     float f;\r
36 };\r
37 \r
38 out S s;\r
39 \r
40 void main()\r
41 {\r
42     pos = p * (tblock.M1 + tblock.M2 + M4 + M3 + t2m);\r
43     color = c * tblock.N1;\r
44     iout = tblock.iuin + int(uiuin) + aiv2.y;\r
45     s.c = c;\r
46     s.f = p.x;\r
47     if (N2[1] != vec3(1.0) || uv3a[2] != uvec3(5))\r
48         ++s.c;\r
49 }\r