]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/identifier_conflict.glsl
Improve reporting of function name conflicts
[libs/gl.git] / tests / glsl / identifier_conflict.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 out VertexOut
4 {
5         vec2 texcoord;
6 } vs_out;
7 vec3 normal();
8 vec3 normal;
9 out VertexOut2
10 {
11         vec2 texcoord;
12         vec3 normal;
13 };
14 vec2 texcoord;
15 void main()
16 {
17         vec2 texcoord;
18         gl_Position = position;
19 }
20 vec2 texcoord()
21 {
22         return vec2(0.0);
23 }
24
25 /* Expected error:
26 <test>:8: Multiple definition of 'normal'
27 <test>:7: Previous definition is here
28 <test>:12: Multiple definition of 'normal'
29 <test>:7: Previous definition is here
30 <test>:14: Multiple definition of 'texcoord'
31 <test>:11: Previous definition is here
32 <test>:20: Multiple definition of 'texcoord'
33 <test>:11: Previous definition is here
34 */