blob: 5efdbed7097497e5d260ed57e3b222d3585c3b92 [file] [log] [blame]
John Kessenich564842b2013-01-10 18:20:47 +00001#version 140
2
3varying vec4 v;
4
5in vec4 i;
6out vec4 o;
7
John Kesseniche7c59c12013-10-16 22:28:35 +00008in float gl_ClipDistance[5];
9
John Kessenich564842b2013-01-10 18:20:47 +000010void main()
11{
John Kesseniche7c59c12013-10-16 22:28:35 +000012 float clip = gl_ClipDistance[2];
John Kessenich564842b2013-01-10 18:20:47 +000013}
John Kessenichb51f62c2013-04-11 16:31:09 +000014#ifdef GL_ES
15#error GL_ES is set
16#else
17#error GL_ES is not set
18#endif
John Kessenichafda2412013-12-04 20:41:33 +000019
Chowa8f98862019-11-26 16:28:52 +080020
John Kessenichafda2412013-12-04 20:41:33 +000021in struct S { float f; } s; // ERROR
John Kesseniche8fe7b82013-12-18 18:47:12 +000022
John Kessenich782aa832014-02-12 05:15:49 +000023float patch = 3.1;
24
25layout(location=3) in vec4 vl; // ERROR
26
John Kessenichf8565992014-07-29 19:31:13 +000027layout(location = 3) out vec4 factorBad; // ERROR
28
29#extension GL_ARB_explicit_attrib_location : enable
30
31layout(location = 5) out vec4 factor;
32
John Kessenich782aa832014-02-12 05:15:49 +000033#extension GL_ARB_separate_shader_objects : enable
34
35layout(location=4) in vec4 vl2;
John Kessenichf5dd2f52014-03-26 03:17:31 +000036
John Kessenich968c8f82015-04-30 03:22:41 +000037float fooi();
38
John Kessenichf5dd2f52014-03-26 03:17:31 +000039void foo()
40{
41 vec2 r1 = modf(v.xy, v.zw); // ERROR, v.zw not l-value
42 vec2 r2 = modf(o.xy, o.zw);
John Kessenich968c8f82015-04-30 03:22:41 +000043 o.z = fooi();
44}
45
46// Test extra-function initializers
47
48float i1 = gl_FrontFacing ? -2.0 : 2.0;
49float i2 = 102;
50
51float fooi()
52{
53 return i1 + i2;
John Kessenichf5dd2f52014-03-26 03:17:31 +000054}
Chowa8f98862019-11-26 16:28:52 +080055
56uniform sampler2DMS aaa1; // ERROR
57
58#extension GL_ARB_texture_multisample : enable
59
60uniform sampler2DMS aaa2;