]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/named_interface_block.glsl
Add a unit test framework and some tests for the GLSL compiler
[libs/gl.git] / tests / glsl / named_interface_block.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 layout(location=1) in vec4 color;
4 out VertexOut
5 {
6         vec4 color;
7 } vs_out;
8 void main()
9 {
10         gl_Position = position;
11         vs_out.color = color;
12 }
13
14 #pragma MSP stage(fragment)
15 layout(location=0) out vec4 frag_color;
16 void main()
17 {
18         frag_color = vs_out.color;
19 }
20
21 /* Expected output: vertex
22 layout(location=0) in vec4 position;
23 layout(location=1) in vec4 color;
24 out VertexOut
25 {
26         vec4 color;
27 } vs_out;
28 void main()
29 {
30         gl_Position = position;
31         vs_out.color = color;
32 }
33 */
34
35 /* Expected output: fragment
36 layout(location=0) out vec4 frag_color;
37 in VertexOut
38 {
39         vec4 color;
40 } vs_out;
41 void main()
42 {
43         frag_color = vs_out.color;
44 }
45 */