]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/invalid_swizzle.glsl
Recognize swizzles in GLSL
[libs/gl.git] / tests / glsl / invalid_swizzle.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 layout(location=1) in vec2 texcoord;
4 void main()
5 {
6         vec2 bad_component = texcoord.xz;
7         vec4 mixed = position.xyba;
8         gl_Position = position.xyzwx.xyzw;
9 }
10
11 /* Expected error:
12 <test>:6: Access to component 'z' which is not present in 'vec2'
13 <test>:7: Flavour of swizzle component 'b' is inconsistent with 'x'
14 <test>:8: Use of undeclared member 'xyzwx'
15 */