6 uniform sampler2D arrayedSampler[5];
7 uniform usampler2DRect samp2dr;
8 uniform isampler2DArray isamp2DA;
13 v = texture(arrayedSampler[i], c2D);
14 outp.x = gl_ClipDistance[1];
17 const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
18 uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, offsets not constant
19 uv4 = textureGatherOffsets(samp2dr, c2D, constOffsets, 2);
20 vec4 v4 = textureGather(arrayedSampler[0], c2D);
21 ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
22 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
23 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
24 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
25 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i));
27 vec4 c = gl_FragCoord;
30 layout(location = 4) in vec4 vl; // ERROR, not supported
32 #ifdef GL_ARB_separate_shader_objects
33 #extension GL_ARB_separate_shader_objects : enable
36 layout(location = 6) in vec4 vl2;
38 layout(location = 3) uniform vec3 uv3;
40 layout(location = 5) in vec4 gl_Color; // ERROR, layout
41 noperspective in float gl_ClipDistance[4]; // ERROR, can't change qualifier
43 layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, declared after use
45 uniform sampler2DRectShadow u2drs;
49 const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
51 textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
52 textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]);
53 textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
54 textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
57 patch in vec4 patchIn; // ERROR
58 patch out vec4 patchOut; // ERROR
63 df = modf(dvec3(outp.xyz), di);
73 vec2 v2 = dFdxFine(in2); // ERROR
74 vec3 v3 = dFdyCoarse(in3); // ERROR
75 vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4); // ERROR
78 #extension GL_ARB_derivative_control : enable
82 vec2 v2 = dFdxFine(in2);
83 vec3 v3 = dFdyCoarse(in3);
84 vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4);
92 u1 = packUnorm4x8(v4);
93 u1 = packSnorm4x8(v4);
94 v4 = unpackUnorm4x8(u1);
95 v4 = unpackSnorm4x8(u1);
99 d = packDouble2x32(u2);
100 u2 = unpackDouble2x32(d);
103 sample in vec4 colorSampIn;
\r
104 sample out vec4 colorSampleBad; // ERROR
\r
105 noperspective in vec4 colorfsi;
\r
106 sample in vec3 sampInArray[4];
\r
107 smooth in float scalarIn;
\r
108 flat centroid in vec2 colorfc;
\r
119 interpolateAtCentroid(colorfc);
\r
120 interpolateAtCentroid(colorSampIn);
\r
121 interpolateAtCentroid(colorfsi);
\r
122 interpolateAtCentroid(scalarIn);
\r
123 interpolateAtCentroid(sampInArray); // ERROR
\r
124 interpolateAtCentroid(sampInArray[2]);
\r
125 interpolateAtCentroid(sampInArray[2].xy); // ERROR
\r
127 interpolateAtSample(sampInArray, 1); // ERROR
\r
128 interpolateAtSample(sampInArray[i], 0);
\r
129 interpolateAtSample(s1.x, 2);
\r
130 interpolateAtSample(scalarIn, 1);
\r
132 interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
\r
133 interpolateAtOffset(sampInArray[2], vec2(0.2));
\r
134 interpolateAtOffset(sampInArray[2].xy, vec2(0.2)); // ERROR, no swizzle
\r
135 interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
\r
136 interpolateAtOffset(s2.x, vec2(0.2)); // ERROR
\r
139 interpolateAtCentroid(f); // ERROR, not interpolant
\r
140 interpolateAtSample(outp, 0); // ERROR, not interpolant
\r
143 uniform sampler1D samp1D;
\r
144 uniform isampler2D isamp2D;
\r
145 uniform usampler3D usamp3D;
\r
146 uniform samplerCube sampCube;
\r
147 uniform isampler1DArray isamp1DA;
\r
148 uniform usampler2DArray usamp2DA;
\r
149 uniform isamplerCubeArray isampCubeA;
\r
151 uniform sampler1DShadow samp1Ds;
\r
152 uniform sampler2DShadow samp2Ds;
\r
153 uniform samplerCubeShadow sampCubes;
\r
154 uniform sampler1DArrayShadow samp1DAs;
\r
155 uniform sampler2DArrayShadow samp2DAs;
\r
156 uniform samplerCubeArrayShadow sampCubeAs;
\r
158 uniform samplerBuffer sampBuf;
\r
159 uniform sampler2DRect sampRect;
\r
168 lod = textureQueryLod(samp1D, pf);
\r
169 lod = textureQueryLod(isamp2D, pf2);
\r
170 lod = textureQueryLod(usamp3D, pf3);
\r
171 lod = textureQueryLod(sampCube, pf3);
\r
172 lod = textureQueryLod(isamp1DA, pf);
\r
173 lod = textureQueryLod(usamp2DA, pf2);
\r
174 lod = textureQueryLod(isampCubeA, pf3);
\r
176 lod = textureQueryLod(samp1Ds, pf);
\r
177 lod = textureQueryLod(samp2Ds, pf2);
\r
178 lod = textureQueryLod(sampCubes, pf3);
\r
179 lod = textureQueryLod(samp1DAs, pf);
\r
180 lod = textureQueryLod(samp2DAs, pf2);
\r
181 lod = textureQueryLod(sampCubeAs, pf3);
\r
183 lod = textureQueryLod(sampBuf, pf); // ERROR
\r
184 lod = textureQueryLod(sampRect, pf2); // ERROR
\r
197 subroutine(subT1, subT2);
\r
198 subroutine float subT1() { return 1.0; }
\r
199 subroutine float subT2() { return 1.0; }
\r
201 struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member
\r