Merge pull request #2908 from Biswa96/cmake-spirv-remap
[platform/upstream/glslang.git] / Test / spv.structAssignment.frag
1 #version 140\r
2 \r
3 precision mediump int;\r
4 \r
5 uniform sampler2D samp2D;\r
6 in mediump vec2 coord;\r
7 \r
8 struct lunarStruct1 {\r
9     int i;\r
10     float f;\r
11 };\r
12 \r
13 struct lunarStruct2 {\r
14     int i;\r
15     float f;\r
16         lunarStruct1 s1_1;\r
17 };\r
18 \r
19 struct lunarStruct3 {\r
20         lunarStruct2 s2_1;\r
21     int i;\r
22     float f;\r
23         lunarStruct1 s1_1;\r
24 };\r
25 \r
26 \r
27 lunarStruct1 foo;\r
28 lunarStruct2 foo2;\r
29 lunarStruct3 foo3;\r
30 \r
31 void main()\r
32 {\r
33         lunarStruct2 locals2;\r
34 \r
35         if (foo3.s2_1.i > 0)\r
36                 locals2 = foo3.s2_1;\r
37         else\r
38                 locals2 = foo2;\r
39 \r
40         gl_FragColor =  locals2.s1_1.f * texture(samp2D, coord);\r
41 }\r