13 smooth in float fsmooth;
14 noperspective in float fnop;
18 float clip = gl_ClipDistance[3];
21 uniform samplerCube sampC;
25 vec4 s = textureGather(sampC, vec3(0.2));
28 #extension GL_ARB_texture_gather : enable
32 vec4 s = textureGather(sampC, vec3(0.2));
35 flat in vec3 gl_Color; // ERROR, type
37 flat in vec4 gl_Color;
38 flat in vec4 gl_Color[2]; // ERROR, array
39 vec4 gl_Color; // ERROR, storage
41 #extension GL_ARB_texture_gather : warn
45 vec4 s = textureGather(sampC, vec3(0.2));
49 b3 = lessThan(uv3, uv3);
51 const bvec2 bl1 = greaterThanEqual(uvec2(2, 3), uvec2(3,3));
52 const bvec2 bl2 = equal(uvec2(2, 3), uvec2(3,3));
53 const bvec2 bl3 = equal(bl1, bl2); // yes, equal
58 const bvec4 bl4 = notEqual(greaterThan(uvec4(1,2,3,4), uvec4(0,2,0,6)), lessThanEqual(uvec4(7,8,9,10), uvec4(6, 8, 0, 11))); // compare (t,f,t,f) with (f,t,f,t)
59 int a3[int(bl4.x)+int(bl4.y)+int(bl4.z)+int(bl4.w)];
64 uvec2(2, 3) >= uvec2(3,3); // ERROR
65 int samples = gl_NumSamples; // ERROR
66 int(bl4) <= int(bl4); // true
67 int(bl4.x) > int(bl4.y); // false
70 #extension GL_ARB_texture_gather : enable
71 #extension GL_ARB_texture_rectangle : enable
72 #extension GL_ARB_sample_shading : enable
74 uniform sampler2D samp2D;
75 uniform sampler2DShadow samp2DS;
76 uniform sampler2DRect samp2DR;
77 uniform sampler2DArray samp2DA;
82 s = textureGatherOffset(sampC, vec3(0.3), ivec2(1)); // ERROR
83 s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1)); // ERROR
84 s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
85 s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
86 s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR
87 s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR
88 int samples = gl_NumSamples;
91 #extension GL_ARB_gpu_shader5 : enable
96 s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
97 s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
98 s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1));
99 s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1));
100 s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2);
103 #extension GL_ARB_texture_cube_map_array : enable
105 uniform samplerCubeArray Sca;
106 uniform isamplerCubeArray Isca;
107 uniform usamplerCubeArray Usca;
108 uniform samplerCubeArrayShadow Scas;
112 ivec3 a = textureSize(Sca, 3);
113 vec4 b = texture(Sca, i);
114 ivec4 c = texture(Isca, i, 0.7);
115 uvec4 d = texture(Usca, i);
117 b = textureLod(Sca, i, 1.7);
118 a = textureSize(Scas, a.x);
119 float f = texture(Scas, i, b.y);
120 c = textureGrad(Isca, i, vec3(0.1), vec3(0.2));
124 x; // ERROR until 420pack is turned on
126 #extension GL_ARB_shading_language_420pack : enable
128 const int ai[3] = { 10, 23, 32 };
129 layout(binding=0) uniform blockname { int a; } instanceName; // ERROR
130 uniform layout(binding=0) sampler2D bounds;
137 int a2 = m43.length();
138 a2 += m43[1].length();
140 const float b = 2 * a1;
141 a.x = gl_MinProgramTexelOffset + gl_MaxProgramTexelOffset;
143 boolb.length(); // ERROR
144 m43[3][1].length(); // ERROR
146 v3.length(b); // ERROR
149 in float gl_FogFragCoord;
151 #extension GL_ARB_separate_shader_objects : enable
153 in float gl_FogFragCoord;
154 in int gl_FogFragCoord; // ERROR
156 layout(early_fragment_tests) in; // ERROR
157 layout(r32i) uniform iimage2D iimg2Dbad; // ERROR
159 #extension GL_ARB_shader_image_load_store : enable
161 layout(early_fragment_tests) in;
163 layout(r32i) uniform iimage2D iimg2D;
168 imageAtomicCompSwap(iimg2D, ivec2(i,i), i, i);
169 ivec4 pos = imageLoad(iimg2D, ivec2(i,i));
172 layout(early_fragment_tests) out; // ERROR
174 #extension GL_ARB_explicit_uniform_location : enable
176 layout(location = 3) uniform vec4 ucolor0; // ERROR: explicit attrib location is also required for version < 330
178 #extension GL_ARB_explicit_attrib_location : enable
180 layout(location = 4) uniform vec4 ucolor1;