From bee5fa6881e30f595aad9cf3cabb606306069e26 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Mon, 28 Feb 2022 21:19:02 +0000 Subject: [PATCH] GLSL: implement pack/unpack builtins. Bug: tint:1428 Change-Id: Ic1db31feb6c6da4a98f6a37b40c77be887662825 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82200 Reviewed-by: Ben Clayton Kokoro: Kokoro Commit-Queue: Stephen White --- src/tint/writer/glsl/generator_impl.cc | 162 ++-------------- src/tint/writer/glsl/generator_impl.h | 16 -- .../glsl/generator_impl_builtin_test.cc | 175 ++++++++++-------- .../pack2x16float/0e97b3.wgsl.expected.glsl | 47 +---- .../pack2x16snorm/6c169b.wgsl.expected.glsl | 47 +---- .../pack2x16unorm/0f08e4.wgsl.expected.glsl | 47 +---- .../pack4x8snorm/4d22e7.wgsl.expected.glsl | 47 +---- .../pack4x8unorm/95c456.wgsl.expected.glsl | 47 +---- .../ba1481.wgsl.expected.glsl | 2 +- .../gen/textureLoad/8acf41.wgsl.expected.glsl | 2 +- .../979816.wgsl.expected.glsl | 2 +- .../unpack2x16float/32a5cf.wgsl.expected.glsl | 47 +---- .../unpack2x16snorm/b4aea6.wgsl.expected.glsl | 50 +---- .../unpack2x16unorm/7699c0.wgsl.expected.glsl | 50 +---- .../unpack4x8snorm/523fb3.wgsl.expected.glsl | 50 +---- .../unpack4x8unorm/750c74.wgsl.expected.glsl | 50 +---- ...0_DataPacking_Valid_0.spvasm.expected.glsl | 17 +- ...0_DataPacking_Valid_1.spvasm.expected.glsl | 17 +- ...0_DataPacking_Valid_2.spvasm.expected.glsl | 17 +- ...0_DataPacking_Valid_3.spvasm.expected.glsl | 17 +- ...0_DataPacking_Valid_4.spvasm.expected.glsl | 17 +- ...DataUnpacking_Valid_0.spvasm.expected.glsl | 18 +- ...DataUnpacking_Valid_1.spvasm.expected.glsl | 18 +- ...DataUnpacking_Valid_2.spvasm.expected.glsl | 18 +- ...DataUnpacking_Valid_3.spvasm.expected.glsl | 18 +- ...DataUnpacking_Valid_4.spvasm.expected.glsl | 17 +- .../0-opt.spvasm.expected.glsl | 18 +- .../0-opt.wgsl.expected.glsl | 18 +- .../0-opt.spvasm.expected.glsl | 18 +- .../0-opt.wgsl.expected.glsl | 18 +- .../0-opt.spvasm.expected.glsl | 25 +-- .../0-opt.wgsl.expected.glsl | 25 +-- .../0-opt.spvasm.expected.glsl | 25 +-- .../0-opt.wgsl.expected.glsl | 25 +-- .../0-opt.spvasm.expected.glsl | 25 +-- .../0-opt.wgsl.expected.glsl | 25 +-- .../0-opt.spvasm.expected.glsl | 25 +-- .../0-opt.wgsl.expected.glsl | 25 +-- .../0-opt.spvasm.expected.glsl | 17 +- .../0-opt.wgsl.expected.glsl | 17 +- .../0-opt.spvasm.expected.glsl | 25 +-- .../0-opt.wgsl.expected.glsl | 25 +-- .../0-opt.spvasm.expected.glsl | 18 +- .../0-opt.wgsl.expected.glsl | 18 +- 44 files changed, 191 insertions(+), 1216 deletions(-) diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc index 29d172c5da..909cfd6571 100644 --- a/src/tint/writer/glsl/generator_impl.cc +++ b/src/tint/writer/glsl/generator_impl.cc @@ -679,12 +679,6 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out, if (builtin->Type() == sem::BuiltinType::kFma && version_.IsES()) { return EmitEmulatedFMA(out, expr); } - if (builtin->IsDataPacking()) { - return EmitDataPackingCall(out, expr, builtin); - } - if (builtin->IsDataUnpacking()) { - return EmitDataUnpackingCall(out, expr, builtin); - } if (builtin->IsBarrier()) { return EmitBarrierCall(out, builtin); } @@ -1222,142 +1216,6 @@ bool GeneratorImpl::EmitRadiansCall(std::ostream& out, }); } -bool GeneratorImpl::EmitDataPackingCall(std::ostream& out, - const ast::CallExpression* expr, - const sem::Builtin* builtin) { - return CallBuiltinHelper( - out, expr, builtin, - [&](TextBuffer* b, const std::vector& params) { - uint32_t dims = 2; - bool is_signed = false; - uint32_t scale = 65535; - if (builtin->Type() == sem::BuiltinType::kPack4x8snorm || - builtin->Type() == sem::BuiltinType::kPack4x8unorm) { - dims = 4; - scale = 255; - } - if (builtin->Type() == sem::BuiltinType::kPack4x8snorm || - builtin->Type() == sem::BuiltinType::kPack2x16snorm) { - is_signed = true; - scale = (scale - 1) / 2; - } - switch (builtin->Type()) { - case sem::BuiltinType::kPack4x8snorm: - case sem::BuiltinType::kPack4x8unorm: - case sem::BuiltinType::kPack2x16snorm: - case sem::BuiltinType::kPack2x16unorm: { - { - auto l = line(b); - l << (is_signed ? "" : "u") << "int" << dims - << " i = " << (is_signed ? "" : "u") << "int" << dims - << "(round(clamp(" << params[0] << ", " - << (is_signed ? "-1.0" : "0.0") << ", 1.0) * " << scale - << ".0))"; - if (is_signed) { - l << " & " << (dims == 4 ? "0xff" : "0xffff"); - } - l << ";"; - } - { - auto l = line(b); - l << "return "; - if (is_signed) { - l << "asuint"; - } - l << "(i.x | i.y << " << (32 / dims); - if (dims == 4) { - l << " | i.z << 16 | i.w << 24"; - } - l << ");"; - } - break; - } - case sem::BuiltinType::kPack2x16float: { - line(b) << "uint2 i = f32tof16(" << params[0] << ");"; - line(b) << "return i.x | (i.y << 16);"; - break; - } - default: - diagnostics_.add_error( - diag::System::Writer, - "Internal error: unhandled data packing builtin"); - return false; - } - - return true; - }); -} - -bool GeneratorImpl::EmitDataUnpackingCall(std::ostream& out, - const ast::CallExpression* expr, - const sem::Builtin* builtin) { - return CallBuiltinHelper( - out, expr, builtin, - [&](TextBuffer* b, const std::vector& params) { - uint32_t dims = 2; - bool is_signed = false; - uint32_t scale = 65535; - if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm || - builtin->Type() == sem::BuiltinType::kUnpack4x8unorm) { - dims = 4; - scale = 255; - } - if (builtin->Type() == sem::BuiltinType::kUnpack4x8snorm || - builtin->Type() == sem::BuiltinType::kUnpack2x16snorm) { - is_signed = true; - scale = (scale - 1) / 2; - } - switch (builtin->Type()) { - case sem::BuiltinType::kUnpack4x8snorm: - case sem::BuiltinType::kUnpack2x16snorm: { - line(b) << "int j = int(" << params[0] << ");"; - { // Perform sign extension on the converted values. - auto l = line(b); - l << "int" << dims << " i = int" << dims << "("; - if (dims == 2) { - l << "j << 16, j) >> 16"; - } else { - l << "j << 24, j << 16, j << 8, j) >> 24"; - } - l << ";"; - } - line(b) << "return clamp(float" << dims << "(i) / " << scale - << ".0, " << (is_signed ? "-1.0" : "0.0") << ", 1.0);"; - break; - } - case sem::BuiltinType::kUnpack4x8unorm: - case sem::BuiltinType::kUnpack2x16unorm: { - line(b) << "uint j = " << params[0] << ";"; - { - auto l = line(b); - l << "uint" << dims << " i = uint" << dims << "("; - l << "j & " << (dims == 2 ? "0xffff" : "0xff") << ", "; - if (dims == 4) { - l << "(j >> " << (32 / dims) - << ") & 0xff, (j >> 16) & 0xff, j >> 24"; - } else { - l << "j >> " << (32 / dims); - } - l << ");"; - } - line(b) << "return float" << dims << "(i) / " << scale << ".0;"; - break; - } - case sem::BuiltinType::kUnpack2x16float: - line(b) << "uint i = " << params[0] << ";"; - line(b) << "return f16tof32(uint2(i & 0xffff, i >> 16));"; - break; - default: - diagnostics_.add_error( - diag::System::Writer, - "Internal error: unhandled data packing builtin"); - return false; - } - - return true; - }); -} - bool GeneratorImpl::EmitBarrierCall(std::ostream& out, const sem::Builtin* builtin) { // TODO(crbug.com/tint/661): Combine sequential barriers to a single @@ -1721,10 +1579,30 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) { return "isnan"; case sem::BuiltinType::kMix: return "mix"; + case sem::BuiltinType::kPack2x16float: + return "packHalf2x16"; + case sem::BuiltinType::kPack2x16snorm: + return "packSnorm2x16"; + case sem::BuiltinType::kPack2x16unorm: + return "packUnorm2x16"; + case sem::BuiltinType::kPack4x8snorm: + return "packSnorm4x8"; + case sem::BuiltinType::kPack4x8unorm: + return "packUnorm4x8"; case sem::BuiltinType::kReverseBits: return "bitfieldReverse"; case sem::BuiltinType::kSmoothStep: return "smoothstep"; + case sem::BuiltinType::kUnpack2x16float: + return "unpackHalf2x16"; + case sem::BuiltinType::kUnpack2x16snorm: + return "unpackSnorm2x16"; + case sem::BuiltinType::kUnpack2x16unorm: + return "unpackUnorm2x16"; + case sem::BuiltinType::kUnpack4x8snorm: + return "unpackSnorm4x8"; + case sem::BuiltinType::kUnpack4x8unorm: + return "unpackUnorm4x8"; default: diagnostics_.add_error( diag::System::Writer, diff --git a/src/tint/writer/glsl/generator_impl.h b/src/tint/writer/glsl/generator_impl.h index 61db755f79..73e08d5879 100644 --- a/src/tint/writer/glsl/generator_impl.h +++ b/src/tint/writer/glsl/generator_impl.h @@ -253,22 +253,6 @@ class GeneratorImpl : public TextGenerator { bool EmitRadiansCall(std::ostream& out, const ast::CallExpression* expr, const sem::Builtin* builtin); - /// Handles generating a call to data packing builtin - /// @param out the output of the expression stream - /// @param expr the call expression - /// @param builtin the semantic information for the texture builtin - /// @returns true if the call expression is emitted - bool EmitDataPackingCall(std::ostream& out, - const ast::CallExpression* expr, - const sem::Builtin* builtin); - /// Handles generating a call to data unpacking builtin - /// @param out the output of the expression stream - /// @param expr the call expression - /// @param builtin the semantic information for the texture builtin - /// @returns true if the call expression is emitted - bool EmitDataUnpackingCall(std::ostream& out, - const ast::CallExpression* expr, - const sem::Builtin* builtin); /// Handles a case statement /// @param stmt the statement /// @returns true if the statement was emitted successfully diff --git a/src/tint/writer/glsl/generator_impl_builtin_test.cc b/src/tint/writer/glsl/generator_impl_builtin_test.cc index bd36a99f39..fa11d2a21d 100644 --- a/src/tint/writer/glsl/generator_impl_builtin_test.cc +++ b/src/tint/writer/glsl/generator_impl_builtin_test.cc @@ -652,20 +652,22 @@ void main() { )"); } -#if 0 TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Snorm) { auto* call = Call("pack4x8snorm", "p1"); Global("p1", ty.vec4(), ast::StorageClass::kPrivate); WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("ivec4 tint_tmp = ivec4(round(clamp(p1, " - "-1.0, 1.0) * 127.0)) & 0xff;")); - EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 8 | " - "tint_tmp.z << 16 | tint_tmp.w << 24)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +vec4 p1 = vec4(0.0f, 0.0f, 0.0f, 0.0f); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + packSnorm4x8(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Unorm) { @@ -674,13 +676,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Unorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uvec4 tint_tmp = uvec4(round(clamp(p1, " - "0.0, 1.0) * 255.0));")); - EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 8 | " - "tint_tmp.z << 16 | tint_tmp.w << 24)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +vec4 p1 = vec4(0.0f, 0.0f, 0.0f, 0.0f); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + packUnorm4x8(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Snorm) { @@ -689,12 +694,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Snorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("int2 tint_tmp = int2(round(clamp(p1, " - "-1.0, 1.0) * 32767.0)) & 0xffff;")); - EXPECT_THAT(out.str(), HasSubstr("asuint(tint_tmp.x | tint_tmp.y << 16)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +vec2 p1 = vec2(0.0f, 0.0f); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + packSnorm2x16(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Unorm) { @@ -703,12 +712,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Unorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = uint2(round(clamp(p1, " - "0.0, 1.0) * 65535.0));")); - EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +vec2 p1 = vec2(0.0f, 0.0f); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + packUnorm2x16(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Float) { @@ -717,11 +730,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Float) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uint2 tint_tmp = f32tof16(p1);")); - EXPECT_THAT(out.str(), HasSubstr("(tint_tmp.x | tint_tmp.y << 16)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +vec2 p1 = vec2(0.0f, 0.0f); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + packHalf2x16(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Snorm) { @@ -730,15 +748,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Snorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);")); - EXPECT_THAT(gen.result(), - HasSubstr("ivec4 tint_tmp = ivec4(tint_tmp_1 << 24, tint_tmp_1 " - "<< 16, tint_tmp_1 << 8, tint_tmp_1) >> 24;")); - EXPECT_THAT(out.str(), - HasSubstr("clamp(float4(tint_tmp) / 127.0, -1.0, 1.0)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +uint p1 = 0u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + unpackSnorm4x8(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Unorm) { @@ -747,15 +766,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Unorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;")); - EXPECT_THAT( - gen.result(), - HasSubstr("uvec4 tint_tmp = uvec4(tint_tmp_1 & 0xff, (tint_tmp_1 >> " - "8) & 0xff, (tint_tmp_1 >> 16) & 0xff, tint_tmp_1 >> 24);")); - EXPECT_THAT(out.str(), HasSubstr("float4(tint_tmp) / 255.0")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +uint p1 = 0u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + unpackUnorm4x8(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Snorm) { @@ -764,15 +784,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Snorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("int tint_tmp_1 = int(p1);")); - EXPECT_THAT( - gen.result(), - HasSubstr("int2 tint_tmp = int2(tint_tmp_1 << 16, tint_tmp_1) >> 16;")); - EXPECT_THAT(out.str(), - HasSubstr("clamp(float2(tint_tmp) / 32767.0, -1.0, 1.0)")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +uint p1 = 0u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + unpackSnorm2x16(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Unorm) { @@ -781,14 +802,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Unorm) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp_1 = p1;")); - EXPECT_THAT(gen.result(), - HasSubstr("uint2 tint_tmp = uint2(tint_tmp_1 & 0xffff, " - "tint_tmp_1 >> 16);")); - EXPECT_THAT(out.str(), HasSubstr("float2(tint_tmp) / 65535.0")); + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es + +uint p1 = 0u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + unpackUnorm2x16(p1); + return; +} +)"); } TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) { @@ -797,15 +820,17 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) { WrapInFunction(CallStmt(call)); GeneratorImpl& gen = Build(); - gen.increment_indent(); - std::stringstream out; - ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); - EXPECT_THAT(gen.result(), HasSubstr("uint tint_tmp = p1;")); - EXPECT_THAT(out.str(), - HasSubstr("f16tof32(uint2(tint_tmp & 0xffff, tint_tmp >> 16))")); -} + ASSERT_TRUE(gen.Generate()) << gen.error(); + EXPECT_EQ(gen.result(), R"(#version 310 es -#endif +uint p1 = 0u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void test_function() { + unpackHalf2x16(p1); + return; +} +)"); +} TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) { Func("main", {}, ty.void_(), {CallStmt(Call("storageBarrier"))}, diff --git a/test/tint/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl b/test/tint/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl index 11af2aedca..27468e7e26 100644 --- a/test/tint/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/pack2x16float/0e97b3.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - - void pack2x16float_0e97b3() { - uint res = tint_pack2x16float(vec2(0.0f, 0.0f)); + uint res = packHalf2x16(vec2(0.0f, 0.0f)); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - - void pack2x16float_0e97b3() { - uint res = tint_pack2x16float(vec2(0.0f, 0.0f)); + uint res = packHalf2x16(vec2(0.0f, 0.0f)); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - - void pack2x16float_0e97b3() { - uint res = tint_pack2x16float(vec2(0.0f, 0.0f)); + uint res = packHalf2x16(vec2(0.0f, 0.0f)); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/tint/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl index e15e362cb3..bc7164a11c 100644 --- a/test/tint/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/pack2x16snorm/6c169b.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16snorm(vec2 param_0) { - int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff; - return asuint(i.x | i.y << 16); -} - - void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm(vec2(0.0f, 0.0f)); + uint res = packSnorm2x16(vec2(0.0f, 0.0f)); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -uint tint_pack2x16snorm(vec2 param_0) { - int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff; - return asuint(i.x | i.y << 16); -} - - void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm(vec2(0.0f, 0.0f)); + uint res = packSnorm2x16(vec2(0.0f, 0.0f)); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -uint tint_pack2x16snorm(vec2 param_0) { - int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff; - return asuint(i.x | i.y << 16); -} - - void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm(vec2(0.0f, 0.0f)); + uint res = packSnorm2x16(vec2(0.0f, 0.0f)); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/tint/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl index 8f028ded16..d4ad9c8585 100644 --- a/test/tint/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/pack2x16unorm/0f08e4.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - - void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm(vec2(0.0f, 0.0f)); + uint res = packUnorm2x16(vec2(0.0f, 0.0f)); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - - void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm(vec2(0.0f, 0.0f)); + uint res = packUnorm2x16(vec2(0.0f, 0.0f)); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - - void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm(vec2(0.0f, 0.0f)); + uint res = packUnorm2x16(vec2(0.0f, 0.0f)); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/tint/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl index 680b2c60ae..8692cdc8d1 100644 --- a/test/tint/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/pack4x8snorm/4d22e7.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packSnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packSnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packSnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl b/test/tint/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl index 0cd9a8ab60..9110f4c405 100644 --- a/test/tint/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/pack4x8unorm/95c456.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packUnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packUnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm(vec4(0.0f, 0.0f, 0.0f, 0.0f)); + uint res = packUnorm4x8(vec4(0.0f, 0.0f, 0.0f, 0.0f)); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl b/test/tint/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl index da9e40cb97..f425bb6262 100644 --- a/test/tint/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl +++ b/test/tint/builtins/gen/textureDimensions/ba1481.wgsl.expected.glsl @@ -1,6 +1,6 @@ SKIP: FAILED -../../src/tint/writer/glsl/generator_impl.cc:2656 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2533 internal compiler error: Multiplanar external texture transform was not run. ******************************************************************** diff --git a/test/tint/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl index da9e40cb97..f425bb6262 100644 --- a/test/tint/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/textureLoad/8acf41.wgsl.expected.glsl @@ -1,6 +1,6 @@ SKIP: FAILED -../../src/tint/writer/glsl/generator_impl.cc:2656 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2533 internal compiler error: Multiplanar external texture transform was not run. ******************************************************************** diff --git a/test/tint/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl b/test/tint/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl index da9e40cb97..f425bb6262 100644 --- a/test/tint/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl +++ b/test/tint/builtins/gen/textureSampleLevel/979816.wgsl.expected.glsl @@ -1,6 +1,6 @@ SKIP: FAILED -../../src/tint/writer/glsl/generator_impl.cc:2656 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2533 internal compiler error: Multiplanar external texture transform was not run. ******************************************************************** diff --git a/test/tint/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl b/test/tint/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl index 9d16a425fe..be3341d6c3 100644 --- a/test/tint/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/unpack2x16float/32a5cf.wgsl.expected.glsl @@ -1,15 +1,7 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16float(uint param_0) { - uint i = param_0; - return f16tof32(uint2(i & 0xffff, i >> 16)); -} - - void unpack2x16float_32a5cf() { - vec2 res = tint_unpack2x16float(1u); + vec2 res = unpackHalf2x16(1u); } vec4 vertex_main() { @@ -24,24 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp highp uint' and a right operand of type ' const int' (or there is no acceptable conversion) -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -vec2 tint_unpack2x16float(uint param_0) { - uint i = param_0; - return f16tof32(uint2(i & 0xffff, i >> 16)); -} - - void unpack2x16float_32a5cf() { - vec2 res = tint_unpack2x16float(1u); + vec2 res = unpackHalf2x16(1u); } void fragment_main() { @@ -52,23 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp mediump uint' and a right operand of type ' const int' (or there is no acceptable conversion) -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -vec2 tint_unpack2x16float(uint param_0) { - uint i = param_0; - return f16tof32(uint2(i & 0xffff, i >> 16)); -} - - void unpack2x16float_32a5cf() { - vec2 res = tint_unpack2x16float(1u); + vec2 res = unpackHalf2x16(1u); } void compute_main() { @@ -80,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp highp uint' and a right operand of type ' const int' (or there is no acceptable conversion) -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl b/test/tint/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl index f46f3072c0..406d8848ea 100644 --- a/test/tint/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/unpack2x16snorm/b4aea6.wgsl.expected.glsl @@ -1,16 +1,7 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16snorm(uint param_0) { - int j = int(param_0); - int2 i = int2(j << 16, j) >> 16; - return clamp(float2(i) / 32767.0, -1.0, 1.0); -} - - void unpack2x16snorm_b4aea6() { - vec2 res = tint_unpack2x16snorm(1u); + vec2 res = unpackSnorm2x16(1u); } vec4 vertex_main() { @@ -25,25 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -vec2 tint_unpack2x16snorm(uint param_0) { - int j = int(param_0); - int2 i = int2(j << 16, j) >> 16; - return clamp(float2(i) / 32767.0, -1.0, 1.0); -} - - void unpack2x16snorm_b4aea6() { - vec2 res = tint_unpack2x16snorm(1u); + vec2 res = unpackSnorm2x16(1u); } void fragment_main() { @@ -54,24 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'int2' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -vec2 tint_unpack2x16snorm(uint param_0) { - int j = int(param_0); - int2 i = int2(j << 16, j) >> 16; - return clamp(float2(i) / 32767.0, -1.0, 1.0); -} - - void unpack2x16snorm_b4aea6() { - vec2 res = tint_unpack2x16snorm(1u); + vec2 res = unpackSnorm2x16(1u); } void compute_main() { @@ -83,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl b/test/tint/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl index 152e9edee3..3b8d38a142 100644 --- a/test/tint/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/unpack2x16unorm/7699c0.wgsl.expected.glsl @@ -1,16 +1,7 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16unorm(uint param_0) { - uint j = param_0; - uint2 i = uint2(j & 0xffff, j >> 16); - return float2(i) / 65535.0; -} - - void unpack2x16unorm_7699c0() { - vec2 res = tint_unpack2x16unorm(1u); + vec2 res = unpackUnorm2x16(1u); } vec4 vertex_main() { @@ -25,25 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -vec2 tint_unpack2x16unorm(uint param_0) { - uint j = param_0; - uint2 i = uint2(j & 0xffff, j >> 16); - return float2(i) / 65535.0; -} - - void unpack2x16unorm_7699c0() { - vec2 res = tint_unpack2x16unorm(1u); + vec2 res = unpackUnorm2x16(1u); } void fragment_main() { @@ -54,24 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint2' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -vec2 tint_unpack2x16unorm(uint param_0) { - uint j = param_0; - uint2 i = uint2(j & 0xffff, j >> 16); - return float2(i) / 65535.0; -} - - void unpack2x16unorm_7699c0() { - vec2 res = tint_unpack2x16unorm(1u); + vec2 res = unpackUnorm2x16(1u); } void compute_main() { @@ -83,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl b/test/tint/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl index dd61808db3..997e9fd69c 100644 --- a/test/tint/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/unpack4x8snorm/523fb3.wgsl.expected.glsl @@ -1,16 +1,7 @@ -SKIP: FAILED - #version 310 es -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - void unpack4x8snorm_523fb3() { - vec4 res = tint_unpack4x8snorm(1u); + vec4 res = unpackSnorm4x8(1u); } vec4 vertex_main() { @@ -25,25 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - void unpack4x8snorm_523fb3() { - vec4 res = tint_unpack4x8snorm(1u); + vec4 res = unpackSnorm4x8(1u); } void fragment_main() { @@ -54,24 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'int4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - void unpack4x8snorm_523fb3() { - vec4 res = tint_unpack4x8snorm(1u); + vec4 res = unpackSnorm4x8(1u); } void compute_main() { @@ -83,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl b/test/tint/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl index 86df7099ae..986396ee7d 100644 --- a/test/tint/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/unpack4x8unorm/750c74.wgsl.expected.glsl @@ -1,16 +1,7 @@ -SKIP: FAILED - #version 310 es -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - void unpack4x8unorm_750c74() { - vec4 res = tint_unpack4x8unorm(1u); + vec4 res = unpackUnorm4x8(1u); } vec4 vertex_main() { @@ -25,25 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - void unpack4x8unorm_750c74() { - vec4 res = tint_unpack4x8unorm(1u); + vec4 res = unpackUnorm4x8(1u); } void fragment_main() { @@ -54,24 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - void unpack4x8unorm_750c74() { - vec4 res = tint_unpack4x8unorm(1u); + vec4 res = unpackUnorm4x8(1u); } void compute_main() { @@ -83,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_0.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_0.spvasm.expected.glsl index 38a13594b4..d00125d063 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_0.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_0.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - uint x_1 = tint_pack4x8snorm(v4f1); + uint x_1 = packSnorm4x8(v4f1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_1.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_1.spvasm.expected.glsl index 83031c084e..3d81481ea4 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_1.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_1.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - uint x_1 = tint_pack4x8unorm(v4f1); + uint x_1 = packUnorm4x8(v4f1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint4' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_2.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_2.spvasm.expected.glsl index ec62e1638d..0e2e162341 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_2.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_2.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16snorm(vec2 param_0) { - int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff; - return asuint(i.x | i.y << 16); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - uint x_1 = tint_pack2x16snorm(v2f1); + uint x_1 = packSnorm2x16(v2f1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'int2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_3.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_3.spvasm.expected.glsl index 754bb5b6eb..c4f2a07156 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_3.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_3.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - uint x_1 = tint_pack2x16unorm(v2f1); + uint x_1 = packUnorm2x16(v2f1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_4.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_4.spvasm.expected.glsl index 965070c83f..42f03126fa 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_4.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataPacking_Valid_4.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - uint x_1 = tint_pack2x16float(v2f1); + uint x_1 = packHalf2x16(v2f1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'uint2' : undeclared identifier -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_0.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_0.spvasm.expected.glsl index ead9157395..8881c43b5c 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_0.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_0.spvasm.expected.glsl @@ -1,14 +1,5 @@ -SKIP: FAILED - #version 310 es -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -32,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - vec4 x_1 = tint_unpack4x8snorm(u1); + vec4 x_1 = unpackSnorm4x8(u1); return; } @@ -45,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_1.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_1.spvasm.expected.glsl index 5bbf757a6e..c709203775 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_1.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_1.spvasm.expected.glsl @@ -1,14 +1,5 @@ -SKIP: FAILED - #version 310 es -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -32,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - vec4 x_1 = tint_unpack4x8unorm(u1); + vec4 x_1 = unpackUnorm4x8(u1); return; } @@ -45,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_2.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_2.spvasm.expected.glsl index 57667cfac0..3def377bcd 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_2.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_2.spvasm.expected.glsl @@ -1,14 +1,5 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16snorm(uint param_0) { - int j = int(param_0); - int2 i = int2(j << 16, j) >> 16; - return clamp(float2(i) / 32767.0, -1.0, 1.0); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -32,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - vec2 x_1 = tint_unpack2x16snorm(u1); + vec2 x_1 = unpackSnorm2x16(u1); return; } @@ -45,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_3.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_3.spvasm.expected.glsl index 023ac6d328..f8703b362a 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_3.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_3.spvasm.expected.glsl @@ -1,14 +1,5 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16unorm(uint param_0) { - uint j = param_0; - uint2 i = uint2(j & 0xffff, j >> 16); - return float2(i) / 65535.0; -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -32,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - vec2 x_1 = tint_unpack2x16unorm(u1); + vec2 x_1 = unpackUnorm2x16(u1); return; } @@ -45,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_4.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_4.spvasm.expected.glsl index 2ec29a6c3d..2260b08f9b 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_4.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_DataUnpacking_Valid_4.spvasm.expected.glsl @@ -1,13 +1,5 @@ -SKIP: FAILED - #version 310 es -vec2 tint_unpack2x16float(uint param_0) { - uint i = param_0; - return f16tof32(uint2(i & 0xffff, i >> 16)); -} - - void main_1() { uint u1 = 10u; uint u2 = 15u; @@ -31,7 +23,7 @@ void main_1() { vec3 v3f2 = vec3(60.0f, 70.0f, 50.0f); vec4 v4f1 = vec4(50.0f, 50.0f, 50.0f, 50.0f); vec4 v4f2 = v4f1; - vec2 x_1 = tint_unpack2x16float(u1); + vec2 x_1 = unpackHalf2x16(u1); return; } @@ -44,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:5: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp highp uint' and a right operand of type ' const int' (or there is no acceptable conversion) -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.glsl index ce822d7ec0..35dd0ee540 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.glsl @@ -1,15 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { int el; @@ -36,7 +27,7 @@ void main_1() { } else { break; } - v = tint_unpack4x8unorm(100u); + v = unpackUnorm4x8(100u); float x_42 = v.x; if ((int(x_42) > i)) { int x_49 = x_6.x_GLF_uniform_int_values[1].el; @@ -71,10 +62,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.glsl index 130cb5f98e..167a76cdc0 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -7,13 +5,6 @@ type Arr = @stride(16) array; #version 310 es precision mediump float; -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { int el; @@ -40,7 +31,7 @@ void main_1() { } else { break; } - v = tint_unpack4x8unorm(100u); + v = unpackUnorm4x8(100u); float x_42 = v.x; if ((int(x_42) > i)) { int x_49 = x_6.x_GLF_uniform_int_values[1].el; @@ -75,10 +66,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.glsl index 3765e73e1b..f19877c520 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.glsl @@ -1,15 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { float el; @@ -106,7 +97,7 @@ void main_1() { x_GLF_color = vec4(x_64, x_66, x_68, x_70); } else { uint x_73 = x_16.x_GLF_uniform_uint_values[0].el; - x_GLF_color = tint_unpack4x8snorm(x_73); + x_GLF_color = unpackSnorm4x8(x_73); } int x_76 = x_12.x_GLF_uniform_int_values[2].el; a_1 = x_76; @@ -148,10 +139,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'int4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.glsl index 89c8827564..ccb260340e 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -15,13 +13,6 @@ type Arr_2 = @stride(16) array; #version 310 es precision mediump float; -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { float el; @@ -118,7 +109,7 @@ void main_1() { x_GLF_color = vec4(x_64, x_66, x_68, x_70); } else { uint x_73 = x_16.x_GLF_uniform_uint_values[0].el; - x_GLF_color = tint_unpack4x8snorm(x_73); + x_GLF_color = unpackSnorm4x8(x_73); } int x_76 = x_12.x_GLF_uniform_int_values[2].el; a_1 = x_76; @@ -160,10 +151,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'int4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.glsl index 5328e561ee..3abbce5bab 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.spvasm.expected.glsl @@ -1,20 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { float el; @@ -52,8 +38,8 @@ void main_1() { bool x_98_phi = false; bool x_110_phi = false; float x_36 = x_6.x_GLF_uniform_float_values[0].el; - a = tint_pack4x8unorm(vec4(x_36, x_36, x_36, x_36)); - v1 = tint_unpack4x8snorm(a); + a = packUnorm4x8(vec4(x_36, x_36, x_36, x_36)); + v1 = unpackSnorm4x8(a); float x_42 = x_6.x_GLF_uniform_float_values[0].el; float x_45 = x_6.x_GLF_uniform_float_values[1].el; float x_48 = x_6.x_GLF_uniform_float_values[0].el; @@ -126,10 +112,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.glsl index 12038bd0f5..7faa5ad5d7 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -11,18 +9,6 @@ type Arr_1 = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { float el; @@ -60,8 +46,8 @@ void main_1() { bool x_98_phi = false; bool x_110_phi = false; float x_36 = x_6.x_GLF_uniform_float_values[0].el; - a = tint_pack4x8unorm(vec4(x_36, x_36, x_36, x_36)); - v1 = tint_unpack4x8snorm(a); + a = packUnorm4x8(vec4(x_36, x_36, x_36, x_36)); + v1 = unpackSnorm4x8(a); float x_42 = x_6.x_GLF_uniform_float_values[0].el; float x_45 = x_6.x_GLF_uniform_float_values[1].el; float x_48 = x_6.x_GLF_uniform_float_values[0].el; @@ -134,10 +120,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.glsl index 26f997764b..b1895a1d3c 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.glsl @@ -1,20 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { float el; @@ -53,8 +39,8 @@ void main_1() { bool x_110_phi = false; float x_41 = x_6.x_GLF_uniform_float_values[0].el; float x_43 = x_6.x_GLF_uniform_float_values[1].el; - a = tint_pack2x16unorm(vec2(x_41, x_43)); - v1 = tint_unpack4x8snorm(a); + a = packUnorm2x16(vec2(x_41, x_43)); + v1 = unpackSnorm4x8(a); E = 0.01f; int x_49 = x_10.x_GLF_uniform_int_values[2].el; float x_51 = v1[x_49]; @@ -118,10 +104,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.glsl index 606777591e..8ecc0b47bd 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -11,18 +9,6 @@ type Arr_1 = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack2x16unorm(vec2 param_0) { - uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0)); - return (i.x | i.y << 16); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { float el; @@ -61,8 +47,8 @@ void main_1() { bool x_110_phi = false; float x_41 = x_6.x_GLF_uniform_float_values[0].el; float x_43 = x_6.x_GLF_uniform_float_values[1].el; - a = tint_pack2x16unorm(vec2(x_41, x_43)); - v1 = tint_unpack4x8snorm(a); + a = packUnorm2x16(vec2(x_41, x_43)); + v1 = unpackSnorm4x8(a); E = 0.01f; int x_49 = x_10.x_GLF_uniform_int_values[2].el; float x_51 = v1[x_49]; @@ -126,10 +112,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.glsl index 06e12be1ae..ae02c11479 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.glsl @@ -1,20 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { int el; @@ -51,8 +37,8 @@ void main_1() { bool x_70_phi = false; bool x_86_phi = false; bool x_102_phi = false; - a = tint_pack2x16float(vec2(1.0f, 1.0f)); - v1 = tint_unpack4x8snorm(a); + a = packHalf2x16(vec2(1.0f, 1.0f)); + v1 = unpackSnorm4x8(a); E = 0.01f; int x_43 = x_8.x_GLF_uniform_int_values[1].el; float x_45 = v1[x_43]; @@ -117,10 +103,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.glsl index 64925a1871..d06cbeae93 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -11,18 +9,6 @@ type Arr_1 = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - -vec4 tint_unpack4x8snorm(uint param_0) { - int j = int(param_0); - int4 i = int4(j << 24, j << 16, j << 8, j) >> 24; - return clamp(float4(i) / 127.0, -1.0, 1.0); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { int el; @@ -59,8 +45,8 @@ void main_1() { bool x_70_phi = false; bool x_86_phi = false; bool x_102_phi = false; - a = tint_pack2x16float(vec2(1.0f, 1.0f)); - v1 = tint_unpack4x8snorm(a); + a = packHalf2x16(vec2(1.0f, 1.0f)); + v1 = unpackSnorm4x8(a); E = 0.01f; int x_43 = x_8.x_GLF_uniform_int_values[1].el; float x_45 = v1[x_43]; @@ -125,10 +111,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.glsl index 51ebfc58f4..ead40145ba 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.glsl @@ -1,20 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { float el; @@ -52,8 +38,8 @@ void main_1() { bool x_86_phi = false; bool x_102_phi = false; float x_35 = x_6.x_GLF_uniform_float_values[1].el; - a = tint_pack4x8snorm(vec4(x_35, x_35, x_35, x_35)); - v1 = tint_unpack4x8unorm(a); + a = packSnorm4x8(vec4(x_35, x_35, x_35, x_35)); + v1 = unpackUnorm4x8(a); float x_41 = x_6.x_GLF_uniform_float_values[0].el; E = x_41; int x_43 = x_10.x_GLF_uniform_int_values[1].el; @@ -119,10 +105,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.glsl index 471a1b83e6..b841f87f6b 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -11,18 +9,6 @@ type Arr_1 = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack4x8snorm(vec4 param_0) { - int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff; - return asuint(i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { float el; @@ -60,8 +46,8 @@ void main_1() { bool x_86_phi = false; bool x_102_phi = false; float x_35 = x_6.x_GLF_uniform_float_values[1].el; - a = tint_pack4x8snorm(vec4(x_35, x_35, x_35, x_35)); - v1 = tint_unpack4x8unorm(a); + a = packSnorm4x8(vec4(x_35, x_35, x_35, x_35)); + v1 = unpackUnorm4x8(a); float x_41 = x_6.x_GLF_uniform_float_values[0].el; E = x_41; int x_43 = x_10.x_GLF_uniform_int_values[1].el; @@ -127,10 +113,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'int4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.glsl index 79efa57aa3..0d4f2d59de 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.glsl @@ -1,14 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct buf1 { uint one; @@ -53,7 +45,7 @@ void main_1() { float x_42 = func_(); v = vec4(x_42, x_42, x_42, x_42); } - if ((tint_pack4x8unorm(v) == 1u)) { + if ((packUnorm4x8(v) == 1u)) { return; } uint x_50 = x_8.one; @@ -83,10 +75,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.glsl index 6cc7b62e73..4da8b75800 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl:5:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -7,12 +5,6 @@ type Arr = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack4x8unorm(vec4 param_0) { - uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0)); - return (i.x | i.y << 8 | i.z << 16 | i.w << 24); -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct buf1 { uint one; @@ -57,7 +49,7 @@ void main_1() { float x_42 = func_(); v = vec4(x_42, x_42, x_42, x_42); } - if ((tint_pack4x8unorm(v) == 1u)) { + if ((packUnorm4x8(v) == 1u)) { return; } uint x_50 = x_8.one; @@ -87,10 +79,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint4' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.glsl index 7c17275f60..5f1746ca03 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.glsl @@ -1,20 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { float el; @@ -51,8 +37,8 @@ void main_1() { bool x_86_phi = false; bool x_102_phi = false; bool x_118_phi = false; - a = tint_pack2x16float(vec2(1.0f, 1.0f)); - values = tint_unpack4x8unorm(a); + a = packHalf2x16(vec2(1.0f, 1.0f)); + values = unpackUnorm4x8(a); float x_41 = x_8.x_GLF_uniform_float_values[3].el; float x_43 = x_8.x_GLF_uniform_float_values[1].el; float x_45 = x_8.x_GLF_uniform_float_values[0].el; @@ -128,10 +114,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.glsl index d320dbd4b1..1d30ca2cf2 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -11,18 +9,6 @@ type Arr_1 = @stride(16) array; #version 310 es precision mediump float; -uint tint_pack2x16float(vec2 param_0) { - uint2 i = f32tof16(param_0); - return i.x | (i.y << 16); -} - -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { float el; @@ -59,8 +45,8 @@ void main_1() { bool x_86_phi = false; bool x_102_phi = false; bool x_118_phi = false; - a = tint_pack2x16float(vec2(1.0f, 1.0f)); - values = tint_unpack4x8unorm(a); + a = packHalf2x16(vec2(1.0f, 1.0f)); + values = unpackUnorm4x8(a); float x_41 = x_8.x_GLF_uniform_float_values[3].el; float x_43 = x_8.x_GLF_uniform_float_values[1].el; float x_45 = x_8.x_GLF_uniform_float_values[0].el; @@ -136,10 +122,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:5: 'uint2' : undeclared identifier -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.glsl index 440f95f174..b800a4c565 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.spvasm.expected.glsl @@ -1,15 +1,6 @@ -SKIP: FAILED - #version 310 es precision mediump float; -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct strided_arr { uint el; @@ -52,7 +43,7 @@ void main_1() { vec4 v = vec4(0.0f, 0.0f, 0.0f, 0.0f); uint x_39 = x_6.x_GLF_uniform_uint_values[0].el; uint x_41 = x_6.x_GLF_uniform_uint_values[0].el; - v = tint_unpack4x8unorm((x_39 / (true ? 92382u : x_41))); + v = unpackUnorm4x8((x_39 / (true ? 92382u : x_41))); vec4 x_45 = v; int x_47 = x_8.x_GLF_uniform_int_values[0].el; int x_50 = x_8.x_GLF_uniform_int_values[0].el; @@ -89,10 +80,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.glsl b/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.glsl index af56b5c7f8..a3efb8b3f1 100644 --- a/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.glsl +++ b/test/tint/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary type Arr = @stride(16) array; ^^^^^^ @@ -15,13 +13,6 @@ type Arr_2 = @stride(16) array; #version 310 es precision mediump float; -vec4 tint_unpack4x8unorm(uint param_0) { - uint j = param_0; - uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24); - return float4(i) / 255.0; -} - - layout(location = 0) out vec4 x_GLF_color_1_1; struct tint_padded_array_element { uint el; @@ -64,7 +55,7 @@ void main_1() { vec4 v = vec4(0.0f, 0.0f, 0.0f, 0.0f); uint x_39 = x_6.x_GLF_uniform_uint_values[0].el; uint x_41 = x_6.x_GLF_uniform_uint_values[0].el; - v = tint_unpack4x8unorm((x_39 / (true ? 92382u : x_41))); + v = unpackUnorm4x8((x_39 / (true ? 92382u : x_41))); vec4 x_45 = v; int x_47 = x_8.x_GLF_uniform_int_values[0].el; int x_50 = x_8.x_GLF_uniform_int_values[0].el; @@ -101,10 +92,3 @@ void main() { x_GLF_color_1_1 = inner_result.x_GLF_color_1; return; } -Error parsing GLSL shader: -ERROR: 0:6: 'uint4' : undeclared identifier -ERROR: 0:6: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - -