3 out outbname { int a; } outbinst; // ERROR, not out block in fragment shader
\r
8 struct { int b; } s; // ERROR, nested struct definition
\r
12 layout(location = 12) int aAnon;
\r
13 layout(location = 13) centroid in vec4 vAnon;
\r
16 in layout(location = 13) vec4 aliased; // ERROR, aliased
\r
18 in inbname2 { // ERROR, reuse of block name
\r
20 centroid in vec4 vAnon;
\r
23 in badmember { // ERROR, aAnon already in global scope
\r
27 int inbname; // ERROR, redefinition of block name
\r
29 vec4 vAnon; // ERROR, anon in global scope; redefinition
\r
37 vec4 v = inbinst.v + vAnon;
\r
38 v *= arrayedInst[2].f;
\r
39 v *= arrayedInst[i].f;
\r
42 in vec4 gl_FragCoord;
\r
43 layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, non-ES
\r
45 layout(early_fragment_tests) in;
\r
46 out float gl_FragDepth;
\r
47 layout(depth_any) out float gl_FragDepth; // ERROR, non-ES
\r
51 gl_FragDepth = 0.2; // ERROR, early_fragment_tests declared
\r
52 bool f = gl_FrontFacing;
\r
55 out float gl_FragDepth;
\r
59 highp int l = gl_Layer;
\r
60 highp int p = gl_PrimitiveID;
\r
64 uniform ivec2 offsets[4];
\r
65 uniform sampler2D sArray[4];
\r
67 layout(binding = 0) uniform atomic_uint auArray[2];
\r
68 uniform ubName { int i; } ubInst[4];
\r
69 buffer bbName { int i; } bbInst[4];
\r
70 highp uniform writeonly image2D iArray[5];
\r
71 const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
\r
76 h = fma(inf, ing, h);
\r
77 textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
\r
78 textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
\r
79 textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
\r
82 precision highp imageCubeArray ;
\r
83 precision highp iimageCubeArray ;
\r
84 precision highp uimageCubeArray ;
\r
86 precision highp samplerCubeArray ;
\r
87 precision highp samplerCubeArrayShadow;
\r
88 precision highp isamplerCubeArray ;
\r
89 precision highp usamplerCubeArray ;
\r
91 uniform writeonly imageCubeArray CA1;
\r
92 uniform writeonly iimageCubeArray CA2;
\r
93 uniform writeonly uimageCubeArray CA3;
\r
95 #ifdef GL_EXT_texture_cube_map_array
\r
96 uniform samplerCubeArray CA4;
\r
97 uniform samplerCubeArrayShadow CA5;
\r
98 uniform isamplerCubeArray CA6;
\r
99 uniform usamplerCubeArray CA7;
\r
104 highp vec4 b4 = texture(CA4, vec4(0.5), 0.24);
\r
105 highp ivec4 b6 = texture(CA6, vec4(0.5), 0.26);
\r
106 highp uvec4 b7 = texture(CA7, vec4(0.5), 0.27);
\r
111 lowp int a1 = gl_SampleID;
\r
112 mediump vec2 a2 = gl_SamplePosition;
\r
113 highp int a3 = gl_SampleMaskIn[0];
\r
114 gl_SampleMask[0] = a3;
\r
115 mediump int n1 = gl_MaxSamples;
\r
116 mediump int n2 = gl_NumSamples;
\r
119 uniform layout(r32f) highp image2D im2Df;
\r
120 uniform layout(r32ui) highp uimage2D im2Du;
\r
121 uniform layout(r32i) highp iimage2D im2Di;
\r
124 uniform layout(rgba32f) highp image2D badIm2Df; // ERROR, needs readonly or writeonly
\r
125 uniform layout(rgba8ui) highp uimage2D badIm2Du; // ERROR, needs readonly or writeonly
\r
126 uniform layout(rgba16i) highp iimage2D badIm2Di; // ERROR, needs readonly or writeonly
\r
128 void goodImageAtom()
\r
134 imageAtomicAdd( im2Di, P, dati);
135 imageAtomicAdd( im2Du, P, datu);
136 imageAtomicMin( im2Di, P, dati);
137 imageAtomicMin( im2Du, P, datu);
138 imageAtomicMax( im2Di, P, dati);
139 imageAtomicMax( im2Du, P, datu);
140 imageAtomicAnd( im2Di, P, dati);
141 imageAtomicAnd( im2Du, P, datu);
142 imageAtomicOr( im2Di, P, dati);
143 imageAtomicOr( im2Du, P, datu);
144 imageAtomicXor( im2Di, P, dati);
145 imageAtomicXor( im2Du, P, datu);
146 imageAtomicExchange(im2Di, P, dati);
147 imageAtomicExchange(im2Du, P, datu);
148 imageAtomicExchange(im2Df, P, datf);
149 imageAtomicCompSwap(im2Di, P, 3, dati);
\r
150 imageAtomicCompSwap(im2Du, P, 5u, datu);
\r
152 imageAtomicMax(badIm2Di, P, dati); // ERROR, not an allowed layout() on the image
153 imageAtomicMax(badIm2Du, P, datu); // ERROR, not an allowed layout() on the image
154 imageAtomicExchange(badIm2Df, P, datf); // ERROR, not an allowed layout() on the image
157 centroid out vec4 colorCentroidBad; // ERROR
\r
158 flat out vec4 colorBadFlat; // ERROR
\r
159 smooth out vec4 colorBadSmooth; // ERROR
\r
160 noperspective out vec4 colorBadNo; // ERROR
\r
161 flat centroid in vec2 colorfc;
\r
164 sample in vec4 colorSampIn;
\r
165 sample out vec4 colorSampleBad; // ERROR
\r
166 flat sample in vec4 colorfsi;
\r
167 sample in vec3 sampInArray[4];
\r
176 res2 = interpolateAtCentroid(colorfc);
\r
177 res4 = interpolateAtCentroid(colorSampIn);
\r
178 res4 = interpolateAtCentroid(colorfsi);
\r
179 res = interpolateAtCentroid(scalarIn);
\r
180 res3 = interpolateAtCentroid(sampInArray); // ERROR
\r
181 res3 = interpolateAtCentroid(sampInArray[2]);
\r
182 res2 = interpolateAtCentroid(sampInArray[2].xy); // ERROR
\r
184 res3 = interpolateAtSample(sampInArray, 1); // ERROR
\r
185 res3 = interpolateAtSample(sampInArray[i], 0);
\r
186 res2 = interpolateAtSample(sampInArray[2].xy, 2); // ERROR
\r
187 res = interpolateAtSample(scalarIn, 1);
\r
189 res3 = interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
\r
190 res3 = interpolateAtOffset(sampInArray[2], vec2(0.2));
\r
191 res2 = interpolateAtOffset(sampInArray[2].xy, vec2(0.2)); // ERROR, no swizzle
\r
192 res = interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
\r
193 res = interpolateAtOffset(scalarIn, vec2(0.2));
\r
196 res = interpolateAtCentroid(f); // ERROR, not interpolant
\r
197 res4 = interpolateAtSample(outp, 0); // ERROR, not interpolant
\r
200 layout(blend_support_multiply) out;
201 layout(blend_support_screen) out;
202 layout(blend_support_overlay) out;
203 layout(blend_support_darken, blend_support_lighten) out;
204 layout(blend_support_colordodge) layout(blend_support_colorburn) out;
205 layout(blend_support_hardlight) out;
206 layout(blend_support_softlight) out;
207 layout(blend_support_difference) out;
208 layout(blend_support_exclusion) out;
209 layout(blend_support_hsl_hue) out;
210 layout(blend_support_hsl_saturation) out;
211 layout(blend_support_hsl_color) out;
212 layout(blend_support_hsl_luminosity) out;
213 layout(blend_support_all_equations) out;
215 layout(blend_support_hsl_luminosity) out; // okay to repeat
217 layout(blend_support_hsl_luminosity) in; // ERROR, only on "out"
218 layout(blend_support_hsl_luminosity) out vec4; // ERROR, only on standalone
219 layout(blend_support_hsl_luminosity) out vec4 badout; // ERROR, only on standalone
220 layout(blend_support_hsl_luminosity) struct badS {int i;}; // ERROR, only on standalone
221 layout(blend_support_hsl_luminosity) void blendFoo() { } // ERROR, only on standalone
222 void blendFoo(layout(blend_support_hsl_luminosity) vec3 v) { } // ERROR, only on standalone
223 layout(blend_support_flizbit) out; // ERROR, no flizbit
225 out vec4 outAA[2][2]; // ERROR