]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/passthrough_declaration_order.glsl
Allocate locations to interface variables
[libs/gl.git] / tests / glsl / passthrough_declaration_order.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 void process();
4 void main()
5 {
6         gl_Position = position;
7         passthrough;
8         process();
9 }
10 layout(location=1) in vec4 color;
11 void process()
12 {
13         passthrough;
14 }
15
16 #pragma MSP stage(fragment)
17 layout(location=0) out vec4 frag_color;
18 void main()
19 {
20         frag_color = color;
21 }
22
23 /* Expected output: vertex
24 layout(location=0) in vec4 position;
25 layout(location=1) in vec4 color;
26 layout(location=0) out vec4 _vs_out_color;
27 void main()
28 {
29         gl_Position = position;
30         _vs_out_color = color;
31 }
32 */
33
34 /* Expected output: fragment
35 layout(location=0) out vec4 frag_color;
36 layout(location=0) in vec4 _vs_out_color;
37 void main()
38 {
39         frag_color = _vs_out_color;
40 }
41 */