]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/unused_component_assignment.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / tests / glsl / unused_component_assignment.glsl
1 layout(push_constant) uniform Transform
2 {
3         mat4 mvp;
4 };
5
6 #pragma MSP stage(vertex)
7 layout(location=0) in vec4 position;
8 void main()
9 {
10         vec4 c0 = mvp[0]*position;
11         vec4 c1 = mvp[1]*position;
12         vec4 c2 = mvp[2]*position;
13         vec4 c3 = mvp[3]*position;
14         vec4 clip_pos;
15         clip_pos.x = c0.x+c1.x+c2.x+c3.x;
16         clip_pos.y = c0.y+c1.y+c2.y+c3.y;
17         clip_pos.z = c0.z+c1.z+c2.z+c3.z;
18         clip_pos.w = c0.w+c1.w+c2.w+c3.w;
19         gl_Position = vec4(clip_pos.xy, 0.0, 1.0);
20 }
21
22 // Target API: Vulkan
23
24 /* Expected output: vertex
25 layout(push_constant) uniform Transform
26 {
27   mat4 mvp;
28 };
29 layout(location=0) in vec4 position;
30 void main()
31 {
32   vec4 c0 = mvp[0]*position;
33   vec4 c1 = mvp[1]*position;
34   vec4 c2 = mvp[2]*position;
35   vec4 c3 = mvp[3]*position;
36   vec4 clip_pos;
37   clip_pos.x = c0.x+c1.x+c2.x+c3.x;
38   clip_pos.y = c0.y+c1.y+c2.y+c3.y;
39   gl_Position = vec4(clip_pos.xy, 0.0, 1.0);
40 }
41 */