]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/partially_unused_interface_block.glsl
Check the flat qualifier from the correct member
[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 // Target API: Vulkan
31
32 /* Expected output: vertex
33 layout(set=0, binding=24) uniform GlobalValues
34 {
35         vec4 tint;
36         vec2 scale;
37 };
38 layout(location=0) in vec4 position;
39 layout(location=1) in vec4 color;
40 out VertexOut
41 {
42         vec2 texcoord;
43         vec4 color;
44 } vs_out;
45 void main()
46 {
47         vs_out.texcoord = position.xy*scale*0.5+0.5;
48         vs_out.color = color;
49         gl_Position = position;
50 }
51 */
52
53 /* Expected output: fragment
54 layout(set=0, binding=24) uniform GlobalValues
55 {
56         vec4 tint;
57         vec2 scale;
58 };
59 layout(location=0) out vec4 frag_color;
60 in VertexOut
61 {
62         vec2 texcoord;
63         vec4 color;
64 } vs_out;
65 void main()
66 {
67         frag_color = vs_out.color*tint;
68 }
69 */