John Kessenich | 4d57090 | 2014-08-12 22:07:22 +0000 | [diff] [blame] | 1 | #version 310 es
|
John Kessenich | f57aa7b | 2014-10-06 19:39:13 +0000 | [diff] [blame] | 2 | highp float nodef3(float); // ERROR, no default precision
|
John Kessenich | 4d57090 | 2014-08-12 22:07:22 +0000 | [diff] [blame] | 3 | precision mediump float;
|
| 4 | precision highp usampler2D;
|
| 5 | precision highp sampler2D;
|
| 6 | precision highp isampler2DArray;
|
| 7 |
|
| 8 | layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, not supported
|
| 9 |
|
| 10 | layout(location = 2) in vec3 v3;
|
| 11 | layout(location = 2) in mat4 yi; // ERROR, locations conflict with xi
|
| 12 |
|
| 13 | uniform sampler2D arrayedSampler[5];
|
| 14 | uniform usampler2D usamp2d;
|
| 15 | uniform usampler2DRect samp2dr; // ERROR, reserved
|
| 16 | uniform isampler2DArray isamp2DA;
|
| 17 |
|
| 18 | in vec2 c2D;
|
| 19 | uniform int i;
|
| 20 |
|
| 21 | void main()
|
| 22 | {
|
| 23 | vec4 v = texture(arrayedSampler[i], c2D); // ERROR
|
| 24 |
|
| 25 | ivec2 offsets[4];
|
| 26 | const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
|
| 27 | uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, not supported
|
| 28 | vec4 v4 = textureGather(arrayedSampler[0], c2D);
|
| 29 | ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
|
| 30 | iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
|
| 31 | iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
|
| 32 | iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
|
John Kessenich | e3933d6 | 2015-07-15 19:42:59 -0600 | [diff] [blame] | 33 | iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(0.5));
|
| 34 | iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i)); // ERROR, offset not constant
|
John Kessenich | 4d57090 | 2014-08-12 22:07:22 +0000 | [diff] [blame] | 35 | }
|
| 36 |
|
| 37 | out vec4 outp;
|
John Kessenich | 4d57090 | 2014-08-12 22:07:22 +0000 | [diff] [blame] | 38 | void foo23()
|
| 39 | {
|
| 40 | const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
|
| 41 |
|
| 42 | textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
|
| 43 | textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), offsets[1]);
|
| 44 | textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
|
| 45 | textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
|
John Kessenich | df1d81a | 2014-08-13 08:32:15 +0000 | [diff] [blame] | 46 |
|
| 47 | if (gl_HelperInvocation)
|
| 48 | ++outp;
|
| 49 |
|
| 50 | int sum = gl_MaxVertexImageUniforms +
|
| 51 | gl_MaxFragmentImageUniforms +
|
| 52 | gl_MaxComputeImageUniforms +
|
| 53 | gl_MaxCombinedImageUniforms +
|
| 54 | gl_MaxCombinedShaderOutputResources;
|
| 55 |
|
| 56 | bool b1, b2, b3, b;
|
| 57 |
|
| 58 | b1 = mix(b2, b3, b);
|
| 59 | uvec3 um3 = mix(uvec3(i), uvec3(i), bvec3(b));
|
| 60 | ivec4 im4 = mix(ivec4(i), ivec4(i), bvec4(b));
|
John Kessenich | 4d57090 | 2014-08-12 22:07:22 +0000 | [diff] [blame] | 61 | }
|
John Kessenich | be70339 | 2014-08-13 20:04:19 +0000 | [diff] [blame] | 62 |
|
| 63 | layout(binding=3) uniform sampler2D s1;
|
| 64 | layout(binding=3) uniform sampler2D s2; // ERROR: overlapping bindings? Don't see that in the 310 spec.
|
John Kessenich | ac666e7 | 2016-06-14 22:12:20 -0600 | [diff] [blame] | 65 | highp layout(binding=2) uniform writeonly image2D i2D;
|
| 66 | layout(binding=4) uniform readonly image3D i3D; // ERROR, no default precision
|
| 67 | layout(binding=5) uniform imageCube iCube; // ERROR, no default precision
|
| 68 | layout(binding=6) uniform image2DArray i2DA; // ERROR, no default precision
|
| 69 | layout(binding=6) uniform coherent volatile restrict image2D i2Dqualified; // ERROR, no default precision
|
John Kessenich | be70339 | 2014-08-13 20:04:19 +0000 | [diff] [blame] | 70 |
|
| 71 | layout(binding = 1) uniform bb {
|
| 72 | int foo;
|
| 73 | layout(binding = 2) float f; // ERROR
|
| 74 | } bbi;
|
John Kessenich | b300751 | 2014-08-14 07:07:21 +0000 | [diff] [blame] | 75 |
|
| 76 | in centroid vec4 centroidIn;
|
| 77 | layout(location = 200000) uniform vec4 bigl; // ERROR, location too big
|
| 78 |
|
| 79 | layout(early_fragment_tests) in;
|
| 80 |
|
| 81 | layout(location = 40) out vec4 bigout1; // ERROR, too big
|
| 82 | layout(location = 40) out vec4 bigout2; // ERROR, overlap
|
| 83 | layout(location = -2) out vec4 neg; // ERROR, negative
|
| 84 |
|
John Kessenich | 93930d6 | 2015-06-12 22:09:25 +0000 | [diff] [blame] | 85 | layout(std430) buffer b430 {
|
John Kessenich | b300751 | 2014-08-14 07:07:21 +0000 | [diff] [blame] | 86 | int i;
|
| 87 | } b430i;
|
| 88 |
|
| 89 | layout(shared) uniform bshar {
|
| 90 | int i;
|
| 91 | } bshari;
|
| 92 |
|
| 93 | in smooth vec4 smoothIn;
|
| 94 | in flat int flatIn;
|
| 95 |
|
John Kessenich | ac666e7 | 2016-06-14 22:12:20 -0600 | [diff] [blame] | 96 | uniform sampler2DMS s2dms; // ERROR, no default precision qualifier
|
John Kessenich | b300751 | 2014-08-14 07:07:21 +0000 | [diff] [blame] | 97 |
|
| 98 | void foots()
|
| 99 | {
|
| 100 | highp ivec2 v2 = textureSize(s1, 2);
|
| 101 | highp ivec3 v3 = textureSize(isamp2DA, 3);
|
| 102 | v2 = textureSize(s2dms);
|
| 103 | v2 = imageSize(i2D);
|
John Kessenich | c47175c | 2014-11-17 16:45:10 +0000 | [diff] [blame] | 104 | v3 = imageSize(i3D);
|
| 105 | v2 = imageSize(iCube);
|
| 106 | v3 = imageSize(i2DA);
|
| 107 | v2 = imageSize(i2Dqualified);
|
John Kessenich | b300751 | 2014-08-14 07:07:21 +0000 | [diff] [blame] | 108 | }
|
| 109 |
|
| 110 | out bool bout; // ERROR
|
John Kessenich | ac666e7 | 2016-06-14 22:12:20 -0600 | [diff] [blame] | 111 | highp out image2D imageOut; // ERROR
|
John Kessenich | b300751 | 2014-08-14 07:07:21 +0000 | [diff] [blame] | 112 | out mat2x3 mout; // ERROR
|
| 113 |
|
John Kessenich | b07957c | 2014-10-28 05:24:14 +0000 | [diff] [blame] | 114 | in bool inb; // ERROR
|
| 115 | in sampler2D ino; // ERROR
|
| 116 | in float ina[4];
|
| 117 | in float inaa[4][2]; // ERROR
|
| 118 | struct S { float f; };
|
| 119 | in S ins;
|
| 120 | in S[4] inasa; // ERROR
|
| 121 | in S insa[4]; // ERROR
|
| 122 | struct SA { float f[4]; };
|
| 123 | in SA inSA; // ERROR
|
| 124 | struct SS { float f; S s; };
|
| 125 | in SS inSS; // ERROR
|
John Kessenich | 9e41f36 | 2015-06-15 15:08:41 +0000 | [diff] [blame] | 126 |
|
| 127 | #ifndef GL_EXT_shader_io_blocks
|
| 128 | #error GL_EXT_shader_io_blocks not defined
|
| 129 | #endif
|
| 130 |
|
| 131 | #extension GL_EXT_shader_io_blocks : enable
|
| 132 |
|
| 133 | out outbname { int a; } outbinst; // ERROR, not out block in fragment shader
|
| 134 |
|
| 135 | in inbname {
|
| 136 | int a;
|
| 137 | vec4 v;
|
| 138 | struct { int b; } s; // ERROR, nested struct definition
|
| 139 | } inbinst;
|
| 140 |
|
| 141 | in inbname2 {
|
| 142 | layout(location = 12) int aAnon;
|
| 143 | layout(location = 13) centroid in vec4 vAnon;
|
| 144 | };
|
| 145 |
|
| 146 | in layout(location = 13) vec4 aliased; // ERROR, aliased
|
| 147 |
|
| 148 | in inbname2 { // ERROR, reuse of block name
|
| 149 | int aAnon;
|
| 150 | centroid in vec4 vAnon;
|
| 151 | };
|
| 152 |
|
| 153 | in badmember { // ERROR, aAnon already in global scope
|
| 154 | int aAnon;
|
| 155 | };
|
| 156 |
|
| 157 | int inbname; // ERROR, redefinition of block name
|
| 158 |
|
| 159 | vec4 vAnon; // ERROR, anon in global scope; redefinition
|
| 160 |
|
| 161 | in arrayed {
|
| 162 | float f;
|
| 163 | } arrayedInst[4];
|
| 164 |
|
| 165 | void fooIO()
|
| 166 | {
|
| 167 | vec4 v = inbinst.v + vAnon;
|
| 168 | v *= arrayedInst[2].f;
|
John Kessenich | 1be8063 | 2015-11-28 15:19:11 -0700 | [diff] [blame] | 169 | v *= arrayedInst[i].f;
|
John Kessenich | 9e41f36 | 2015-06-15 15:08:41 +0000 | [diff] [blame] | 170 | }
|
| 171 |
|
| 172 | in vec4 gl_FragCoord;
|
| 173 | layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, non-ES
|
| 174 |
|
| 175 | layout(early_fragment_tests) in;
|
| 176 | out float gl_FragDepth;
|
| 177 | layout(depth_any) out float gl_FragDepth; // ERROR, non-ES
|
| 178 |
|
| 179 | void foo_IO()
|
| 180 | {
|
| 181 | gl_FragDepth = 0.2; // ERROR, early_fragment_tests declared
|
John Kessenich | 105704e | 2015-06-19 06:28:59 +0000 | [diff] [blame] | 182 | gl_Layer; // ERROR, not present
|
| 183 | gl_PrimitiveID; // ERROR, not present
|
| 184 | bool f = gl_FrontFacing;
|
John Kessenich | 9e41f36 | 2015-06-15 15:08:41 +0000 | [diff] [blame] | 185 | }
|
| 186 |
|
| 187 | out float gl_FragDepth;
|
John Kessenich | 105704e | 2015-06-19 06:28:59 +0000 | [diff] [blame] | 188 |
|
| 189 | #extension GL_OES_geometry_shader : enable
|
| 190 |
|
| 191 | void foo_GS()
|
| 192 | {
|
| 193 | highp int l = gl_Layer;
|
| 194 | highp int p = gl_PrimitiveID;
|
| 195 | }
|
John Kessenich | e3933d6 | 2015-07-15 19:42:59 -0600 | [diff] [blame] | 196 |
|
| 197 | in vec2 inf, ing;
|
| 198 | uniform ivec2 offsets[4];
|
| 199 | uniform sampler2D sArray[4];
|
| 200 | uniform int sIndex;
|
| 201 | layout(binding = 0) uniform atomic_uint auArray[2];
|
| 202 | uniform ubName { int i; } ubInst[4];
|
| 203 | buffer bbName { int i; } bbInst[4];
|
John Kessenich | ac666e7 | 2016-06-14 22:12:20 -0600 | [diff] [blame] | 204 | highp uniform writeonly image2D iArray[5];
|
John Kessenich | e3933d6 | 2015-07-15 19:42:59 -0600 | [diff] [blame] | 205 | const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
|
| 206 |
|
| 207 | void pfooBad()
|
| 208 | {
|
| 209 | precise vec2 h; // ERROR reserved
|
| 210 | h = fma(inf, ing, h); // ERROR, not available
|
| 211 | textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
|
| 212 | textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
|
| 213 | }
|
| 214 |
|
| 215 | #extension GL_OES_gpu_shader5 : enable
|
| 216 |
|
| 217 | void pfoo()
|
| 218 | {
|
| 219 | precise vec2 h;
|
| 220 | h = fma(inf, ing, h);
|
| 221 | textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
|
| 222 | textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
|
| 223 | textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
|
| 224 | }
|
John Kessenich | dc9eff7 | 2015-08-16 14:21:20 -0600 | [diff] [blame] | 225 |
|
| 226 | #extension GL_EXT_texture_cube_map_array : enable
|
| 227 |
|
| 228 | precision highp imageCubeArray ;
|
| 229 | precision highp iimageCubeArray ;
|
| 230 | precision highp uimageCubeArray ;
|
| 231 |
|
| 232 | precision highp samplerCubeArray ;
|
| 233 | precision highp samplerCubeArrayShadow;
|
| 234 | precision highp isamplerCubeArray ;
|
| 235 | precision highp usamplerCubeArray ;
|
| 236 |
|
| 237 | uniform writeonly imageCubeArray CA1;
|
| 238 | uniform writeonly iimageCubeArray CA2;
|
| 239 | uniform writeonly uimageCubeArray CA3;
|
| 240 |
|
| 241 | #ifdef GL_EXT_texture_cube_map_array
|
| 242 | uniform samplerCubeArray CA4;
|
| 243 | uniform samplerCubeArrayShadow CA5;
|
| 244 | uniform isamplerCubeArray CA6;
|
| 245 | uniform usamplerCubeArray CA7;
|
| 246 | #endif
|
| 247 |
|
| 248 | void CAT()
|
| 249 | {
|
| 250 | highp vec4 b4 = texture(CA4, vec4(0.5), 0.24);
|
| 251 | highp ivec4 b6 = texture(CA6, vec4(0.5), 0.26);
|
| 252 | highp uvec4 b7 = texture(CA7, vec4(0.5), 0.27);
|
| 253 | }
|
John Kessenich | 556ab3a | 2015-08-16 21:55:59 -0600 | [diff] [blame] | 254 |
|
| 255 | void badSample()
|
| 256 | {
|
| 257 | lowp int a1 = gl_SampleID; // ERROR, need extension
|
| 258 | mediump vec2 a2 = gl_SamplePosition; // ERROR, need extension
|
| 259 | highp int a3 = gl_SampleMaskIn[0]; // ERROR, need extension
|
| 260 | gl_SampleMask[0] = a3; // ERROR, need extension
|
| 261 | mediump int n = gl_NumSamples; // ERROR, need extension
|
| 262 | }
|
| 263 |
|
| 264 | #ifdef GL_OES_sample_variables
|
| 265 | #extension GL_OES_sample_variables : enable
|
| 266 | #endif
|
| 267 |
|
| 268 | void goodSample()
|
| 269 | {
|
| 270 | lowp int a1 = gl_SampleID;
|
| 271 | mediump vec2 a2 = gl_SamplePosition;
|
| 272 | highp int a3 = gl_SampleMaskIn[0];
|
| 273 | gl_SampleMask[0] = a3;
|
| 274 | mediump int n1 = gl_MaxSamples;
|
| 275 | mediump int n2 = gl_NumSamples;
|
| 276 | }
|
John Kessenich | fb5ba51 | 2015-08-16 23:40:15 -0600 | [diff] [blame] | 277 |
|
| 278 | uniform layout(r32f) highp image2D im2Df;
|
| 279 | uniform layout(r32ui) highp uimage2D im2Du;
|
| 280 | uniform layout(r32i) highp iimage2D im2Di;
|
| 281 | uniform ivec2 P;
|
| 282 |
|
| 283 | void badImageAtom()
|
| 284 | {
|
| 285 | float datf;
|
| 286 | int dati;
|
| 287 | uint datu;
|
| 288 |
|
| 289 | imageAtomicAdd( im2Di, P, dati); // ERROR, need extension |
| 290 | imageAtomicAdd( im2Du, P, datu); // ERROR, need extension |
| 291 | imageAtomicMin( im2Di, P, dati); // ERROR, need extension |
| 292 | imageAtomicMin( im2Du, P, datu); // ERROR, need extension |
| 293 | imageAtomicMax( im2Di, P, dati); // ERROR, need extension |
| 294 | imageAtomicMax( im2Du, P, datu); // ERROR, need extension |
| 295 | imageAtomicAnd( im2Di, P, dati); // ERROR, need extension |
| 296 | imageAtomicAnd( im2Du, P, datu); // ERROR, need extension |
| 297 | imageAtomicOr( im2Di, P, dati); // ERROR, need extension |
| 298 | imageAtomicOr( im2Du, P, datu); // ERROR, need extension |
| 299 | imageAtomicXor( im2Di, P, dati); // ERROR, need extension |
| 300 | imageAtomicXor( im2Du, P, datu); // ERROR, need extension |
| 301 | imageAtomicExchange(im2Di, P, dati); // ERROR, need extension |
| 302 | imageAtomicExchange(im2Du, P, datu); // ERROR, need extension |
| 303 | imageAtomicExchange(im2Df, P, datf); // ERROR, need extension |
| 304 | imageAtomicCompSwap(im2Di, P, 3, dati); // ERROR, need extension
|
| 305 | imageAtomicCompSwap(im2Du, P, 5u, datu); // ERROR, need extension
|
| 306 | }
|
| 307 |
|
| 308 | #ifdef GL_OES_shader_image_atomic
|
| 309 | #extension GL_OES_shader_image_atomic : enable
|
| 310 | #endif
|
| 311 |
|
| 312 | uniform layout(rgba32f) highp image2D badIm2Df; // ERROR, needs readonly or writeonly
|
| 313 | uniform layout(rgba8ui) highp uimage2D badIm2Du; // ERROR, needs readonly or writeonly
|
| 314 | uniform layout(rgba16i) highp iimage2D badIm2Di; // ERROR, needs readonly or writeonly
|
| 315 |
|
| 316 | void goodImageAtom()
|
| 317 | {
|
| 318 | float datf;
|
| 319 | int dati;
|
| 320 | uint datu;
|
| 321 |
|
| 322 | imageAtomicAdd( im2Di, P, dati); |
| 323 | imageAtomicAdd( im2Du, P, datu); |
| 324 | imageAtomicMin( im2Di, P, dati); |
| 325 | imageAtomicMin( im2Du, P, datu); |
| 326 | imageAtomicMax( im2Di, P, dati); |
| 327 | imageAtomicMax( im2Du, P, datu); |
| 328 | imageAtomicAnd( im2Di, P, dati); |
| 329 | imageAtomicAnd( im2Du, P, datu); |
| 330 | imageAtomicOr( im2Di, P, dati); |
| 331 | imageAtomicOr( im2Du, P, datu); |
| 332 | imageAtomicXor( im2Di, P, dati); |
| 333 | imageAtomicXor( im2Du, P, datu); |
| 334 | imageAtomicExchange(im2Di, P, dati); |
| 335 | imageAtomicExchange(im2Du, P, datu); |
| 336 | imageAtomicExchange(im2Df, P, datf); |
| 337 | imageAtomicCompSwap(im2Di, P, 3, dati);
|
| 338 | imageAtomicCompSwap(im2Du, P, 5u, datu);
|
| 339 |
|
| 340 | imageAtomicMax(badIm2Di, P, dati); // ERROR, not an allowed layout() on the image |
| 341 | imageAtomicMax(badIm2Du, P, datu); // ERROR, not an allowed layout() on the image |
| 342 | imageAtomicExchange(badIm2Df, P, datf); // ERROR, not an allowed layout() on the image |
| 343 | }
|
John Kessenich | 0fc4338 | 2015-08-22 01:21:47 -0600 | [diff] [blame] | 344 |
|
| 345 | sample in vec4 colorSampInBad; // ERROR, reserved
|
| 346 | centroid out vec4 colorCentroidBad; // ERROR
|
| 347 | flat out vec4 colorBadFlat; // ERROR
|
| 348 | smooth out vec4 colorBadSmooth; // ERROR
|
| 349 | noperspective out vec4 colorBadNo; // ERROR
|
| 350 | flat centroid in vec2 colorfc;
|
| 351 | in float scalarIn;
|
| 352 |
|
| 353 | void badInterp()
|
| 354 | {
|
| 355 | interpolateAtCentroid(colorfc); // ERROR, need extension
|
| 356 | interpolateAtSample(colorfc, 1); // ERROR, need extension
|
| 357 | interpolateAtOffset(colorfc, vec2(0.2)); // ERROR, need extension
|
| 358 | }
|
| 359 |
|
| 360 | #if defined GL_OES_shader_multisample_interpolation
|
| 361 | #extension GL_OES_shader_multisample_interpolation : enable
|
| 362 | #endif
|
| 363 |
|
| 364 | sample in vec4 colorSampIn;
|
| 365 | sample out vec4 colorSampleBad; // ERROR
|
| 366 | flat sample in vec4 colorfsi;
|
| 367 | sample in vec3 sampInArray[4];
|
| 368 |
|
| 369 | void interp()
|
| 370 | {
|
| 371 | float res;
|
| 372 | vec2 res2;
|
| 373 | vec3 res3;
|
| 374 | vec4 res4;
|
| 375 |
|
| 376 | res2 = interpolateAtCentroid(colorfc);
|
| 377 | res4 = interpolateAtCentroid(colorSampIn);
|
| 378 | res4 = interpolateAtCentroid(colorfsi);
|
| 379 | res = interpolateAtCentroid(scalarIn);
|
| 380 | res3 = interpolateAtCentroid(sampInArray); // ERROR
|
| 381 | res3 = interpolateAtCentroid(sampInArray[2]);
|
| 382 | res2 = interpolateAtCentroid(sampInArray[2].xy); // ERROR
|
| 383 |
|
| 384 | res3 = interpolateAtSample(sampInArray, 1); // ERROR
|
| 385 | res3 = interpolateAtSample(sampInArray[i], 0);
|
| 386 | res2 = interpolateAtSample(sampInArray[2].xy, 2); // ERROR
|
| 387 | res = interpolateAtSample(scalarIn, 1);
|
| 388 |
|
| 389 | res3 = interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
|
| 390 | res3 = interpolateAtOffset(sampInArray[2], vec2(0.2));
|
| 391 | res2 = interpolateAtOffset(sampInArray[2].xy, vec2(0.2)); // ERROR, no swizzle
|
| 392 | res = interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
|
| 393 | res = interpolateAtOffset(scalarIn, vec2(0.2));
|
| 394 |
|
| 395 | float f;
|
| 396 | res = interpolateAtCentroid(f); // ERROR, not interpolant
|
| 397 | res4 = interpolateAtSample(outp, 0); // ERROR, not interpolant
|
| 398 | }
|
| 399 |
|
John Kessenich | c8b2e36 | 2015-08-30 05:43:51 -0600 | [diff] [blame] | 400 | layout(blend_support_softlight) out; // ERROR, need extension
|
| 401 |
|
| 402 | #ifdef GL_KHR_blend_equation_advanced
|
| 403 | #extension GL_KHR_blend_equation_advanced : enable
|
| 404 | #endif
|
| 405 |
|
| 406 | layout(blend_support_multiply) out; |
| 407 | layout(blend_support_screen) out; |
| 408 | layout(blend_support_overlay) out; |
| 409 | layout(blend_support_darken, blend_support_lighten) out; |
| 410 | layout(blend_support_colordodge) layout(blend_support_colorburn) out; |
| 411 | layout(blend_support_hardlight) out; |
| 412 | layout(blend_support_softlight) out; |
| 413 | layout(blend_support_difference) out; |
| 414 | layout(blend_support_exclusion) out; |
| 415 | layout(blend_support_hsl_hue) out; |
| 416 | layout(blend_support_hsl_saturation) out; |
| 417 | layout(blend_support_hsl_color) out; |
| 418 | layout(blend_support_hsl_luminosity) out; |
| 419 | layout(blend_support_all_equations) out; |
| 420 | |
| 421 | layout(blend_support_hsl_luminosity) out; // okay to repeat |
| 422 | |
| 423 | layout(blend_support_hsl_luminosity) in; // ERROR, only on "out" |
| 424 | layout(blend_support_hsl_luminosity) out vec4; // ERROR, only on standalone |
| 425 | layout(blend_support_hsl_luminosity) out vec4 badout; // ERROR, only on standalone |
| 426 | layout(blend_support_hsl_luminosity) struct badS {int i;}; // ERROR, only on standalone |
| 427 | layout(blend_support_hsl_luminosity) void blendFoo() { } // ERROR, only on standalone |
| 428 | void blendFoo(layout(blend_support_hsl_luminosity) vec3 v) { } // ERROR, only on standalone |
| 429 | layout(blend_support_flizbit) out; // ERROR, no flizbit |
John Kessenich | 9312269 | 2015-09-11 15:25:38 -0600 | [diff] [blame] | 430 | |
| 431 | out vec4 outAA[2][2]; // ERROR |
John Kessenich | c08fb8a | 2017-03-14 16:45:30 -0600 | [diff] [blame] | 432 | |
| 433 | void devi() |
| 434 | { |
| 435 | gl_DeviceIndex; // ERROR, no extension |
| 436 | gl_ViewIndex; // ERROR, no extension |
| 437 | } |
| 438 | |
| 439 | #ifdef GL_EXT_device_group |
| 440 | #extension GL_EXT_device_group : enable |
| 441 | #endif |
| 442 | |
| 443 | #ifdef GL_EXT_device_group |
| 444 | #extension GL_EXT_multiview : enable |
| 445 | #endif |
| 446 | |
| 447 | void devie() |
| 448 | { |
| 449 | gl_DeviceIndex; |
| 450 | gl_ViewIndex; |
| 451 | } |