]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/nested_member_access.glsl
Fix GLSL test cases so they pass the basic tests
[libs/gl.git] / tests / glsl / nested_member_access.glsl
1 uniform Lighting
2 {
3         vec3 light_color[4];
4 };
5 uniform Params
6 {
7         int light_index;
8 };
9
10 #pragma MSP stage(vertex)
11 layout(location=0) in vec4 position;
12 void main()
13 {
14         gl_Position = position;
15 }
16
17 #pragma MSP stage(fragment)
18 layout(location=0) out vec4 frag_color;
19 void main()
20 {
21         frag_color = vec4(light_color[light_index], 1.0);
22 }
23
24 // Target API: Vulkan
25
26 /* Expected output: vertex
27 layout(location=0) in vec4 position;
28 void main()
29 {
30         gl_Position = position;
31 }
32 */
33
34 /* Expected output: fragment
35 layout(set=0, binding=65) uniform Lighting
36 {
37         vec3 light_color[4];
38 };
39 layout(set=0, binding=56) uniform Params
40 {
41         int light_index;
42 };
43 layout(location=0) out vec4 frag_color;
44 void main()
45 {
46         frag_color = vec4(light_color[light_index], 1.0);
47 }
48 */