From 9b152e655fe91949f2a1c873ca5fcf5977b9aea3 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Mon, 28 Feb 2022 20:03:11 +0000 Subject: [PATCH] GLSL: implement fma(). Bug: tint:1448 Change-Id: I7e331a2eabd507a4babce756fc79d68b0bf7d7be Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82145 Kokoro: Kokoro Reviewed-by: Ben Clayton Commit-Queue: Stephen White --- src/tint/writer/glsl/generator_impl.cc | 23 ++++++++++++- src/tint/writer/glsl/generator_impl.h | 5 +++ .../glsl/generator_impl_builtin_test.cc | 19 ++++++++++- .../writer/glsl/generator_impl_import_test.cc | 4 +-- ...d-shadowed-pbr-fragment.wgsl.expected.glsl | 11 +------ .../gen/fma/26a7a9.wgsl.expected.glsl | 32 ++----------------- .../gen/fma/6a3283.wgsl.expected.glsl | 32 ++----------------- .../gen/fma/c10ba3.wgsl.expected.glsl | 29 ++--------------- .../gen/fma/e17c5c.wgsl.expected.glsl | 32 ++----------------- .../ba1481.wgsl.expected.glsl | 2 +- .../gen/textureLoad/8acf41.wgsl.expected.glsl | 2 +- .../979816.wgsl.expected.glsl | 2 +- ...tingFloating_Scalar_2.spvasm.expected.glsl | 11 +------ ...tingFloating_Vector_2.spvasm.expected.glsl | 12 +------ 14 files changed, 64 insertions(+), 152 deletions(-) diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc index 1ca4a8a42c..6d6eda3d52 100644 --- a/src/tint/writer/glsl/generator_impl.cc +++ b/src/tint/writer/glsl/generator_impl.cc @@ -610,6 +610,9 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out, if (builtin->Type() == sem::BuiltinType::kInsertBits) { return EmitInsertBits(out, expr); } + if (builtin->Type() == sem::BuiltinType::kFma && version_.IsES()) { + return EmitEmulatedFMA(out, expr); + } if (builtin->IsDataPacking()) { return EmitDataPackingCall(out, expr, builtin); } @@ -859,6 +862,24 @@ bool GeneratorImpl::EmitInsertBits(std::ostream& out, return true; } +bool GeneratorImpl::EmitEmulatedFMA(std::ostream& out, + const ast::CallExpression* expr) { + out << "(("; + if (!EmitExpression(out, expr->args[0])) { + return false; + } + out << ") * ("; + if (!EmitExpression(out, expr->args[1])) { + return false; + } + out << ") + ("; + if (!EmitExpression(out, expr->args[2])) { + return false; + } + out << "))"; + return true; +} + bool GeneratorImpl::EmitSelectCall(std::ostream& out, const ast::CallExpression* expr) { auto* expr_false = expr->args[0]; @@ -1619,7 +1640,7 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) { case sem::BuiltinType::kFract: return "fract"; case sem::BuiltinType::kFma: - return "mad"; + return "fma"; case sem::BuiltinType::kFwidth: case sem::BuiltinType::kFwidthCoarse: case sem::BuiltinType::kFwidthFine: diff --git a/src/tint/writer/glsl/generator_impl.h b/src/tint/writer/glsl/generator_impl.h index 5fa94f9fad..a01352f4eb 100644 --- a/src/tint/writer/glsl/generator_impl.h +++ b/src/tint/writer/glsl/generator_impl.h @@ -181,6 +181,11 @@ class GeneratorImpl : public TextGenerator { /// @param expr the call expression /// @returns true if the expression is emitted bool EmitInsertBits(std::ostream& out, const ast::CallExpression* expr); + /// Emulates 'fma' on GLSL ES, where it is unsupported. + /// @param out the output of the expression stream + /// @param expr the fma() expression + /// @returns true if the expression is emitted + bool EmitEmulatedFMA(std::ostream& out, const ast::CallExpression* expr); /// Handles generating a call to a texture function (`textureSample`, /// `textureSampleGrad`, etc) /// @param out the output of the expression stream diff --git a/src/tint/writer/glsl/generator_impl_builtin_test.cc b/src/tint/writer/glsl/generator_impl_builtin_test.cc index c90cd572c0..bd36a99f39 100644 --- a/src/tint/writer/glsl/generator_impl_builtin_test.cc +++ b/src/tint/writer/glsl/generator_impl_builtin_test.cc @@ -213,7 +213,7 @@ INSTANTIATE_TEST_SUITE_P( BuiltinData{BuiltinType::kExp2, ParamType::kF32, "exp2"}, BuiltinData{BuiltinType::kFaceForward, ParamType::kF32, "faceforward"}, BuiltinData{BuiltinType::kFloor, ParamType::kF32, "floor"}, - BuiltinData{BuiltinType::kFma, ParamType::kF32, "mad"}, + BuiltinData{BuiltinType::kFma, ParamType::kF32, "fma"}, BuiltinData{BuiltinType::kFract, ParamType::kF32, "fract"}, BuiltinData{BuiltinType::kFwidth, ParamType::kF32, "fwidth"}, BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"}, @@ -873,6 +873,23 @@ void main() { )"); } +TEST_F(GlslGeneratorImplTest_Builtin, FMA) { + auto* call = Call("fma", "a", "b", "c"); + + Global("a", ty.vec3(), ast::StorageClass::kPrivate); + Global("b", ty.vec3(), ast::StorageClass::kPrivate); + Global("c", ty.vec3(), ast::StorageClass::kPrivate); + + WrapInFunction(CallStmt(call)); + + GeneratorImpl& gen = Build(); + + gen.increment_indent(); + std::stringstream out; + ASSERT_TRUE(gen.EmitExpression(out, call)) << gen.error(); + EXPECT_EQ(out.str(), "((a) * (b) + (c))"); +} + TEST_F(GlslGeneratorImplTest_Builtin, DotU32) { Global("v", ty.vec3(), ast::StorageClass::kPrivate); WrapInFunction(CallStmt(Call("dot", "v", "v"))); diff --git a/src/tint/writer/glsl/generator_impl_import_test.cc b/src/tint/writer/glsl/generator_impl_import_test.cc index a5531365e8..54f9a77b28 100644 --- a/src/tint/writer/glsl/generator_impl_import_test.cc +++ b/src/tint/writer/glsl/generator_impl_import_test.cc @@ -212,8 +212,7 @@ TEST_P(GlslImportData_TripleParam_ScalarTest, Float) { } INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import, GlslImportData_TripleParam_ScalarTest, - testing::Values(GlslImportData{"fma", "mad"}, - GlslImportData{"mix", "mix"}, + testing::Values(GlslImportData{"mix", "mix"}, GlslImportData{"clamp", "clamp"}, GlslImportData{"smoothStep", "smoothstep"})); @@ -239,7 +238,6 @@ INSTANTIATE_TEST_SUITE_P( GlslGeneratorImplTest_Import, GlslImportData_TripleParam_VectorTest, testing::Values(GlslImportData{"faceForward", "faceforward"}, - GlslImportData{"fma", "mad"}, GlslImportData{"clamp", "clamp"}, GlslImportData{"smoothStep", "smoothstep"})); diff --git a/test/tint/benchmark/skinned-shadowed-pbr-fragment.wgsl.expected.glsl b/test/tint/benchmark/skinned-shadowed-pbr-fragment.wgsl.expected.glsl index af6c708918..d4f0ede591 100644 --- a/test/tint/benchmark/skinned-shadowed-pbr-fragment.wgsl.expected.glsl +++ b/test/tint/benchmark/skinned-shadowed-pbr-fragment.wgsl.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - benchmark/skinned-shadowed-pbr-fragment.wgsl:51:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary lights : @stride(32) array; ^^^^^^ @@ -79,7 +77,7 @@ layout(binding = 2, std430) buffer GlobalLights_1 { } globalLights; const uvec3 tileCount = uvec3(32u, 18u, 48u); float linearDepth(float depthSample) { - return ((camera.zFar * camera.zNear) / mad(depthSample, (camera.zNear - camera.zFar), camera.zFar)); + return ((camera.zFar * camera.zNear) / ((depthSample) * ((camera.zNear - camera.zFar)) + (camera.zFar))); } uvec3 getTile(vec4 fragCoord) { @@ -370,10 +368,3 @@ void main() { emissive_1 = inner_result.emissive; return; } -Error parsing GLSL shader: -ERROR: 0:76: 'mad' : no matching overloaded function found -ERROR: 0:76: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/fma/26a7a9.wgsl.expected.glsl b/test/tint/builtins/gen/fma/26a7a9.wgsl.expected.glsl index c8caa5783c..297b394c58 100644 --- a/test/tint/builtins/gen/fma/26a7a9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/fma/26a7a9.wgsl.expected.glsl @@ -1,9 +1,7 @@ -SKIP: FAILED - #version 310 es void fma_26a7a9() { - vec2 res = mad(vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f)); + vec2 res = ((vec2(0.0f, 0.0f)) * (vec2(0.0f, 0.0f)) + (vec2(0.0f, 0.0f))); } vec4 vertex_main() { @@ -18,19 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; void fma_26a7a9() { - vec2 res = mad(vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f)); + vec2 res = ((vec2(0.0f, 0.0f)) * (vec2(0.0f, 0.0f)) + (vec2(0.0f, 0.0f))); } void fragment_main() { @@ -41,18 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'mad' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of float' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es void fma_26a7a9() { - vec2 res = mad(vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f)); + vec2 res = ((vec2(0.0f, 0.0f)) * (vec2(0.0f, 0.0f)) + (vec2(0.0f, 0.0f))); } void compute_main() { @@ -64,11 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/fma/6a3283.wgsl.expected.glsl b/test/tint/builtins/gen/fma/6a3283.wgsl.expected.glsl index c0e84805f4..e5895aae9a 100644 --- a/test/tint/builtins/gen/fma/6a3283.wgsl.expected.glsl +++ b/test/tint/builtins/gen/fma/6a3283.wgsl.expected.glsl @@ -1,9 +1,7 @@ -SKIP: FAILED - #version 310 es void fma_6a3283() { - vec4 res = mad(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f)); + vec4 res = ((vec4(0.0f, 0.0f, 0.0f, 0.0f)) * (vec4(0.0f, 0.0f, 0.0f, 0.0f)) + (vec4(0.0f, 0.0f, 0.0f, 0.0f))); } vec4 vertex_main() { @@ -18,19 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; void fma_6a3283() { - vec4 res = mad(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f)); + vec4 res = ((vec4(0.0f, 0.0f, 0.0f, 0.0f)) * (vec4(0.0f, 0.0f, 0.0f, 0.0f)) + (vec4(0.0f, 0.0f, 0.0f, 0.0f))); } void fragment_main() { @@ -41,18 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'mad' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es void fma_6a3283() { - vec4 res = mad(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f)); + vec4 res = ((vec4(0.0f, 0.0f, 0.0f, 0.0f)) * (vec4(0.0f, 0.0f, 0.0f, 0.0f)) + (vec4(0.0f, 0.0f, 0.0f, 0.0f))); } void compute_main() { @@ -64,11 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 4-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/fma/c10ba3.wgsl.expected.glsl b/test/tint/builtins/gen/fma/c10ba3.wgsl.expected.glsl index c97533cfcd..67e513d50e 100644 --- a/test/tint/builtins/gen/fma/c10ba3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/fma/c10ba3.wgsl.expected.glsl @@ -1,9 +1,7 @@ -SKIP: FAILED - #version 310 es void fma_c10ba3() { - float res = mad(1.0f, 1.0f, 1.0f); + float res = ((1.0f) * (1.0f) + (1.0f)); } vec4 vertex_main() { @@ -18,18 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es precision mediump float; void fma_c10ba3() { - float res = mad(1.0f, 1.0f, 1.0f); + float res = ((1.0f) * (1.0f) + (1.0f)); } void fragment_main() { @@ -40,17 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'mad' : no matching overloaded function found -ERROR: 0:5: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - #version 310 es void fma_c10ba3() { - float res = mad(1.0f, 1.0f, 1.0f); + float res = ((1.0f) * (1.0f) + (1.0f)); } void compute_main() { @@ -62,10 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/builtins/gen/fma/e17c5c.wgsl.expected.glsl b/test/tint/builtins/gen/fma/e17c5c.wgsl.expected.glsl index ab684037d9..7927b5af30 100644 --- a/test/tint/builtins/gen/fma/e17c5c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/fma/e17c5c.wgsl.expected.glsl @@ -1,9 +1,7 @@ -SKIP: FAILED - #version 310 es void fma_e17c5c() { - vec3 res = mad(vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f)); + vec3 res = ((vec3(0.0f, 0.0f, 0.0f)) * (vec3(0.0f, 0.0f, 0.0f)) + (vec3(0.0f, 0.0f, 0.0f))); } vec4 vertex_main() { @@ -18,19 +16,11 @@ void main() { gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es precision mediump float; void fma_e17c5c() { - vec3 res = mad(vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f)); + vec3 res = ((vec3(0.0f, 0.0f, 0.0f)) * (vec3(0.0f, 0.0f, 0.0f)) + (vec3(0.0f, 0.0f, 0.0f))); } void fragment_main() { @@ -41,18 +31,10 @@ void main() { fragment_main(); return; } -Error parsing GLSL shader: -ERROR: 0:5: 'mad' : no matching overloaded function found -ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp mediump 3-component vector of float' -ERROR: 0:5: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - - #version 310 es void fma_e17c5c() { - vec3 res = mad(vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f)); + vec3 res = ((vec3(0.0f, 0.0f, 0.0f)) * (vec3(0.0f, 0.0f, 0.0f)) + (vec3(0.0f, 0.0f, 0.0f))); } void compute_main() { @@ -64,11 +46,3 @@ void main() { compute_main(); return; } -Error parsing GLSL shader: -ERROR: 0:4: 'mad' : no matching overloaded function found -ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp highp 3-component vector of float' -ERROR: 0:4: '' : compilation terminated -ERROR: 3 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 d4240f00d2..8e05f606d1 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:2576 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2589 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 d4240f00d2..8e05f606d1 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:2576 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2589 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 d4240f00d2..8e05f606d1 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:2576 internal compiler error: Multiplanar external texture transform was not run. +../../src/tint/writer/glsl/generator_impl.cc:2589 internal compiler error: Multiplanar external texture transform was not run. ******************************************************************** diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Scalar_2.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Scalar_2.spvasm.expected.glsl index 942f034919..cd51fef7a2 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Scalar_2.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Scalar_2.spvasm.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - #version 310 es void main_1() { @@ -25,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; - float x_1 = mad(f1, f2, f3); + float x_1 = ((f1) * (f2) + (f3)); return; } @@ -38,10 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:26: 'mad' : no matching overloaded function found -ERROR: 0:26: '' : compilation terminated -ERROR: 2 compilation errors. No code generated. - - - diff --git a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Vector_2.spvasm.expected.glsl b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Vector_2.spvasm.expected.glsl index e4f5be2ddd..56e873bca7 100644 --- a/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Vector_2.spvasm.expected.glsl +++ b/test/tint/unittest/reader/spirv/Samples_SpvParserTest_GlslStd450_Floating_FloatingFloatingFloating_Vector_2.spvasm.expected.glsl @@ -1,5 +1,3 @@ -SKIP: FAILED - #version 310 es void main_1() { @@ -25,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 = mad(v2f1, v2f2, v2f3); + vec2 x_1 = ((v2f1) * (v2f2) + (v2f3)); return; } @@ -38,11 +36,3 @@ void main() { tint_symbol(); return; } -Error parsing GLSL shader: -ERROR: 0:26: 'mad' : no matching overloaded function found -ERROR: 0:26: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float' -ERROR: 0:26: '' : compilation terminated -ERROR: 3 compilation errors. No code generated. - - -