]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/partially_unused_interface_block.glsl
Only remove load IDs of variables actually assigned in a loop
[libs/gl.git] / tests / glsl / partially_unused_interface_block.glsl
1 uniform GlobalValues
2 {
3         vec4 tint;
4         vec2 scale;
5 };
6
7 #pragma MSP stage(vertex)
8 layout(location=0) in vec4 position;
9 layout(location=1) in vec4 color;
10 out VertexOut
11 {
12         vec2 texcoord;
13         vec4 color;
14 } vs_out;
15 void main()
16 {
17         vs_out.texcoord = position.xy*scale*0.5+0.5;
18         vs_out.color = color;
19         gl_Position = position;
20 }
21
22 #pragma MSP stage(fragment)
23 layout(location=0) out vec4 frag_color;
24 void main()
25 {
26         scale = vec2(1.0);
27         frag_color = vs_out.color*tint;
28 }
29
30 /* Expected output: vertex
31 layout(binding=72) uniform GlobalValues
32 {
33         vec4 tint;
34         vec2 scale;
35 };
36 layout(location=0) in vec4 position;
37 layout(location=1) in vec4 color;
38 out VertexOut
39 {
40         vec2 texcoord;
41         vec4 color;
42 } vs_out;
43 void main()
44 {
45         vs_out.texcoord = position.xy*scale*0.5+0.5;
46         vs_out.color = color;
47         gl_Position = position;
48 }
49 */
50
51 /* Expected output: fragment
52 layout(binding=72) uniform GlobalValues
53 {
54         vec4 tint;
55         vec2 scale;
56 };
57 layout(location=0) out vec4 frag_color;
58 in VertexOut
59 {
60         vec2 texcoord;
61         vec4 color;
62 } vs_out;
63 void main()
64 {
65         frag_color = vs_out.color*tint;
66 }
67 */