From 5f6a185d0210fa6adf8bbcc4c2f4f3133e671001 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Tue, 15 Feb 2022 17:58:07 +0000 Subject: [PATCH] GLSL: implement textureNumLayers(), and update expectations. Bug: tint:1426 Change-Id: I609a34be458c14deef866ab66d7b57b8ee6316f2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80580 Reviewed-by: Ben Clayton Kokoro: Kokoro Commit-Queue: Stephen White --- src/writer/glsl/generator_impl.cc | 30 ++++++++++++- .../generator_impl_builtin_texture_test.cc | 2 + .../024820.wgsl.expected.glsl | 32 ++------------ .../053df7.wgsl.expected.glsl | 6 +-- .../058cc3.wgsl.expected.glsl | 6 +-- .../09d05d.wgsl.expected.glsl | 32 ++------------ .../13b4ce.wgsl.expected.glsl | 32 ++------------ .../22e53b.wgsl.expected.glsl | 32 ++------------ .../562013.wgsl.expected.glsl | 32 ++------------ .../5d59cd.wgsl.expected.glsl | 6 +-- .../68a65b.wgsl.expected.glsl | 32 ++------------ .../778bd1.wgsl.expected.glsl | 6 +-- .../7f1937.wgsl.expected.glsl | 6 +-- .../85f980.wgsl.expected.glsl | 6 +-- .../87953e.wgsl.expected.glsl | 32 ++------------ .../893e7c.wgsl.expected.glsl | 32 ++------------ .../9700fb.wgsl.expected.glsl | 32 ++------------ .../a216d2.wgsl.expected.glsl | 32 ++------------ .../cd5dc8.wgsl.expected.glsl | 32 ++------------ .../d5b228.wgsl.expected.glsl | 32 ++------------ .../e31be1.wgsl.expected.glsl | 32 ++------------ .../e653c0.wgsl.expected.glsl | 32 ++------------ .../ee942f.wgsl.expected.glsl | 32 ++------------ .../f33005.wgsl.expected.glsl | 32 ++------------ .../fcec98.wgsl.expected.glsl | 6 +-- .../ff5e89.wgsl.expected.glsl | 32 ++------------ ...AccessTest_Variable_0.spvasm.expected.glsl | 43 ------------------ ...AccessTest_Variable_1.spvasm.expected.glsl | 2 +- ...AccessTest_Variable_2.spvasm.expected.glsl | 43 ------------------ ...AccessTest_Variable_3.spvasm.expected.glsl | 2 +- ...AccessTest_Variable_0.spvasm.expected.glsl | 44 ------------------- 31 files changed, 104 insertions(+), 648 deletions(-) delete mode 100644 test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl delete mode 100644 test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.glsl delete mode 100644 test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc index 66bf4da6d7..022ade2f28 100644 --- a/src/writer/glsl/generator_impl.cc +++ b/src/writer/glsl/generator_impl.cc @@ -1279,8 +1279,34 @@ bool GeneratorImpl::EmitTextureCall(std::ostream& out, } return true; } - // TODO(senorblanco): determine if this works for array textures - case sem::BuiltinType::kTextureNumLayers: + case sem::BuiltinType::kTextureNumLayers: { + if (texture_type->Is()) { + out << "imageSize("; + } else { + out << "textureSize("; + } + // textureSize() on sampler2dArray returns the array size in the + // final component, so return it + if (!EmitExpression(out, texture)) { + return false; + } + // The LOD parameter is mandatory on textureSize() for non-multisampled + // textures. + if (!texture_type->Is() && + !texture_type->Is() && + !texture_type->Is()) { + out << ", "; + if (auto* level_arg = arg(Usage::kLevel)) { + if (!EmitExpression(out, level_arg)) { + return false; + } + } else { + out << "0"; + } + } + out << ").z"; + return true; + } case sem::BuiltinType::kTextureNumLevels: { out << "textureQueryLevels("; if (!EmitExpression(out, texture)) { diff --git a/src/writer/glsl/generator_impl_builtin_texture_test.cc b/src/writer/glsl/generator_impl_builtin_texture_test.cc index 8ec2019cdd..180119c6b0 100644 --- a/src/writer/glsl/generator_impl_builtin_texture_test.cc +++ b/src/writer/glsl/generator_impl_builtin_texture_test.cc @@ -103,7 +103,9 @@ ExpectedResult expected_texture_overload( case ValidTextureOverload::kNumLayersDepth2dArray: case ValidTextureOverload::kNumLayersCubeArray: case ValidTextureOverload::kNumLayersDepthCubeArray: + return {"textureSize"}; case ValidTextureOverload::kNumLayersStorageWO2dArray: + return {"imageSize"}; case ValidTextureOverload::kNumLevels2d: case ValidTextureOverload::kNumLevelsCube: case ValidTextureOverload::kNumLevelsDepth2d: diff --git a/test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl index 9aaedbf151..1f9bd05243 100644 --- a/test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/024820.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es uniform highp sampler2DArray arg_0_1; void textureNumLayers_024820() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; uniform highp sampler2DArray arg_0_1; void textureNumLayers_024820() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es uniform highp sampler2DArray arg_0_1; void textureNumLayers_024820() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl index a413d2685f..5fe042f9ca 100644 --- a/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/053df7.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED uniform highp usamplerCubeArray arg_0_1; void textureNumLayers_053df7() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; uniform highp usamplerCubeArray arg_0_1; void textureNumLayers_053df7() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. uniform highp usamplerCubeArray arg_0_1; void textureNumLayers_053df7() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl index 6470356842..44df962117 100644 --- a/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/058cc3.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED layout(rg32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_058cc3() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; layout(rg32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_058cc3() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. layout(rg32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_058cc3() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl index 703e836260..c86d2fb0ee 100644 --- a/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/09d05d.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureNumLayers_09d05d() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureNumLayers_09d05d() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureNumLayers_09d05d() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl index 43a852b6d0..3c9a7f2b4b 100644 --- a/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/13b4ce.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_13b4ce() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_13b4ce() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_13b4ce() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl index 3ca623d1ca..5c54b7e4e6 100644 --- a/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/22e53b.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_22e53b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_22e53b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_22e53b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl index d01feaa3e0..1a2892c527 100644 --- a/test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/562013.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_562013() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_562013() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_562013() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl index dbd85651b3..279b3d8dfd 100644 --- a/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/5d59cd.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED uniform highp samplerCubeArray arg_0_1; void textureNumLayers_5d59cd() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; uniform highp samplerCubeArray arg_0_1; void textureNumLayers_5d59cd() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. uniform highp samplerCubeArray arg_0_1; void textureNumLayers_5d59cd() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl index 452dfdc72f..5a0f0f5472 100644 --- a/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/68a65b.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_68a65b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_68a65b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_68a65b() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl index 125cf2db76..ea1d024d82 100644 --- a/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/778bd1.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED uniform highp samplerCubeArray arg_0_1; void textureNumLayers_778bd1() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; uniform highp samplerCubeArray arg_0_1; void textureNumLayers_778bd1() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. uniform highp samplerCubeArray arg_0_1; void textureNumLayers_778bd1() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl index 28b99e8683..ff4ca80683 100644 --- a/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/7f1937.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED layout(rg32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_7f1937() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; layout(rg32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_7f1937() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. layout(rg32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_7f1937() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl index 399cdf3f51..c050f364e4 100644 --- a/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/85f980.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED uniform highp isamplerCubeArray arg_0_1; void textureNumLayers_85f980() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; uniform highp isamplerCubeArray arg_0_1; void textureNumLayers_85f980() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. uniform highp isamplerCubeArray arg_0_1; void textureNumLayers_85f980() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl index c0108139e8..6783694dee 100644 --- a/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/87953e.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es uniform highp usampler2DArray arg_0_1; void textureNumLayers_87953e() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; uniform highp usampler2DArray arg_0_1; void textureNumLayers_87953e() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es uniform highp usampler2DArray arg_0_1; void textureNumLayers_87953e() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl index 8f091a42f2..9382cfb572 100644 --- a/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/893e7c.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es uniform highp isampler2DArray arg_0_1; void textureNumLayers_893e7c() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; uniform highp isampler2DArray arg_0_1; void textureNumLayers_893e7c() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es uniform highp isampler2DArray arg_0_1; void textureNumLayers_893e7c() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl index 92e6b9f382..a911859987 100644 --- a/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/9700fb.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_9700fb() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_9700fb() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_9700fb() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl index bb9a35d90c..42d58595e3 100644 --- a/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/a216d2.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_a216d2() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_a216d2() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_a216d2() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl index 0dbc40b84e..56c729c88c 100644 --- a/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/cd5dc8.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_cd5dc8() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_cd5dc8() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_cd5dc8() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl index 1c335a5723..3264a39e8e 100644 --- a/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/d5b228.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(r32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_d5b228() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_d5b228() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(r32f) uniform highp writeonly image2DArray arg_0; void textureNumLayers_d5b228() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl index caf4bee58f..5f39ba1624 100644 --- a/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/e31be1.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureNumLayers_e31be1() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureNumLayers_e31be1() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureNumLayers_e31be1() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl index ba34f649b6..bca9bd431c 100644 --- a/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/e653c0.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es uniform highp sampler2DArray arg_0_1; void textureNumLayers_e653c0() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; uniform highp sampler2DArray arg_0_1; void textureNumLayers_e653c0() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es uniform highp sampler2DArray arg_0_1; void textureNumLayers_e653c0() { - int res = textureQueryLevels(arg_0_1);; + int res = textureSize(arg_0_1, 0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl index 03aa7e9708..6dedd6e8a2 100644 --- a/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/ee942f.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ee942f() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ee942f() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ee942f() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl index c2d126397c..75841f8a20 100644 --- a/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/f33005.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_f33005() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_f33005() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureNumLayers_f33005() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl index cf93720f3d..5457d1ef38 100644 --- a/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/fcec98.wgsl.expected.glsl @@ -4,7 +4,7 @@ SKIP: FAILED layout(rg32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_fcec98() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -31,7 +31,7 @@ precision mediump float; layout(rg32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_fcec98() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -53,7 +53,7 @@ ERROR: 2 compilation errors. No code generated. layout(rg32ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_fcec98() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { diff --git a/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl index f08c2585e1..dc4d434868 100644 --- a/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl +++ b/test/builtins/gen/textureNumLayers/ff5e89.wgsl.expected.glsl @@ -1,10 +1,8 @@ -SKIP: FAILED - #version 310 es layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ff5e89() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } vec4 vertex_main() { @@ -19,20 +17,12 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ff5e89() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void fragment_main() { @@ -43,19 +33,11 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp mediump int' -ERROR: 0:6: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureNumLayers_ff5e89() { - int res = textureQueryLevels(arg_0);; + int res = imageSize(arg_0).z; } void compute_main() { @@ -67,11 +49,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl deleted file mode 100644 index 9a35a8e0cd..0000000000 --- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl +++ /dev/null @@ -1,43 +0,0 @@ -SKIP: FAILED - -#version 310 es -precision mediump float; - -uniform highp sampler2DArray x_20_1; -void main_1() { - float f1 = 1.0f; - vec2 vf12 = vec2(1.0f, 2.0f); - vec2 vf21 = vec2(2.0f, 1.0f); - vec3 vf123 = vec3(1.0f, 2.0f, 3.0f); - vec4 vf1234 = vec4(1.0f, 2.0f, 3.0f, 4.0f); - int i1 = 1; - ivec2 vi12 = ivec2(1, 2); - ivec3 vi123 = ivec3(1, 2, 3); - ivec4 vi1234 = ivec4(1, 2, 3, 4); - uint u1 = 1u; - uvec2 vu12 = uvec2(1u, 2u); - uvec3 vu123 = uvec3(1u, 2u, 3u); - uvec4 vu1234 = uvec4(1u, 2u, 3u, 4u); - float coords1 = 1.0f; - vec2 coords12 = vf12; - vec3 coords123 = vf123; - vec4 coords1234 = vf1234; - ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureQueryLevels(x_20_1);); - return; -} - -void tint_symbol() { - main_1(); -} - -void main() { - tint_symbol(); - return; -} -Error parsing GLSL shader: -ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:23: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.glsl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.glsl index 4ad3ddcdaa..8c3d29451c 100644 --- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.glsl +++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.glsl @@ -22,7 +22,7 @@ void main_1() { vec2 coords12 = vf12; vec3 coords123 = vf123; vec4 coords1234 = vf1234; - ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureQueryLevels(x_20_1);); + ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureSize(x_20_1, 0).z); return; } diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.glsl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.glsl deleted file mode 100644 index 9a35a8e0cd..0000000000 --- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.glsl +++ /dev/null @@ -1,43 +0,0 @@ -SKIP: FAILED - -#version 310 es -precision mediump float; - -uniform highp sampler2DArray x_20_1; -void main_1() { - float f1 = 1.0f; - vec2 vf12 = vec2(1.0f, 2.0f); - vec2 vf21 = vec2(2.0f, 1.0f); - vec3 vf123 = vec3(1.0f, 2.0f, 3.0f); - vec4 vf1234 = vec4(1.0f, 2.0f, 3.0f, 4.0f); - int i1 = 1; - ivec2 vi12 = ivec2(1, 2); - ivec3 vi123 = ivec3(1, 2, 3); - ivec4 vi1234 = ivec4(1, 2, 3, 4); - uint u1 = 1u; - uvec2 vu12 = uvec2(1u, 2u); - uvec3 vu123 = uvec3(1u, 2u, 3u); - uvec4 vu1234 = uvec4(1u, 2u, 3u, 4u); - float coords1 = 1.0f; - vec2 coords12 = vf12; - vec3 coords123 = vf123; - vec4 coords1234 = vf1234; - ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureQueryLevels(x_20_1);); - return; -} - -void tint_symbol() { - main_1(); -} - -void main() { - tint_symbol(); - return; -} -Error parsing GLSL shader: -ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:23: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.glsl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.glsl index 4ad3ddcdaa..8c3d29451c 100644 --- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.glsl +++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.glsl @@ -22,7 +22,7 @@ void main_1() { vec2 coords12 = vf12; vec3 coords123 = vf123; vec4 coords1234 = vf1234; - ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureQueryLevels(x_20_1);); + ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy, textureSize(x_20_1, 0).z); return; } diff --git a/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl b/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl deleted file mode 100644 index 649714b686..0000000000 --- a/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.glsl +++ /dev/null @@ -1,44 +0,0 @@ -SKIP: FAILED - -#version 310 es -precision mediump float; - -uniform highp sampler2DArray x_20_1; -void main_1() { - float f1 = 1.0f; - vec2 vf12 = vec2(1.0f, 2.0f); - vec2 vf21 = vec2(2.0f, 1.0f); - vec3 vf123 = vec3(1.0f, 2.0f, 3.0f); - vec4 vf1234 = vec4(1.0f, 2.0f, 3.0f, 4.0f); - int i1 = 1; - ivec2 vi12 = ivec2(1, 2); - ivec3 vi123 = ivec3(1, 2, 3); - ivec4 vi1234 = ivec4(1, 2, 3, 4); - uint u1 = 1u; - uvec2 vu12 = uvec2(1u, 2u); - uvec3 vu123 = uvec3(1u, 2u, 3u); - uvec4 vu1234 = uvec4(1u, 2u, 3u, 4u); - float coords1 = 1.0f; - vec2 coords12 = vf12; - vec3 coords123 = vf123; - vec4 coords1234 = vf1234; - ivec3 x_99 = ivec3(textureSize(x_20_1, 0).xy, textureQueryLevels(x_20_1);); - vec4 x_98 = texelFetch(x_20_1, ivec3(vi123.xy, vi123.z), 0); - return; -} - -void tint_symbol() { - main_1(); -} - -void main() { - tint_symbol(); - return; -} -Error parsing GLSL shader: -ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found -ERROR: 0:23: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - -