3 shared vec4 s; // ERROR
\r
4 layout(local_size_x = 2) out; // ERROR
\r
5 buffer vec4 v; // ERROR
\r
7 layout(location = 2) uniform mat4 x;
\r
8 layout(location = 3) uniform mat4 y;
\r
9 layout(location = 2) out mat4 xi;
\r
10 layout(location = 3) out mat4 yi; // ERROR, locations conflict with xi
\r
15 u2 = uaddCarry(u2, u2, u2);
\r
17 u1 = usubBorrow(u1, u1, u1);
\r
19 umulExtended(u4, u4, u4, u4);
\r
21 imulExtended(i4, i4, i4, i4);
\r
23 i1 = bitfieldExtract(i1, 4, 5);
\r
25 u3 = bitfieldExtract(u3, 4, 5);
\r
27 i3 = bitfieldInsert(i3, i3, 4, 5);
\r
28 u1 = bitfieldInsert(u1, u1, 4, 5);
\r
30 i2 = bitfieldReverse(i2);
\r
31 u4 = bitfieldReverse(u4);
\r
45 u1 = packUnorm4x8(v4);
\r
46 u1 = packSnorm4x8(v4);
\r
47 v4 = unpackUnorm4x8(u1);
\r
48 v4 = unpackSnorm4x8(u1);
\r
51 precision highp sampler2DMS;
\r
52 precision highp isampler2DMS;
\r
53 precision highp usampler2DMS;
\r
55 uniform sampler2DMS s2dms;
\r
56 uniform isampler2DMS is2dms;
\r
57 uniform usampler2DMS us2dms;
\r
58 uniform usampler2DMSArray us2dmsa; // ERROR
\r
63 v2 = textureSize(s2dms);
\r
64 v2 = textureSize(us2dms);
\r
65 vec4 v4 = texelFetch(s2dms, v2, 2);
\r
66 ivec4 iv4 = texelFetch(is2dms, v2, 2);
\r
67 textureSamples(s2dms); // ERROR
\r
69 frexp(f, ini); // ERROR, i not writable
\r
72 out bool outb; // ERROR
\r
73 out sampler2D outo; // ERROR
\r
75 out float outaa[4][2]; // ERROR
\r
76 struct S { float f; };
\r
78 out S[4] outasa; // ERROR
\r
79 out S outsa[4]; // ERROR
\r
80 struct SA { float f[4]; };
\r
81 out SA outSA; // ERROR
\r
82 struct SS { float f; S s; };
\r
83 out SS outSS; // ERROR
\r
85 layout(std430) uniform U430 { int a; } U430i; // ERROR
\r
86 layout(std430) buffer B430 { int a; } B430i;
\r
88 #ifndef GL_OES_shader_io_blocks
\r
89 #error GL_OES_shader_io_blocks not defined
\r
92 #extension GL_OES_shader_io_blocks : enable
\r
97 highp sampler2D s; // ERROR, opaque type
\r
101 layout(location = 12) int aAnon;
\r
102 layout(location = 13) vec4 vAnon;
\r
105 layout(location = 12) out highp int aliased; // ERROR, aliasing location
\r
107 in inbname { int a; } inbinst; // ERROR, no in block in vertex shader
\r
109 out gl_PerVertex { // ERROR, has extra member
\r
110 highp vec4 gl_Position;
\r
116 int sum = gl_VertexID +
\r
118 gl_Position = vec4(1.0);
\r
119 gl_PointSize = 2.0; // ERROR, removed by redeclaration
\r
122 out gl_PerVertex { // ERROR, already used and already redeclared
\r
123 highp vec4 gl_Position;
\r
127 smooth out smo { // ERROR, no smooth on a block
\r
131 flat out fmo { // ERROR, no flat on a block
\r
135 centroid out cmo { // ERROR, no centroid on a block
\r
139 invariant out imo { // ERROR, no invariant on a block
\r
144 uniform ivec2 offsets[4];
\r
145 uniform sampler2D sArray[4];
\r
146 uniform int sIndex;
\r
147 layout(binding = 0) uniform atomic_uint auArray[2];
\r
148 uniform ubName { int i; } ubInst[4];
\r
149 buffer bbName { int i; } bbInst[4];
\r
150 highp uniform writeonly image2D iArray[5];
\r
151 const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
\r
155 precise vec2 h; // ERROR reserved
\r
156 h = fma(inf, ing, h); // ERROR, not available
\r
157 sArray[sIndex + 1]; // ERRRO, not supported
\r
158 auArray[sIndex + 1];
\r
161 ubInst[sIndex + 1]; // ERROR, not supported
\r
162 bbInst[sIndex]; // ERROR, not supported
\r
164 iArray[sIndex * 2]; // ERROR, not supported
\r
165 textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
\r
166 textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
\r
169 #extension GL_OES_gpu_shader5 : enable
\r
174 h = fma(inf, ing, h);
\r
175 sArray[sIndex + 1];
\r
176 ubInst[sIndex + 1];
\r
177 bbInst[sIndex - 2]; // ERROR, still not supported
\r
179 iArray[sIndex - 2];
\r
180 textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
\r
181 textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
\r
182 textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
\r
185 uniform samplerBuffer badSamp1; // ERROR, reserved
\r
186 uniform isamplerBuffer badSamp2; // ERROR, reserved
\r
187 uniform usamplerBuffer badSamp3; // ERROR, reserved
\r
188 uniform writeonly imageBuffer badSamp4; // ERROR, reserved
\r
189 uniform writeonly iimageBuffer badSamp5; // ERROR, reserved
\r
190 uniform writeonly uimageBuffer badSamp6; // ERROR, reserved
\r
192 #extension GL_OES_texture_buffer : enable
\r
193 #extension GL_EXT_texture_buffer : enable
\r
195 uniform samplerBuffer noPreSamp1; // ERROR, no default precision
\r
196 uniform isamplerBuffer noPreSamp2; // ERROR, no default precision
\r
197 uniform usamplerBuffer noPreSamp3; // ERROR, no default precision
\r
198 uniform writeonly imageBuffer noPreSamp4; // ERROR, no default precision
\r
199 uniform writeonly iimageBuffer noPreSamp5; // ERROR, no default precision
\r
200 uniform writeonly uimageBuffer noPreSamp6; // ERROR, no default precision
\r
202 precision highp samplerBuffer;
\r
203 precision highp isamplerBuffer;
\r
204 precision highp usamplerBuffer;
\r
205 precision highp imageBuffer;
\r
206 precision highp iimageBuffer;
\r
207 precision highp uimageBuffer;
\r
209 #ifdef GL_OES_texture_buffer
\r
210 uniform samplerBuffer bufSamp1;
\r
211 uniform isamplerBuffer bufSamp2;
\r
212 uniform usamplerBuffer bufSamp3;
\r
214 #ifdef GL_EXT_texture_buffer
\r
215 uniform writeonly imageBuffer bufSamp4;
\r
216 uniform writeonly iimageBuffer bufSamp5;
\r
217 uniform writeonly uimageBuffer bufSamp6;
\r
222 highp int s1 = textureSize(bufSamp1);
\r
223 highp int s2 = textureSize(bufSamp2);
\r
224 highp int s3 = textureSize(bufSamp3);
\r
226 highp int s4 = imageSize(bufSamp4);
\r
227 highp int s5 = imageSize(bufSamp5);
\r
228 highp int s6 = imageSize(bufSamp6);
\r
230 highp vec4 f1 = texelFetch(bufSamp1, s1);
\r
231 highp ivec4 f2 = texelFetch(bufSamp2, s2);
\r
232 highp uvec4 f3 = texelFetch(bufSamp3, s3);
\r
235 uniform writeonly imageCubeArray badCA1; // ERROR, reserved
\r
236 uniform writeonly iimageCubeArray badCA2; // ERROR, reserved
\r
237 uniform writeonly uimageCubeArray badCA3; // ERROR, reserved
\r
239 uniform samplerCubeArray badCA4; // ERROR, reserved
\r
240 uniform samplerCubeArrayShadow badCA5; // ERROR, reserved
\r
241 uniform isamplerCubeArray badCA6; // ERROR, reserved
\r
242 uniform usamplerCubeArray badCA7; // ERROR, reserved
\r
244 #extension GL_OES_texture_cube_map_array : enable
\r
246 uniform writeonly imageCubeArray noPreCA1; // ERROR, no default precision
\r
247 uniform writeonly iimageCubeArray noPreCA2; // ERROR, no default precision
\r
248 uniform writeonly uimageCubeArray noPreCA3; // ERROR, no default precision
\r
250 uniform samplerCubeArray noPreCA4; // ERROR, no default precision
\r
251 uniform samplerCubeArrayShadow noPreCA5; // ERROR, no default precision
\r
252 uniform isamplerCubeArray noPreCA6; // ERROR, no default precision
\r
253 uniform usamplerCubeArray noPreCA7; // ERROR, no default precision
\r
255 precision highp imageCubeArray ;
\r
256 precision highp iimageCubeArray ;
\r
257 precision highp uimageCubeArray ;
\r
259 precision highp samplerCubeArray ;
\r
260 precision highp samplerCubeArrayShadow;
\r
261 precision highp isamplerCubeArray ;
\r
262 precision highp usamplerCubeArray ;
\r
264 uniform writeonly imageCubeArray CA1;
\r
265 uniform writeonly iimageCubeArray CA2;
\r
266 uniform writeonly uimageCubeArray CA3;
\r
268 layout(rgba16f) uniform readonly imageCubeArray rCA1;
\r
269 layout(rgba32i) uniform readonly iimageCubeArray rCA2;
\r
270 layout(r32ui) uniform readonly uimageCubeArray rCA3;
\r
272 #ifdef GL_OES_texture_cube_map_array
\r
273 uniform samplerCubeArray CA4;
\r
274 uniform samplerCubeArrayShadow CA5;
\r
275 uniform isamplerCubeArray CA6;
\r
276 uniform usamplerCubeArray CA7;
\r
281 highp ivec3 s4 = textureSize(CA4, 1);
\r
282 highp ivec3 s5 = textureSize(CA5, 1);
\r
283 highp ivec3 s6 = textureSize(CA6, 1);
\r
284 highp ivec3 s7 = textureSize(CA7, 1);
\r
286 highp vec4 t4 = texture(CA4, vec4(0.5));
\r
287 highp float t5 = texture(CA5, vec4(0.5), 3.0);
\r
288 highp ivec4 t6 = texture(CA6, vec4(0.5));
\r
289 highp uvec4 t7 = texture(CA7, vec4(0.5));
\r
291 highp vec4 L4 = textureLod(CA4, vec4(0.5), 0.24);
\r
292 highp ivec4 L6 = textureLod(CA6, vec4(0.5), 0.26);
\r
293 highp uvec4 L7 = textureLod(CA7, vec4(0.5), 0.27);
\r
295 highp vec4 g4 = textureGrad(CA4, vec4(0.5), vec3(0.1), vec3(0.2));
\r
296 highp ivec4 g6 = textureGrad(CA6, vec4(0.5), vec3(0.1), vec3(0.2));
\r
297 highp uvec4 g7 = textureGrad(CA7, vec4(0.5), vec3(0.1), vec3(0.2));
\r
299 highp vec4 gath4 = textureGather(CA4, vec4(0.5));
\r
300 highp vec4 gathC4 = textureGather(CA4, vec4(0.5), 2);
\r
301 highp ivec4 gath6 = textureGather(CA6, vec4(0.5));
\r
302 highp ivec4 gathC6 = textureGather(CA6, vec4(0.5), 1);
\r
303 highp uvec4 gath7 = textureGather(CA7, vec4(0.5));
\r
304 highp uvec4 gathC7 = textureGather(CA7, vec4(0.5), 0);
\r
306 highp vec4 gath5 = textureGather(CA5, vec4(0.5), 2.5);
\r
308 highp ivec3 s1 = imageSize(CA1);
\r
309 highp ivec3 s2 = imageSize(CA2);
\r
310 highp ivec3 s3 = imageSize(CA3);
\r
312 imageStore(CA1, s3, vec4(1));
\r
313 imageStore(CA2, s3, ivec4(1));
\r
314 imageStore(CA3, s3, uvec4(1));
\r
316 highp vec4 cl1 = imageLoad(rCA1, s3);
\r
317 highp ivec4 cl2 = imageLoad(rCA2, s3);
\r
318 highp uvec4 cl3 = imageLoad(rCA3, s3);
\r
321 uniform sampler2DMSArray bad2DMS; // ERROR, reserved
\r
322 uniform isampler2DMSArray bad2DMSi; // ERROR, reserved
\r
323 uniform usampler2DMSArray bad2DMSu; // ERROR, reserved
\r
325 #extension GL_OES_texture_storage_multisample_2d_array : enable
\r
327 #ifdef GL_OES_texture_storage_multisample_2d_array
\r
329 uniform sampler2DMSArray noPrec2DMS; // ERROR, no default
\r
330 uniform isampler2DMSArray noPrec2DMSi; // ERROR, no default
\r
331 uniform usampler2DMSArray noPrec2DMSu; // ERROR, no default
\r
335 precision highp sampler2DMSArray;
\r
336 precision highp isampler2DMSArray;
\r
337 precision highp usampler2DMSArray;
\r
339 uniform sampler2DMSArray samp2DMSA;
\r
340 uniform isampler2DMSArray samp2DMSAi;
\r
341 uniform usampler2DMSArray samp2DMSAu;
\r
345 vec4 tf = texelFetch(samp2DMSA, ivec3(5), 2);
\r
346 ivec4 tfi = texelFetch(samp2DMSAi, ivec3(5), 2);
\r
347 uvec4 tfu = texelFetch(samp2DMSAu, ivec3(5), 2);
\r
349 ivec3 tfs = textureSize(samp2DMSA);
\r
350 ivec3 tfsi = textureSize(samp2DMSAi);
\r
351 ivec3 tfsb = textureSize(samp2DMSAi, 4); // ERROR, no lod
\r
352 ivec3 tfsu = textureSize(samp2DMSAu);
\r
355 #ifdef GL_OES_shader_image_atomic
\r
356 #extension GL_OES_shader_image_atomic : enable
\r
359 uniform layout(r32f) highp image2D im2Df;
\r
360 uniform layout(r32ui) highp uimage2D im2Du;
\r
361 uniform layout(r32i) highp iimage2D im2Di;
\r
364 void goodImageAtom()
\r
370 imageAtomicAdd( im2Di, P, dati);
371 imageAtomicAdd( im2Du, P, datu);
372 imageAtomicMin( im2Di, P, dati);
373 imageAtomicMin( im2Du, P, datu);
374 imageAtomicMax( im2Di, P, dati);
375 imageAtomicMax( im2Du, P, datu);
376 imageAtomicAnd( im2Di, P, dati);
377 imageAtomicAnd( im2Du, P, datu);
378 imageAtomicOr( im2Di, P, dati);
379 imageAtomicOr( im2Du, P, datu);
380 imageAtomicXor( im2Di, P, dati);
381 imageAtomicXor( im2Du, P, datu);
382 imageAtomicExchange(im2Di, P, dati);
383 imageAtomicExchange(im2Du, P, datu);
384 imageAtomicExchange(im2Df, P, datf);
385 imageAtomicCompSwap(im2Di, P, 3, dati);
\r
386 imageAtomicCompSwap(im2Du, P, 5u, datu);
\r
389 sample out vec4 colorSampInBad; // ERROR, reserved
\r
391 #extension GL_OES_shader_multisample_interpolation : enable
\r
393 sample out vec4 colorSample;
\r
394 flat sample out vec4 colorfsi;
\r
395 sample out vec3 sampInArray[4];
\r
400 interpolateAtCentroid(inv4); // ERROR, wrong stage
\r
401 interpolateAtSample(inv4, 1); // ERROR, need extension
\r
402 interpolateAtOffset(inv4, vec2(0.2)); // ERROR, need extension
\r