• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 140
2
3varying vec4 v;
4
5in vec4 i;
6out vec4 o;
7
8in float gl_ClipDistance[5];
9
10void main()
11{
12    float clip = gl_ClipDistance[2];
13}
14#ifdef GL_ES
15#error GL_ES is set
16#else
17#error GL_ES is not set
18#endif
19
20
21in struct S { float f; } s; // ERROR
22
23float patch = 3.1;
24
25layout(location=3) in vec4 vl;  // ERROR
26
27layout(location = 3) out vec4 factorBad;  // ERROR
28
29#extension GL_ARB_explicit_attrib_location : enable
30
31layout(location = 5) out vec4 factor;
32
33#extension GL_ARB_separate_shader_objects : enable
34
35layout(location=4) in vec4 vl2;
36
37float fooi();
38
39void foo()
40{
41    vec2 r1 = modf(v.xy, v.zw);  // ERROR, v.zw not l-value
42    vec2 r2 = modf(o.xy, o.zw);
43    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;
54}
55
56uniform sampler2DMS aaa1; // ERROR
57
58#extension GL_ARB_texture_multisample : enable
59
60uniform sampler2DMS aaa2;
61