From dc9eff7221b484ffde48adf9f892b6d1ee32a83b Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 16 Aug 2015 14:21:20 -0600 Subject: [PATCH] Implement GL_OES_texture_cube_map_array. --- Test/310.frag | 29 ++ Test/310.vert | 74 +++ Test/baseResults/310.frag.out | 94 ++++ Test/baseResults/310.vert.out | 579 +++++++++++++++++++++- glslang/MachineIndependent/Initialize.cpp | 2 +- glslang/MachineIndependent/Scan.cpp | 17 +- glslang/MachineIndependent/Versions.cpp | 4 +- 7 files changed, 790 insertions(+), 9 deletions(-) diff --git a/Test/310.frag b/Test/310.frag index 83aa8b03..f12d75f1 100644 --- a/Test/310.frag +++ b/Test/310.frag @@ -222,3 +222,32 @@ void pfoo() textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant } + +#extension GL_EXT_texture_cube_map_array : enable + +precision highp imageCubeArray ; +precision highp iimageCubeArray ; +precision highp uimageCubeArray ; + +precision highp samplerCubeArray ; +precision highp samplerCubeArrayShadow; +precision highp isamplerCubeArray ; +precision highp usamplerCubeArray ; + +uniform writeonly imageCubeArray CA1; +uniform writeonly iimageCubeArray CA2; +uniform writeonly uimageCubeArray CA3; + +#ifdef GL_EXT_texture_cube_map_array +uniform samplerCubeArray CA4; +uniform samplerCubeArrayShadow CA5; +uniform isamplerCubeArray CA6; +uniform usamplerCubeArray CA7; +#endif + +void CAT() +{ + highp vec4 b4 = texture(CA4, vec4(0.5), 0.24); + highp ivec4 b6 = texture(CA6, vec4(0.5), 0.26); + highp uvec4 b7 = texture(CA7, vec4(0.5), 0.27); +} diff --git a/Test/310.vert b/Test/310.vert index 0c37fe00..53f5461f 100644 --- a/Test/310.vert +++ b/Test/310.vert @@ -231,3 +231,77 @@ void bufferT() highp ivec4 f2 = texelFetch(bufSamp2, s2); highp uvec4 f3 = texelFetch(bufSamp3, s3); } + +uniform writeonly imageCubeArray badCA1; // ERROR, reserved +uniform writeonly iimageCubeArray badCA2; // ERROR, reserved +uniform writeonly uimageCubeArray badCA3; // ERROR, reserved + +uniform samplerCubeArray badCA4; // ERROR, reserved +uniform samplerCubeArrayShadow badCA5; // ERROR, reserved +uniform isamplerCubeArray badCA6; // ERROR, reserved +uniform usamplerCubeArray badCA7; // ERROR, reserved + +#extension GL_OES_texture_cube_map_array : enable + +uniform writeonly imageCubeArray noPreCA1; // ERROR, no default precision +uniform writeonly iimageCubeArray noPreCA2; // ERROR, no default precision +uniform writeonly uimageCubeArray noPreCA3; // ERROR, no default precision + +uniform samplerCubeArray noPreCA4; // ERROR, no default precision +uniform samplerCubeArrayShadow noPreCA5; // ERROR, no default precision +uniform isamplerCubeArray noPreCA6; // ERROR, no default precision +uniform usamplerCubeArray noPreCA7; // ERROR, no default precision + +precision highp imageCubeArray ; +precision highp iimageCubeArray ; +precision highp uimageCubeArray ; + +precision highp samplerCubeArray ; +precision highp samplerCubeArrayShadow; +precision highp isamplerCubeArray ; +precision highp usamplerCubeArray ; + +uniform writeonly imageCubeArray CA1; +uniform writeonly iimageCubeArray CA2; +uniform writeonly uimageCubeArray CA3; + +#ifdef GL_OES_texture_cube_map_array +uniform samplerCubeArray CA4; +uniform samplerCubeArrayShadow CA5; +uniform isamplerCubeArray CA6; +uniform usamplerCubeArray CA7; +#endif + +void CAT() +{ + highp ivec3 s4 = textureSize(CA4, 1); + highp ivec3 s5 = textureSize(CA5, 1); + highp ivec3 s6 = textureSize(CA6, 1); + highp ivec3 s7 = textureSize(CA7, 1); + + highp vec4 t4 = texture(CA4, vec4(0.5)); + highp float t5 = texture(CA5, vec4(0.5), 3.0); + highp ivec4 t6 = texture(CA6, vec4(0.5)); + highp uvec4 t7 = texture(CA7, vec4(0.5)); + + highp vec4 L4 = textureLod(CA4, vec4(0.5), 0.24); + highp ivec4 L6 = textureLod(CA6, vec4(0.5), 0.26); + highp uvec4 L7 = textureLod(CA7, vec4(0.5), 0.27); + + highp vec4 g4 = textureGrad(CA4, vec4(0.5), vec3(0.1), vec3(0.2)); + highp ivec4 g6 = textureGrad(CA6, vec4(0.5), vec3(0.1), vec3(0.2)); + highp uvec4 g7 = textureGrad(CA7, vec4(0.5), vec3(0.1), vec3(0.2)); + + highp vec4 gath4 = textureGather(CA4, vec4(0.5)); + highp vec4 gathC4 = textureGather(CA4, vec4(0.5), 2); + highp ivec4 gath6 = textureGather(CA6, vec4(0.5)); + highp ivec4 gathC6 = textureGather(CA6, vec4(0.5), 1); + highp uvec4 gath7 = textureGather(CA7, vec4(0.5)); + highp uvec4 gathC7 = textureGather(CA7, vec4(0.5), 0); + + highp vec4 gath5 = textureGather(CA5, vec4(0.5), 2.5); + + highp ivec3 s1 = imageSize(CA1); + highp ivec3 s2 = imageSize(CA2); + highp ivec3 s3 = imageSize(CA3); +} diff --git a/Test/baseResults/310.frag.out b/Test/baseResults/310.frag.out index c74b9f0f..b33a0442 100644 --- a/Test/baseResults/310.frag.out +++ b/Test/baseResults/310.frag.out @@ -75,6 +75,7 @@ ERROR: 62 compilation errors. No code generated. Shader version: 310 Requested GL_EXT_shader_io_blocks +Requested GL_EXT_texture_cube_map_array Requested GL_OES_geometry_shader Requested GL_OES_gpu_shader5 Requested GL_OES_shader_io_blocks @@ -443,6 +444,45 @@ ERROR: node is still EOpNull! 0:223 0.100000 0:223 0.100000 0:223 'offsets' (uniform 4-element array of mediump 2-component vector of int) +0:248 Function Definition: CAT( (global void) +0:248 Function Parameters: +0:250 Sequence +0:250 Sequence +0:250 move second child to first child (temp highp 4-component vector of float) +0:250 'b4' (temp highp 4-component vector of float) +0:250 Function Call: texture(sAC1;vf4;f1; (global highp 4-component vector of float) +0:250 'CA4' (uniform highp samplerCubeArray) +0:250 Constant: +0:250 0.500000 +0:250 0.500000 +0:250 0.500000 +0:250 0.500000 +0:250 Constant: +0:250 0.240000 +0:251 Sequence +0:251 move second child to first child (temp highp 4-component vector of int) +0:251 'b6' (temp highp 4-component vector of int) +0:251 Function Call: texture(isAC1;vf4;f1; (global mediump 4-component vector of int) +0:251 'CA6' (uniform highp isamplerCubeArray) +0:251 Constant: +0:251 0.500000 +0:251 0.500000 +0:251 0.500000 +0:251 0.500000 +0:251 Constant: +0:251 0.260000 +0:252 Sequence +0:252 move second child to first child (temp highp 4-component vector of uint) +0:252 'b7' (temp highp 4-component vector of uint) +0:252 Function Call: texture(usAC1;vf4;f1; (global mediump 4-component vector of uint) +0:252 'CA7' (uniform highp usamplerCubeArray) +0:252 Constant: +0:252 0.500000 +0:252 0.500000 +0:252 0.500000 +0:252 0.500000 +0:252 Constant: +0:252 0.270000 0:? Linker Objects 0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float) 0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float) @@ -509,6 +549,13 @@ ERROR: node is still EOpNull! 0:? 0 (const int) 0:? 0 (const int) 0:? 0 (const int) +0:? 'CA1' (writeonly uniform highp imageCubeArray) +0:? 'CA2' (writeonly uniform highp iimageCubeArray) +0:? 'CA3' (writeonly uniform highp uimageCubeArray) +0:? 'CA4' (uniform highp samplerCubeArray) +0:? 'CA5' (uniform highp samplerCubeArrayShadow) +0:? 'CA6' (uniform highp isamplerCubeArray) +0:? 'CA7' (uniform highp usamplerCubeArray) Linked fragment stage: @@ -517,6 +564,7 @@ ERROR: Linking fragment stage: when more than one fragment shader output, all mu Shader version: 310 Requested GL_EXT_shader_io_blocks +Requested GL_EXT_texture_cube_map_array Requested GL_OES_geometry_shader Requested GL_OES_gpu_shader5 Requested GL_OES_shader_io_blocks @@ -885,6 +933,45 @@ ERROR: node is still EOpNull! 0:223 0.100000 0:223 0.100000 0:223 'offsets' (uniform 4-element array of mediump 2-component vector of int) +0:248 Function Definition: CAT( (global void) +0:248 Function Parameters: +0:250 Sequence +0:250 Sequence +0:250 move second child to first child (temp highp 4-component vector of float) +0:250 'b4' (temp highp 4-component vector of float) +0:250 Function Call: texture(sAC1;vf4;f1; (global highp 4-component vector of float) +0:250 'CA4' (uniform highp samplerCubeArray) +0:250 Constant: +0:250 0.500000 +0:250 0.500000 +0:250 0.500000 +0:250 0.500000 +0:250 Constant: +0:250 0.240000 +0:251 Sequence +0:251 move second child to first child (temp highp 4-component vector of int) +0:251 'b6' (temp highp 4-component vector of int) +0:251 Function Call: texture(isAC1;vf4;f1; (global mediump 4-component vector of int) +0:251 'CA6' (uniform highp isamplerCubeArray) +0:251 Constant: +0:251 0.500000 +0:251 0.500000 +0:251 0.500000 +0:251 0.500000 +0:251 Constant: +0:251 0.260000 +0:252 Sequence +0:252 move second child to first child (temp highp 4-component vector of uint) +0:252 'b7' (temp highp 4-component vector of uint) +0:252 Function Call: texture(usAC1;vf4;f1; (global mediump 4-component vector of uint) +0:252 'CA7' (uniform highp usamplerCubeArray) +0:252 Constant: +0:252 0.500000 +0:252 0.500000 +0:252 0.500000 +0:252 0.500000 +0:252 Constant: +0:252 0.270000 0:? Linker Objects 0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float) 0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float) @@ -951,4 +1038,11 @@ ERROR: node is still EOpNull! 0:? 0 (const int) 0:? 0 (const int) 0:? 0 (const int) +0:? 'CA1' (writeonly uniform highp imageCubeArray) +0:? 'CA2' (writeonly uniform highp iimageCubeArray) +0:? 'CA3' (writeonly uniform highp uimageCubeArray) +0:? 'CA4' (uniform highp samplerCubeArray) +0:? 'CA5' (uniform highp samplerCubeArrayShadow) +0:? 'CA6' (uniform highp isamplerCubeArray) +0:? 'CA7' (uniform highp usamplerCubeArray) diff --git a/Test/baseResults/310.vert.out b/Test/baseResults/310.vert.out index bc1e17ed..dee5d713 100644 --- a/Test/baseResults/310.vert.out +++ b/Test/baseResults/310.vert.out @@ -58,7 +58,28 @@ ERROR: 0:197: 'sampler/image' : type requires declaration of default precision q ERROR: 0:198: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:199: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:200: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 54 compilation errors. No code generated. +ERROR: 0:235: 'imageCubeArray' : Reserved word. +ERROR: 0:235: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:236: 'iimageCubeArray' : Reserved word. +ERROR: 0:236: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:237: 'uimageCubeArray' : Reserved word. +ERROR: 0:237: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:239: 'samplerCubeArray' : Reserved word. +ERROR: 0:239: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:240: 'samplerCubeArrayShadow' : Reserved word. +ERROR: 0:240: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:241: 'isamplerCubeArray' : Reserved word. +ERROR: 0:241: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:242: 'usamplerCubeArray' : Reserved word. +ERROR: 0:242: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:246: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:247: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:248: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:250: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:251: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:252: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 0:253: 'sampler/image' : type requires declaration of default precision qualifier +ERROR: 75 compilation errors. No code generated. Shader version: 310 @@ -66,6 +87,7 @@ Requested GL_EXT_texture_buffer Requested GL_OES_gpu_shader5 Requested GL_OES_shader_io_blocks Requested GL_OES_texture_buffer +Requested GL_OES_texture_cube_map_array ERROR: node is still EOpNull! 0:12 Function Definition: main( (global void) 0:12 Function Parameters: @@ -435,6 +457,262 @@ ERROR: node is still EOpNull! 0:232 Function Call: texelFetch(usB1;i1; (global highp 4-component vector of uint) 0:232 'bufSamp3' (uniform highp usamplerBuffer) 0:232 's3' (temp highp int) +0:275 Function Definition: CAT( (global void) +0:275 Function Parameters: +0:277 Sequence +0:277 Sequence +0:277 move second child to first child (temp highp 3-component vector of int) +0:277 's4' (temp highp 3-component vector of int) +0:277 Function Call: textureSize(sAC1;i1; (global highp 3-component vector of int) +0:277 'CA4' (uniform highp samplerCubeArray) +0:277 Constant: +0:277 1 (const int) +0:278 Sequence +0:278 move second child to first child (temp highp 3-component vector of int) +0:278 's5' (temp highp 3-component vector of int) +0:278 Function Call: textureSize(sASC1;i1; (global highp 3-component vector of int) +0:278 'CA5' (uniform highp samplerCubeArrayShadow) +0:278 Constant: +0:278 1 (const int) +0:279 Sequence +0:279 move second child to first child (temp highp 3-component vector of int) +0:279 's6' (temp highp 3-component vector of int) +0:279 Function Call: textureSize(isAC1;i1; (global highp 3-component vector of int) +0:279 'CA6' (uniform highp isamplerCubeArray) +0:279 Constant: +0:279 1 (const int) +0:280 Sequence +0:280 move second child to first child (temp highp 3-component vector of int) +0:280 's7' (temp highp 3-component vector of int) +0:280 Function Call: textureSize(usAC1;i1; (global highp 3-component vector of int) +0:280 'CA7' (uniform highp usamplerCubeArray) +0:280 Constant: +0:280 1 (const int) +0:282 Sequence +0:282 move second child to first child (temp highp 4-component vector of float) +0:282 't4' (temp highp 4-component vector of float) +0:282 Function Call: texture(sAC1;vf4; (global highp 4-component vector of float) +0:282 'CA4' (uniform highp samplerCubeArray) +0:282 Constant: +0:282 0.500000 +0:282 0.500000 +0:282 0.500000 +0:282 0.500000 +0:283 Sequence +0:283 move second child to first child (temp highp float) +0:283 't5' (temp highp float) +0:283 Function Call: texture(sASC1;vf4;f1; (global highp float) +0:283 'CA5' (uniform highp samplerCubeArrayShadow) +0:283 Constant: +0:283 0.500000 +0:283 0.500000 +0:283 0.500000 +0:283 0.500000 +0:283 Constant: +0:283 3.000000 +0:284 Sequence +0:284 move second child to first child (temp highp 4-component vector of int) +0:284 't6' (temp highp 4-component vector of int) +0:284 Function Call: texture(isAC1;vf4; (global highp 4-component vector of int) +0:284 'CA6' (uniform highp isamplerCubeArray) +0:284 Constant: +0:284 0.500000 +0:284 0.500000 +0:284 0.500000 +0:284 0.500000 +0:285 Sequence +0:285 move second child to first child (temp highp 4-component vector of uint) +0:285 't7' (temp highp 4-component vector of uint) +0:285 Function Call: texture(usAC1;vf4; (global highp 4-component vector of uint) +0:285 'CA7' (uniform highp usamplerCubeArray) +0:285 Constant: +0:285 0.500000 +0:285 0.500000 +0:285 0.500000 +0:285 0.500000 +0:287 Sequence +0:287 move second child to first child (temp highp 4-component vector of float) +0:287 'L4' (temp highp 4-component vector of float) +0:287 Function Call: textureLod(sAC1;vf4;f1; (global highp 4-component vector of float) +0:287 'CA4' (uniform highp samplerCubeArray) +0:287 Constant: +0:287 0.500000 +0:287 0.500000 +0:287 0.500000 +0:287 0.500000 +0:287 Constant: +0:287 0.240000 +0:288 Sequence +0:288 move second child to first child (temp highp 4-component vector of int) +0:288 'L6' (temp highp 4-component vector of int) +0:288 Function Call: textureLod(isAC1;vf4;f1; (global highp 4-component vector of int) +0:288 'CA6' (uniform highp isamplerCubeArray) +0:288 Constant: +0:288 0.500000 +0:288 0.500000 +0:288 0.500000 +0:288 0.500000 +0:288 Constant: +0:288 0.260000 +0:289 Sequence +0:289 move second child to first child (temp highp 4-component vector of uint) +0:289 'L7' (temp highp 4-component vector of uint) +0:289 Function Call: textureLod(usAC1;vf4;f1; (global highp 4-component vector of uint) +0:289 'CA7' (uniform highp usamplerCubeArray) +0:289 Constant: +0:289 0.500000 +0:289 0.500000 +0:289 0.500000 +0:289 0.500000 +0:289 Constant: +0:289 0.270000 +0:291 Sequence +0:291 move second child to first child (temp highp 4-component vector of float) +0:291 'g4' (temp highp 4-component vector of float) +0:291 Function Call: textureGrad(sAC1;vf4;vf3;vf3; (global highp 4-component vector of float) +0:291 'CA4' (uniform highp samplerCubeArray) +0:291 Constant: +0:291 0.500000 +0:291 0.500000 +0:291 0.500000 +0:291 0.500000 +0:291 Constant: +0:291 0.100000 +0:291 0.100000 +0:291 0.100000 +0:291 Constant: +0:291 0.200000 +0:291 0.200000 +0:291 0.200000 +0:292 Sequence +0:292 move second child to first child (temp highp 4-component vector of int) +0:292 'g6' (temp highp 4-component vector of int) +0:292 Function Call: textureGrad(isAC1;vf4;vf3;vf3; (global highp 4-component vector of int) +0:292 'CA6' (uniform highp isamplerCubeArray) +0:292 Constant: +0:292 0.500000 +0:292 0.500000 +0:292 0.500000 +0:292 0.500000 +0:292 Constant: +0:292 0.100000 +0:292 0.100000 +0:292 0.100000 +0:292 Constant: +0:292 0.200000 +0:292 0.200000 +0:292 0.200000 +0:293 Sequence +0:293 move second child to first child (temp highp 4-component vector of uint) +0:293 'g7' (temp highp 4-component vector of uint) +0:293 Function Call: textureGrad(usAC1;vf4;vf3;vf3; (global highp 4-component vector of uint) +0:293 'CA7' (uniform highp usamplerCubeArray) +0:293 Constant: +0:293 0.500000 +0:293 0.500000 +0:293 0.500000 +0:293 0.500000 +0:293 Constant: +0:293 0.100000 +0:293 0.100000 +0:293 0.100000 +0:293 Constant: +0:293 0.200000 +0:293 0.200000 +0:293 0.200000 +0:295 Sequence +0:295 move second child to first child (temp highp 4-component vector of float) +0:295 'gath4' (temp highp 4-component vector of float) +0:295 Function Call: textureGather(sAC1;vf4; (global highp 4-component vector of float) +0:295 'CA4' (uniform highp samplerCubeArray) +0:295 Constant: +0:295 0.500000 +0:295 0.500000 +0:295 0.500000 +0:295 0.500000 +0:296 Sequence +0:296 move second child to first child (temp highp 4-component vector of float) +0:296 'gathC4' (temp highp 4-component vector of float) +0:296 Function Call: textureGather(sAC1;vf4;i1; (global highp 4-component vector of float) +0:296 'CA4' (uniform highp samplerCubeArray) +0:296 Constant: +0:296 0.500000 +0:296 0.500000 +0:296 0.500000 +0:296 0.500000 +0:296 Constant: +0:296 2 (const int) +0:297 Sequence +0:297 move second child to first child (temp highp 4-component vector of int) +0:297 'gath6' (temp highp 4-component vector of int) +0:297 Function Call: textureGather(isAC1;vf4; (global highp 4-component vector of int) +0:297 'CA6' (uniform highp isamplerCubeArray) +0:297 Constant: +0:297 0.500000 +0:297 0.500000 +0:297 0.500000 +0:297 0.500000 +0:298 Sequence +0:298 move second child to first child (temp highp 4-component vector of int) +0:298 'gathC6' (temp highp 4-component vector of int) +0:298 Function Call: textureGather(isAC1;vf4;i1; (global highp 4-component vector of int) +0:298 'CA6' (uniform highp isamplerCubeArray) +0:298 Constant: +0:298 0.500000 +0:298 0.500000 +0:298 0.500000 +0:298 0.500000 +0:298 Constant: +0:298 1 (const int) +0:299 Sequence +0:299 move second child to first child (temp highp 4-component vector of uint) +0:299 'gath7' (temp highp 4-component vector of uint) +0:299 Function Call: textureGather(usAC1;vf4; (global highp 4-component vector of uint) +0:299 'CA7' (uniform highp usamplerCubeArray) +0:299 Constant: +0:299 0.500000 +0:299 0.500000 +0:299 0.500000 +0:299 0.500000 +0:300 Sequence +0:300 move second child to first child (temp highp 4-component vector of uint) +0:300 'gathC7' (temp highp 4-component vector of uint) +0:300 Function Call: textureGather(usAC1;vf4;i1; (global highp 4-component vector of uint) +0:300 'CA7' (uniform highp usamplerCubeArray) +0:300 Constant: +0:300 0.500000 +0:300 0.500000 +0:300 0.500000 +0:300 0.500000 +0:300 Constant: +0:300 0 (const int) +0:302 Sequence +0:302 move second child to first child (temp highp 4-component vector of float) +0:302 'gath5' (temp highp 4-component vector of float) +0:302 Function Call: textureGather(sASC1;vf4;f1; (global highp 4-component vector of float) +0:302 'CA5' (uniform highp samplerCubeArrayShadow) +0:302 Constant: +0:302 0.500000 +0:302 0.500000 +0:302 0.500000 +0:302 0.500000 +0:302 Constant: +0:302 2.500000 +0:304 Sequence +0:304 move second child to first child (temp highp 3-component vector of int) +0:304 's1' (temp highp 3-component vector of int) +0:304 Function Call: imageSize(IAC1; (global highp 3-component vector of int) +0:304 'CA1' (writeonly uniform highp imageCubeArray) +0:305 Sequence +0:305 move second child to first child (temp highp 3-component vector of int) +0:305 's2' (temp highp 3-component vector of int) +0:305 Function Call: imageSize(iIAC1; (global highp 3-component vector of int) +0:305 'CA2' (writeonly uniform highp iimageCubeArray) +0:306 Sequence +0:306 move second child to first child (temp highp 3-component vector of int) +0:306 's3' (temp highp 3-component vector of int) +0:306 Function Call: imageSize(uIAC1; (global highp 3-component vector of int) +0:306 'CA3' (writeonly uniform highp uimageCubeArray) 0:? Linker Objects 0:? 's' (shared highp 4-component vector of float) 0:? 'v' (buffer highp 4-component vector of float) @@ -502,6 +780,27 @@ ERROR: node is still EOpNull! 0:? 'bufSamp4' (writeonly uniform highp imageBuffer) 0:? 'bufSamp5' (writeonly uniform highp iimageBuffer) 0:? 'bufSamp6' (writeonly uniform highp uimageBuffer) +0:? 'badCA1' (writeonly uniform mediump imageCubeArray) +0:? 'badCA2' (writeonly uniform mediump iimageCubeArray) +0:? 'badCA3' (writeonly uniform mediump uimageCubeArray) +0:? 'badCA4' (uniform mediump samplerCubeArray) +0:? 'badCA5' (uniform mediump samplerCubeArrayShadow) +0:? 'badCA6' (uniform mediump isamplerCubeArray) +0:? 'badCA7' (uniform mediump usamplerCubeArray) +0:? 'noPreCA1' (writeonly uniform mediump imageCubeArray) +0:? 'noPreCA2' (writeonly uniform mediump iimageCubeArray) +0:? 'noPreCA3' (writeonly uniform mediump uimageCubeArray) +0:? 'noPreCA4' (uniform mediump samplerCubeArray) +0:? 'noPreCA5' (uniform mediump samplerCubeArrayShadow) +0:? 'noPreCA6' (uniform mediump isamplerCubeArray) +0:? 'noPreCA7' (uniform mediump usamplerCubeArray) +0:? 'CA1' (writeonly uniform highp imageCubeArray) +0:? 'CA2' (writeonly uniform highp iimageCubeArray) +0:? 'CA3' (writeonly uniform highp uimageCubeArray) +0:? 'CA4' (uniform highp samplerCubeArray) +0:? 'CA5' (uniform highp samplerCubeArrayShadow) +0:? 'CA6' (uniform highp isamplerCubeArray) +0:? 'CA7' (uniform highp usamplerCubeArray) 0:? 'gl_VertexID' (gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId) @@ -514,6 +813,7 @@ Requested GL_EXT_texture_buffer Requested GL_OES_gpu_shader5 Requested GL_OES_shader_io_blocks Requested GL_OES_texture_buffer +Requested GL_OES_texture_cube_map_array ERROR: node is still EOpNull! 0:12 Function Definition: main( (global void) 0:12 Function Parameters: @@ -883,6 +1183,262 @@ ERROR: node is still EOpNull! 0:232 Function Call: texelFetch(usB1;i1; (global highp 4-component vector of uint) 0:232 'bufSamp3' (uniform highp usamplerBuffer) 0:232 's3' (temp highp int) +0:275 Function Definition: CAT( (global void) +0:275 Function Parameters: +0:277 Sequence +0:277 Sequence +0:277 move second child to first child (temp highp 3-component vector of int) +0:277 's4' (temp highp 3-component vector of int) +0:277 Function Call: textureSize(sAC1;i1; (global highp 3-component vector of int) +0:277 'CA4' (uniform highp samplerCubeArray) +0:277 Constant: +0:277 1 (const int) +0:278 Sequence +0:278 move second child to first child (temp highp 3-component vector of int) +0:278 's5' (temp highp 3-component vector of int) +0:278 Function Call: textureSize(sASC1;i1; (global highp 3-component vector of int) +0:278 'CA5' (uniform highp samplerCubeArrayShadow) +0:278 Constant: +0:278 1 (const int) +0:279 Sequence +0:279 move second child to first child (temp highp 3-component vector of int) +0:279 's6' (temp highp 3-component vector of int) +0:279 Function Call: textureSize(isAC1;i1; (global highp 3-component vector of int) +0:279 'CA6' (uniform highp isamplerCubeArray) +0:279 Constant: +0:279 1 (const int) +0:280 Sequence +0:280 move second child to first child (temp highp 3-component vector of int) +0:280 's7' (temp highp 3-component vector of int) +0:280 Function Call: textureSize(usAC1;i1; (global highp 3-component vector of int) +0:280 'CA7' (uniform highp usamplerCubeArray) +0:280 Constant: +0:280 1 (const int) +0:282 Sequence +0:282 move second child to first child (temp highp 4-component vector of float) +0:282 't4' (temp highp 4-component vector of float) +0:282 Function Call: texture(sAC1;vf4; (global highp 4-component vector of float) +0:282 'CA4' (uniform highp samplerCubeArray) +0:282 Constant: +0:282 0.500000 +0:282 0.500000 +0:282 0.500000 +0:282 0.500000 +0:283 Sequence +0:283 move second child to first child (temp highp float) +0:283 't5' (temp highp float) +0:283 Function Call: texture(sASC1;vf4;f1; (global highp float) +0:283 'CA5' (uniform highp samplerCubeArrayShadow) +0:283 Constant: +0:283 0.500000 +0:283 0.500000 +0:283 0.500000 +0:283 0.500000 +0:283 Constant: +0:283 3.000000 +0:284 Sequence +0:284 move second child to first child (temp highp 4-component vector of int) +0:284 't6' (temp highp 4-component vector of int) +0:284 Function Call: texture(isAC1;vf4; (global highp 4-component vector of int) +0:284 'CA6' (uniform highp isamplerCubeArray) +0:284 Constant: +0:284 0.500000 +0:284 0.500000 +0:284 0.500000 +0:284 0.500000 +0:285 Sequence +0:285 move second child to first child (temp highp 4-component vector of uint) +0:285 't7' (temp highp 4-component vector of uint) +0:285 Function Call: texture(usAC1;vf4; (global highp 4-component vector of uint) +0:285 'CA7' (uniform highp usamplerCubeArray) +0:285 Constant: +0:285 0.500000 +0:285 0.500000 +0:285 0.500000 +0:285 0.500000 +0:287 Sequence +0:287 move second child to first child (temp highp 4-component vector of float) +0:287 'L4' (temp highp 4-component vector of float) +0:287 Function Call: textureLod(sAC1;vf4;f1; (global highp 4-component vector of float) +0:287 'CA4' (uniform highp samplerCubeArray) +0:287 Constant: +0:287 0.500000 +0:287 0.500000 +0:287 0.500000 +0:287 0.500000 +0:287 Constant: +0:287 0.240000 +0:288 Sequence +0:288 move second child to first child (temp highp 4-component vector of int) +0:288 'L6' (temp highp 4-component vector of int) +0:288 Function Call: textureLod(isAC1;vf4;f1; (global highp 4-component vector of int) +0:288 'CA6' (uniform highp isamplerCubeArray) +0:288 Constant: +0:288 0.500000 +0:288 0.500000 +0:288 0.500000 +0:288 0.500000 +0:288 Constant: +0:288 0.260000 +0:289 Sequence +0:289 move second child to first child (temp highp 4-component vector of uint) +0:289 'L7' (temp highp 4-component vector of uint) +0:289 Function Call: textureLod(usAC1;vf4;f1; (global highp 4-component vector of uint) +0:289 'CA7' (uniform highp usamplerCubeArray) +0:289 Constant: +0:289 0.500000 +0:289 0.500000 +0:289 0.500000 +0:289 0.500000 +0:289 Constant: +0:289 0.270000 +0:291 Sequence +0:291 move second child to first child (temp highp 4-component vector of float) +0:291 'g4' (temp highp 4-component vector of float) +0:291 Function Call: textureGrad(sAC1;vf4;vf3;vf3; (global highp 4-component vector of float) +0:291 'CA4' (uniform highp samplerCubeArray) +0:291 Constant: +0:291 0.500000 +0:291 0.500000 +0:291 0.500000 +0:291 0.500000 +0:291 Constant: +0:291 0.100000 +0:291 0.100000 +0:291 0.100000 +0:291 Constant: +0:291 0.200000 +0:291 0.200000 +0:291 0.200000 +0:292 Sequence +0:292 move second child to first child (temp highp 4-component vector of int) +0:292 'g6' (temp highp 4-component vector of int) +0:292 Function Call: textureGrad(isAC1;vf4;vf3;vf3; (global highp 4-component vector of int) +0:292 'CA6' (uniform highp isamplerCubeArray) +0:292 Constant: +0:292 0.500000 +0:292 0.500000 +0:292 0.500000 +0:292 0.500000 +0:292 Constant: +0:292 0.100000 +0:292 0.100000 +0:292 0.100000 +0:292 Constant: +0:292 0.200000 +0:292 0.200000 +0:292 0.200000 +0:293 Sequence +0:293 move second child to first child (temp highp 4-component vector of uint) +0:293 'g7' (temp highp 4-component vector of uint) +0:293 Function Call: textureGrad(usAC1;vf4;vf3;vf3; (global highp 4-component vector of uint) +0:293 'CA7' (uniform highp usamplerCubeArray) +0:293 Constant: +0:293 0.500000 +0:293 0.500000 +0:293 0.500000 +0:293 0.500000 +0:293 Constant: +0:293 0.100000 +0:293 0.100000 +0:293 0.100000 +0:293 Constant: +0:293 0.200000 +0:293 0.200000 +0:293 0.200000 +0:295 Sequence +0:295 move second child to first child (temp highp 4-component vector of float) +0:295 'gath4' (temp highp 4-component vector of float) +0:295 Function Call: textureGather(sAC1;vf4; (global highp 4-component vector of float) +0:295 'CA4' (uniform highp samplerCubeArray) +0:295 Constant: +0:295 0.500000 +0:295 0.500000 +0:295 0.500000 +0:295 0.500000 +0:296 Sequence +0:296 move second child to first child (temp highp 4-component vector of float) +0:296 'gathC4' (temp highp 4-component vector of float) +0:296 Function Call: textureGather(sAC1;vf4;i1; (global highp 4-component vector of float) +0:296 'CA4' (uniform highp samplerCubeArray) +0:296 Constant: +0:296 0.500000 +0:296 0.500000 +0:296 0.500000 +0:296 0.500000 +0:296 Constant: +0:296 2 (const int) +0:297 Sequence +0:297 move second child to first child (temp highp 4-component vector of int) +0:297 'gath6' (temp highp 4-component vector of int) +0:297 Function Call: textureGather(isAC1;vf4; (global highp 4-component vector of int) +0:297 'CA6' (uniform highp isamplerCubeArray) +0:297 Constant: +0:297 0.500000 +0:297 0.500000 +0:297 0.500000 +0:297 0.500000 +0:298 Sequence +0:298 move second child to first child (temp highp 4-component vector of int) +0:298 'gathC6' (temp highp 4-component vector of int) +0:298 Function Call: textureGather(isAC1;vf4;i1; (global highp 4-component vector of int) +0:298 'CA6' (uniform highp isamplerCubeArray) +0:298 Constant: +0:298 0.500000 +0:298 0.500000 +0:298 0.500000 +0:298 0.500000 +0:298 Constant: +0:298 1 (const int) +0:299 Sequence +0:299 move second child to first child (temp highp 4-component vector of uint) +0:299 'gath7' (temp highp 4-component vector of uint) +0:299 Function Call: textureGather(usAC1;vf4; (global highp 4-component vector of uint) +0:299 'CA7' (uniform highp usamplerCubeArray) +0:299 Constant: +0:299 0.500000 +0:299 0.500000 +0:299 0.500000 +0:299 0.500000 +0:300 Sequence +0:300 move second child to first child (temp highp 4-component vector of uint) +0:300 'gathC7' (temp highp 4-component vector of uint) +0:300 Function Call: textureGather(usAC1;vf4;i1; (global highp 4-component vector of uint) +0:300 'CA7' (uniform highp usamplerCubeArray) +0:300 Constant: +0:300 0.500000 +0:300 0.500000 +0:300 0.500000 +0:300 0.500000 +0:300 Constant: +0:300 0 (const int) +0:302 Sequence +0:302 move second child to first child (temp highp 4-component vector of float) +0:302 'gath5' (temp highp 4-component vector of float) +0:302 Function Call: textureGather(sASC1;vf4;f1; (global highp 4-component vector of float) +0:302 'CA5' (uniform highp samplerCubeArrayShadow) +0:302 Constant: +0:302 0.500000 +0:302 0.500000 +0:302 0.500000 +0:302 0.500000 +0:302 Constant: +0:302 2.500000 +0:304 Sequence +0:304 move second child to first child (temp highp 3-component vector of int) +0:304 's1' (temp highp 3-component vector of int) +0:304 Function Call: imageSize(IAC1; (global highp 3-component vector of int) +0:304 'CA1' (writeonly uniform highp imageCubeArray) +0:305 Sequence +0:305 move second child to first child (temp highp 3-component vector of int) +0:305 's2' (temp highp 3-component vector of int) +0:305 Function Call: imageSize(iIAC1; (global highp 3-component vector of int) +0:305 'CA2' (writeonly uniform highp iimageCubeArray) +0:306 Sequence +0:306 move second child to first child (temp highp 3-component vector of int) +0:306 's3' (temp highp 3-component vector of int) +0:306 Function Call: imageSize(uIAC1; (global highp 3-component vector of int) +0:306 'CA3' (writeonly uniform highp uimageCubeArray) 0:? Linker Objects 0:? 's' (shared highp 4-component vector of float) 0:? 'v' (buffer highp 4-component vector of float) @@ -950,6 +1506,27 @@ ERROR: node is still EOpNull! 0:? 'bufSamp4' (writeonly uniform highp imageBuffer) 0:? 'bufSamp5' (writeonly uniform highp iimageBuffer) 0:? 'bufSamp6' (writeonly uniform highp uimageBuffer) +0:? 'badCA1' (writeonly uniform mediump imageCubeArray) +0:? 'badCA2' (writeonly uniform mediump iimageCubeArray) +0:? 'badCA3' (writeonly uniform mediump uimageCubeArray) +0:? 'badCA4' (uniform mediump samplerCubeArray) +0:? 'badCA5' (uniform mediump samplerCubeArrayShadow) +0:? 'badCA6' (uniform mediump isamplerCubeArray) +0:? 'badCA7' (uniform mediump usamplerCubeArray) +0:? 'noPreCA1' (writeonly uniform mediump imageCubeArray) +0:? 'noPreCA2' (writeonly uniform mediump iimageCubeArray) +0:? 'noPreCA3' (writeonly uniform mediump uimageCubeArray) +0:? 'noPreCA4' (uniform mediump samplerCubeArray) +0:? 'noPreCA5' (uniform mediump samplerCubeArrayShadow) +0:? 'noPreCA6' (uniform mediump isamplerCubeArray) +0:? 'noPreCA7' (uniform mediump usamplerCubeArray) +0:? 'CA1' (writeonly uniform highp imageCubeArray) +0:? 'CA2' (writeonly uniform highp iimageCubeArray) +0:? 'CA3' (writeonly uniform highp uimageCubeArray) +0:? 'CA4' (uniform highp samplerCubeArray) +0:? 'CA5' (uniform highp samplerCubeArrayShadow) +0:? 'CA6' (uniform highp isamplerCubeArray) +0:? 'CA7' (uniform highp usamplerCubeArray) 0:? 'gl_VertexID' (gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId) diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 42e5217a..0ec183c3 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -1828,7 +1828,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile) TBasicType bTypes[3] = { EbtFloat, EbtInt, EbtUint }; bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140); - bool skipCubeArrayed = (profile == EEsProfile || version < 130); + bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130); // enumerate all the types for (int image = 0; image <= 1; ++image) { // loop over "bool" image vs sampler diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index f47f12ec..3c26155f 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -781,11 +781,13 @@ int TScanContext::tokenizeIdentifier() case IMAGE2DRECT: case IIMAGE2DRECT: case UIMAGE2DRECT: + afterType = true; return firstGenerationImage(false); case IMAGEBUFFER: case IIMAGEBUFFER: case UIMAGEBUFFER: + afterType = true; if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return firstGenerationImage(false); @@ -802,17 +804,24 @@ int TScanContext::tokenizeIdentifier() case IMAGE2DARRAY: case IIMAGE2DARRAY: case UIMAGE2DARRAY: + afterType = true; return firstGenerationImage(true); case IMAGECUBEARRAY: case IIMAGECUBEARRAY: - case UIMAGECUBEARRAY: + case UIMAGECUBEARRAY: + afterType = true; + if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + return keyword; + return secondGenerationImage(); + case IMAGE2DMS: case IIMAGE2DMS: case UIMAGE2DMS: case IMAGE2DMSARRAY: case IIMAGE2DMSARRAY: case UIMAGE2DMSARRAY: + afterType = true; return secondGenerationImage(); case DOUBLE: @@ -829,6 +838,8 @@ int TScanContext::tokenizeIdentifier() case ISAMPLERCUBEARRAY: case USAMPLERCUBEARRAY: afterType = true; + if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + return keyword; if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array))) reservedWord(); return keyword; @@ -1127,8 +1138,6 @@ int TScanContext::dMat() int TScanContext::firstGenerationImage(bool inEs310) { - afterType = true; - if (parseContext.symbolTable.atBuiltInLevel() || (parseContext.profile != EEsProfile && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310)) @@ -1149,8 +1158,6 @@ int TScanContext::firstGenerationImage(bool inEs310) int TScanContext::secondGenerationImage() { - afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version >= 310) { reservedWord(); return keyword; diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index 40f0fd76..504110bd 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -193,7 +193,7 @@ void TParseContext::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_EXT_tessellation_point_size] = EBhDisable; extensionBehavior[E_GL_EXT_texture_buffer] = EBhDisable; - extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisablePartial; + extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisable; // OES matching AEP extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable; @@ -204,7 +204,7 @@ void TParseContext::initializeExtensionBehavior() extensionBehavior[E_GL_OES_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_OES_tessellation_point_size] = EBhDisable; extensionBehavior[E_GL_OES_texture_buffer] = EBhDisable; - extensionBehavior[E_GL_OES_texture_cube_map_array] = EBhDisablePartial; + extensionBehavior[E_GL_OES_texture_cube_map_array] = EBhDisable; } // Get code that is not part of a shared symbol table, is specific to this shader,