diff --git a/src/tint/reader/spirv/function.cc b/src/tint/reader/spirv/function.cc index 9c89c859e9..6c1c9f0f15 100644 --- a/src/tint/reader/spirv/function.cc +++ b/src/tint/reader/spirv/function.cc @@ -4136,9 +4136,9 @@ TypedExpression FunctionEmitter::EmitGlslStd450MatrixInverse( auto* d = idx(1, 1); // s * d, -s * b, -s * c, s * a - auto* r = pb.mat2x2( // - pb.Call("vec2f", pb.Mul(s, d), pb.Mul(neg(s), b)), - pb.Call("vec2f", pb.Mul(neg(s), c), pb.Mul(s, a))); + auto* r = pb.Call("mat2x2f", // + pb.Call("vec2f", pb.Mul(s, d), pb.Mul(neg(s), b)), + pb.Call("vec2f", pb.Mul(neg(s), c), pb.Mul(s, a))); return {mat.type, r}; } @@ -4156,29 +4156,29 @@ TypedExpression FunctionEmitter::EmitGlslStd450MatrixInverse( auto* h = idx(2, 1); auto* i = idx(2, 2); - auto r = pb.Mul(s, // - pb.mat3x3( // - pb.Call("vec3f", - // e * i - f * h - sub_mul2(e, i, f, h), - // c * h - b * i - sub_mul2(c, h, b, i), - // b * f - c * e - sub_mul2(b, f, c, e)), - pb.Call("vec3f", - // f * g - d * i - sub_mul2(f, g, d, i), - // a * i - c * g - sub_mul2(a, i, c, g), - // c * d - a * f - sub_mul2(c, d, a, f)), - pb.Call("vec3f", - // d * h - e * g - sub_mul2(d, h, e, g), - // b * g - a * h - sub_mul2(b, g, a, h), - // a * e - b * d - sub_mul2(a, e, b, d)))); + auto r = pb.Mul(s, // + pb.Call("mat3x3f", // + pb.Call("vec3f", + // e * i - f * h + sub_mul2(e, i, f, h), + // c * h - b * i + sub_mul2(c, h, b, i), + // b * f - c * e + sub_mul2(b, f, c, e)), + pb.Call("vec3f", + // f * g - d * i + sub_mul2(f, g, d, i), + // a * i - c * g + sub_mul2(a, i, c, g), + // c * d - a * f + sub_mul2(c, d, a, f)), + pb.Call("vec3f", + // d * h - e * g + sub_mul2(d, h, e, g), + // b * g - a * h + sub_mul2(b, g, a, h), + // a * e - b * d + sub_mul2(a, e, b, d)))); return {mat.type, r}; } @@ -4234,44 +4234,44 @@ TypedExpression FunctionEmitter::EmitGlslStd450MatrixInverse( auto* enfm = sub_mul2(e, n, f, m); auto* ejfi = sub_mul2(e, j, f, i); - auto r = pb.Mul(s, // - pb.mat4x4( // - pb.Call("vec4f", - // f * kplo - g * jpln + h * jokn - sub_add_mul3(f, kplo, g, jpln, h, jokn), - // -b * kplo + c * jpln - d * jokn - add_sub_mul3(neg(b), kplo, c, jpln, d, jokn), - // b * gpho - c * fphn + d * fogn - sub_add_mul3(b, gpho, c, fphn, d, fogn), - // -b * glhk + c * flhj - d * fkgj - add_sub_mul3(neg(b), glhk, c, flhj, d, fkgj)), - pb.Call("vec4f", - // -e * kplo + g * iplm - h * iokm - add_sub_mul3(neg(e), kplo, g, iplm, h, iokm), - // a * kplo - c * iplm + d * iokm - sub_add_mul3(a, kplo, c, iplm, d, iokm), - // -a * gpho + c * ephm - d * eogm - add_sub_mul3(neg(a), gpho, c, ephm, d, eogm), - // a * glhk - c * elhi + d * ekgi - sub_add_mul3(a, glhk, c, elhi, d, ekgi)), - pb.Call("vec4f", - // e * jpln - f * iplm + h * injm - sub_add_mul3(e, jpln, f, iplm, h, injm), - // -a * jpln + b * iplm - d * injm - add_sub_mul3(neg(a), jpln, b, iplm, d, injm), - // a * fphn - b * ephm + d * enfm - sub_add_mul3(a, fphn, b, ephm, d, enfm), - // -a * flhj + b * elhi - d * ejfi - add_sub_mul3(neg(a), flhj, b, elhi, d, ejfi)), - pb.Call("vec4f", - // -e * jokn + f * iokm - g * injm - add_sub_mul3(neg(e), jokn, f, iokm, g, injm), - // a * jokn - b * iokm + c * injm - sub_add_mul3(a, jokn, b, iokm, c, injm), - // -a * fogn + b * eogm - c * enfm - add_sub_mul3(neg(a), fogn, b, eogm, c, enfm), - // a * fkgj - b * ekgi + c * ejfi - sub_add_mul3(a, fkgj, b, ekgi, c, ejfi)))); + auto r = pb.Mul(s, // + pb.Call("mat4x4f", // + pb.Call("vec4f", + // f * kplo - g * jpln + h * jokn + sub_add_mul3(f, kplo, g, jpln, h, jokn), + // -b * kplo + c * jpln - d * jokn + add_sub_mul3(neg(b), kplo, c, jpln, d, jokn), + // b * gpho - c * fphn + d * fogn + sub_add_mul3(b, gpho, c, fphn, d, fogn), + // -b * glhk + c * flhj - d * fkgj + add_sub_mul3(neg(b), glhk, c, flhj, d, fkgj)), + pb.Call("vec4f", + // -e * kplo + g * iplm - h * iokm + add_sub_mul3(neg(e), kplo, g, iplm, h, iokm), + // a * kplo - c * iplm + d * iokm + sub_add_mul3(a, kplo, c, iplm, d, iokm), + // -a * gpho + c * ephm - d * eogm + add_sub_mul3(neg(a), gpho, c, ephm, d, eogm), + // a * glhk - c * elhi + d * ekgi + sub_add_mul3(a, glhk, c, elhi, d, ekgi)), + pb.Call("vec4f", + // e * jpln - f * iplm + h * injm + sub_add_mul3(e, jpln, f, iplm, h, injm), + // -a * jpln + b * iplm - d * injm + add_sub_mul3(neg(a), jpln, b, iplm, d, injm), + // a * fphn - b * ephm + d * enfm + sub_add_mul3(a, fphn, b, ephm, d, enfm), + // -a * flhj + b * elhi - d * ejfi + add_sub_mul3(neg(a), flhj, b, elhi, d, ejfi)), + pb.Call("vec4f", + // -e * jokn + f * iokm - g * injm + add_sub_mul3(neg(e), jokn, f, iokm, g, injm), + // a * jokn - b * iokm + c * injm + sub_add_mul3(a, jokn, b, iokm, c, injm), + // -a * fogn + b * eogm - c * enfm + add_sub_mul3(neg(a), fogn, b, eogm, c, enfm), + // a * fkgj - b * ekgi + c * ejfi + sub_add_mul3(a, fkgj, b, ekgi, c, ejfi)))); return {mat.type, r}; } } diff --git a/src/tint/reader/spirv/function_arithmetic_test.cc b/src/tint/reader/spirv/function_arithmetic_test.cc index aab6168435..538e410781 100644 --- a/src/tint/reader/spirv/function_arithmetic_test.cc +++ b/src/tint/reader/spirv/function_arithmetic_test.cc @@ -741,7 +741,7 @@ TEST_F(SpvBinaryArithTestBasic, MatrixTimesScalar) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("let x_10 : mat2x2 = (x_1 * x_2);")); + HasSubstr("let x_10 : mat2x2f = (x_1 * x_2);")); } TEST_F(SpvBinaryArithTestBasic, VectorTimesMatrix) { @@ -798,7 +798,7 @@ TEST_F(SpvBinaryArithTestBasic, MatrixTimesMatrix) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("let x_10 : mat2x2 = (x_1 * x_2);")); + HasSubstr("let x_10 : mat2x2f = (x_1 * x_2);")); } TEST_F(SpvBinaryArithTestBasic, Dot) { @@ -838,7 +838,7 @@ TEST_F(SpvBinaryArithTestBasic, OuterProduct) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); auto got = test::ToString(p->program(), ast_body); - EXPECT_THAT(got, HasSubstr("let x_3 : mat2x3 = mat2x3(" + EXPECT_THAT(got, HasSubstr("let x_3 : mat2x3f = mat2x3f(" "vec3f((x_2.x * x_1.x), (x_2.x * x_1.y), (x_2.x * x_1.z)), " "vec3f((x_2.y * x_1.x), (x_2.y * x_1.y), (x_2.y * x_1.z)));")) << got; @@ -920,7 +920,7 @@ TEST_F(SpvUnaryArithTest, Transpose_2x2) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error() << "\n" << assembly; auto fe = p->function_emitter(100); EXPECT_TRUE(fe.EmitBody()) << p->error(); - const auto* expected = "let x_2 : mat2x2 = transpose(x_1);"; + const auto* expected = "let x_2 : mat2x2f = transpose(x_1);"; auto ast_body = fe.ast_body(); const auto got = test::ToString(p->program(), ast_body); EXPECT_THAT(got, HasSubstr(expected)) << got; @@ -942,7 +942,7 @@ TEST_F(SpvUnaryArithTest, Transpose_2x3) { // Note, in the AST dump mat_2_3 means 2 rows and 3 columns. // So the column vectors have 2 elements. // That is, %m3v2float is __mat_2_3f32. - const auto* expected = "let x_2 : mat3x2 = transpose(x_1);"; + const auto* expected = "let x_2 : mat3x2f = transpose(x_1);"; auto ast_body = fe.ast_body(); const auto got = test::ToString(p->program(), ast_body); EXPECT_THAT(got, HasSubstr(expected)) << got; @@ -961,7 +961,7 @@ TEST_F(SpvUnaryArithTest, Transpose_3x2) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error() << "\n" << assembly; auto fe = p->function_emitter(100); EXPECT_TRUE(fe.EmitBody()) << p->error(); - const auto* expected = "let x_2 : mat2x3 = transpose(x_1);"; + const auto* expected = "let x_2 : mat2x3f = transpose(x_1);"; auto ast_body = fe.ast_body(); const auto got = test::ToString(p->program(), ast_body); EXPECT_THAT(got, HasSubstr(expected)) << got; diff --git a/src/tint/reader/spirv/function_composite_test.cc b/src/tint/reader/spirv/function_composite_test.cc index bb66d094b7..cb8bc4287b 100644 --- a/src/tint/reader/spirv/function_composite_test.cc +++ b/src/tint/reader/spirv/function_composite_test.cc @@ -115,11 +115,10 @@ TEST_F(SpvParserTest_Composite_Construct, Matrix) { auto fe = p->function_emitter(100); EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); - EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("let x_1 : mat3x2 = mat3x2(" - "vec2f(50.0f, 60.0f), " - "vec2f(60.0f, 50.0f), " - "vec2f(70.0f, 70.0f));")); + EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr("let x_1 : mat3x2f = mat3x2f(" + "vec2f(50.0f, 60.0f), " + "vec2f(60.0f, 50.0f), " + "vec2f(70.0f, 70.0f));")); } TEST_F(SpvParserTest_Composite_Construct, Array) { @@ -490,9 +489,9 @@ TEST_F(SpvParserTest_CompositeInsert, Matrix) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); auto body_str = test::ToString(p->program(), ast_body); - EXPECT_THAT(body_str, HasSubstr(R"(var x_2_1 : mat3x2 = x_1; + EXPECT_THAT(body_str, HasSubstr(R"(var x_2_1 : mat3x2f = x_1; x_2_1[2u] = vec2f(50.0f, 60.0f); -let x_2 : mat3x2 = x_2_1; +let x_2 : mat3x2f = x_2_1; )")) << body_str; } @@ -535,9 +534,9 @@ TEST_F(SpvParserTest_CompositeInsert, Matrix_Vector) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); auto body_str = test::ToString(p->program(), ast_body); - EXPECT_THAT(body_str, HasSubstr(R"(var x_2_1 : mat3x2 = x_1; + EXPECT_THAT(body_str, HasSubstr(R"(var x_2_1 : mat3x2f = x_1; x_2_1[2u] = vec2f(50.0f, 60.0f); -let x_2 : mat3x2 = x_2_1; +let x_2 : mat3x2f = x_2_1; return; )")) << body_str; } diff --git a/src/tint/reader/spirv/function_glsl_std_450_test.cc b/src/tint/reader/spirv/function_glsl_std_450_test.cc index 9722dc1169..506c8d4aa2 100644 --- a/src/tint/reader/spirv/function_glsl_std_450_test.cc +++ b/src/tint/reader/spirv/function_glsl_std_450_test.cc @@ -1420,7 +1420,7 @@ TEST_F(SpvParserTest, GlslStd450_MatrixInverse_mat2x2) { std::string expected = "let s = (1.0f / determinant(m2x2f1));\n" - "let x_1 : mat2x2 = mat2x2(vec2f((s * m2x2f1[1u][1u]), (-(s) * " + "let x_1 : mat2x2f = mat2x2f(vec2f((s * m2x2f1[1u][1u]), (-(s) * " "m2x2f1[0u][1u])), vec2f((-(s) * m2x2f1[1u][0u]), (s * m2x2f1[0u][0u])));"; EXPECT_THAT(body, HasSubstr(expected)) << body; @@ -1441,7 +1441,7 @@ TEST_F(SpvParserTest, GlslStd450_MatrixInverse_mat3x3) { std::string expected = "let s = (1.0f / determinant(m3x3f1));\n" - "let x_1 : mat3x3 = (s * mat3x3(vec3f(((m3x3f1[1u][1u] * m3x3f1[2u][2u]) - " + "let x_1 : mat3x3f = (s * mat3x3f(vec3f(((m3x3f1[1u][1u] * m3x3f1[2u][2u]) - " "(m3x3f1[1u][2u] * m3x3f1[2u][1u])), ((m3x3f1[0u][2u] * m3x3f1[2u][1u]) - (m3x3f1[0u][1u] " "* m3x3f1[2u][2u])), ((m3x3f1[0u][1u] * m3x3f1[1u][2u]) - (m3x3f1[0u][2u] * " "m3x3f1[1u][1u]))), vec3f(((m3x3f1[1u][2u] * m3x3f1[2u][0u]) - (m3x3f1[1u][0u] * " @@ -1470,7 +1470,7 @@ TEST_F(SpvParserTest, GlslStd450_MatrixInverse_mat4x4) { std::string expected = "let s = (1.0f / determinant(m4x4f1));\n" - "let x_1 : mat4x4 = (s * mat4x4(vec4f((((m4x4f1[1u][1u] * ((m4x4f1[2u][2u] * " + "let x_1 : mat4x4f = (s * mat4x4f(vec4f((((m4x4f1[1u][1u] * ((m4x4f1[2u][2u] * " "m4x4f1[3u][3u]) - (m4x4f1[2u][3u] * m4x4f1[3u][2u]))) - (m4x4f1[1u][2u] * " "((m4x4f1[2u][1u] * m4x4f1[3u][3u]) - (m4x4f1[2u][3u] * m4x4f1[3u][1u])))) + " "(m4x4f1[1u][3u] * ((m4x4f1[2u][1u] * m4x4f1[3u][2u]) - (m4x4f1[2u][2u] * " @@ -1551,10 +1551,10 @@ TEST_F(SpvParserTest, GlslStd450_MatrixInverse_MultipleInScope) { std::string expected = "let s = (1.0f / determinant(m2x2f1));\n" - "let x_1 : mat2x2 = mat2x2(vec2f((s * m2x2f1[1u][1u]), (-(s) * " + "let x_1 : mat2x2f = mat2x2f(vec2f((s * m2x2f1[1u][1u]), (-(s) * " "m2x2f1[0u][1u])), vec2f((-(s) * m2x2f1[1u][0u]), (s * m2x2f1[0u][0u])));\n" "let s_1 = (1.0f / determinant(m2x2f1));\n" - "let x_2 : mat2x2 = mat2x2(vec2f((s_1 * m2x2f1[1u][1u]), (-(s_1) * " + "let x_2 : mat2x2f = mat2x2f(vec2f((s_1 * m2x2f1[1u][1u]), (-(s_1) * " "m2x2f1[0u][1u])), vec2f((-(s_1) * m2x2f1[1u][0u]), (s_1 * m2x2f1[0u][0u])));"; EXPECT_THAT(body, HasSubstr(expected)) << body; diff --git a/src/tint/reader/spirv/function_misc_test.cc b/src/tint/reader/spirv/function_misc_test.cc index 42874db7f8..2c984d204a 100644 --- a/src/tint/reader/spirv/function_misc_test.cc +++ b/src/tint/reader/spirv/function_misc_test.cc @@ -182,7 +182,7 @@ TEST_F(SpvParserTestMiscInstruction, OpUndef_InFunction_Matrix) { EXPECT_TRUE(fe.EmitBody()) << p->error(); auto ast_body = fe.ast_body(); EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("let x_11 : mat2x2 = mat2x2();")); + HasSubstr("let x_11 : mat2x2f = mat2x2f();")); } TEST_F(SpvParserTestMiscInstruction, OpUndef_InFunction_Array) { diff --git a/src/tint/reader/spirv/function_var_test.cc b/src/tint/reader/spirv/function_var_test.cc index 2a56b0c5ab..fd3580be1b 100644 --- a/src/tint/reader/spirv/function_var_test.cc +++ b/src/tint/reader/spirv/function_var_test.cc @@ -260,11 +260,10 @@ TEST_F(SpvParserFunctionVarTest, EmitFunctionVariables_MatrixInitializer) { EXPECT_TRUE(fe.EmitFunctionVariables()); auto ast_body = fe.ast_body(); - EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("var x_200 : mat3x2 = mat3x2(" - "vec2f(1.5f, 2.0f), " - "vec2f(2.0f, 3.0f), " - "vec2f(3.0f, 4.0f));")); + EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr("var x_200 : mat3x2f = mat3x2f(" + "vec2f(1.5f, 2.0f), " + "vec2f(2.0f, 3.0f), " + "vec2f(3.0f, 4.0f));")); } TEST_F(SpvParserFunctionVarTest, EmitFunctionVariables_ArrayInitializer) { diff --git a/src/tint/reader/spirv/parser_impl_module_var_test.cc b/src/tint/reader/spirv/parser_impl_module_var_test.cc index e77990992b..871edf76d1 100644 --- a/src/tint/reader/spirv/parser_impl_module_var_test.cc +++ b/src/tint/reader/spirv/parser_impl_module_var_test.cc @@ -1082,7 +1082,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixInitializer) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2 = mat3x2(" + EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2f = mat3x2f(" "vec2f(1.5f, 2.0f), " "vec2f(2.0f, 3.0f), " "vec2f(3.0f, 4.0f));")); @@ -1097,7 +1097,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixNullInitializer) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2 = mat3x2();")); + EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2f = mat3x2f();")); } TEST_F(SpvModuleScopeVarParserTest, MatrixUndefInitializer) { @@ -1109,7 +1109,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixUndefInitializer) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2 = mat3x2();")); + EXPECT_THAT(module_str, HasSubstr("var x_200 : mat3x2f = mat3x2f();")); // This example module emits ok, but is not valid SPIR-V in the first place. p->DeliberatelyInvalidSpirv(); @@ -1290,7 +1290,7 @@ TEST_F(SpvModuleScopeVarParserTest, ColMajorDecoration_Dropped) { const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { /* @offset(0) */ - field0 : mat3x2, + field0 : mat3x2f, } @group(0) @binding(0) var myvar : S; @@ -1321,7 +1321,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixStrideDecoration_Natural_Dropped) { const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { /* @offset(0) */ - field0 : mat3x2, + field0 : mat3x2f, } @group(0) @binding(0) var myvar : S; @@ -1353,7 +1353,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixStrideDecoration) { EXPECT_THAT(module_str, HasSubstr(R"(struct S { /* @offset(0) */ @stride(64) @internal(disable_validation__ignore_stride) - field0 : mat3x2, + field0 : mat3x2f, } @group(0) @binding(0) var myvar : S; @@ -4254,7 +4254,7 @@ TEST_F(SpvModuleScopeVarParserTest, Input_FlattenMatrix) { EXPECT_TRUE(p->error().empty()); const auto got = test::ToString(p->program()); - const std::string expected = R"(var x_1 : mat2x4; + const std::string expected = R"(var x_1 : mat2x4f; var x_2 : vec4f; @@ -4380,7 +4380,7 @@ TEST_F(SpvModuleScopeVarParserTest, Input_FlattenNested) { EXPECT_TRUE(p->error().empty()); const auto got = test::ToString(p->program()); - const std::string expected = R"(var x_1 : array, 2u>; + const std::string expected = R"(var x_1 : array; var x_2 : vec4f; @@ -4502,7 +4502,7 @@ TEST_F(SpvModuleScopeVarParserTest, Output_FlattenMatrix) { EXPECT_TRUE(p->error().empty()); const auto got = test::ToString(p->program()); - const std::string expected = R"(var x_1 : mat2x4; + const std::string expected = R"(var x_1 : mat2x4f; var x_2 : vec4f; diff --git a/src/tint/reader/spirv/parser_type.cc b/src/tint/reader/spirv/parser_type.cc index b13e2d191a..5abd73922b 100644 --- a/src/tint/reader/spirv/parser_type.cc +++ b/src/tint/reader/spirv/parser_type.cc @@ -14,6 +14,7 @@ #include "src/tint/reader/spirv/parser_type.h" +#include #include #include #include @@ -216,6 +217,11 @@ Matrix::Matrix(const Type* t, uint32_t c, uint32_t r) : type(t), columns(c), row Matrix::Matrix(const Matrix&) = default; ast::Type Matrix::Build(ProgramBuilder& b) const { + if (type->Is()) { + std::ostringstream ss; + ss << "mat" << columns << "x" << rows << "f"; + return b.ty(ss.str()); + } return b.ty.mat(type->Build(b), columns, rows); } diff --git a/test/tint/access/let/matrix.spvasm.expected.wgsl b/test/tint/access/let/matrix.spvasm.expected.wgsl index c8aaa838a7..ddb9c8cd89 100644 --- a/test/tint/access/let/matrix.spvasm.expected.wgsl +++ b/test/tint/access/let/matrix.spvasm.expected.wgsl @@ -1,5 +1,5 @@ fn main_1() { - let x_24 : f32 = mat3x3(vec3f(1.0f, 2.0f, 3.0f), vec3f(4.0f, 5.0f, 6.0f), vec3f(7.0f, 8.0f, 9.0f))[1u].y; + let x_24 : f32 = mat3x3f(vec3f(1.0f, 2.0f, 3.0f), vec3f(4.0f, 5.0f, 6.0f), vec3f(7.0f, 8.0f, 9.0f))[1u].y; return; } diff --git a/test/tint/access/var/matrix.spvasm.expected.wgsl b/test/tint/access/var/matrix.spvasm.expected.wgsl index 7a655495e4..bc5623421b 100644 --- a/test/tint/access/var/matrix.spvasm.expected.wgsl +++ b/test/tint/access/var/matrix.spvasm.expected.wgsl @@ -1,5 +1,5 @@ fn main_1() { - var m : mat3x3 = mat3x3(); + var m : mat3x3f = mat3x3f(); let x_15 : vec3f = m[1i]; let x_16 : f32 = x_15.y; return; diff --git a/test/tint/bug/oss-fuzz/57795.spv.expected.wgsl b/test/tint/bug/oss-fuzz/57795.spv.expected.wgsl index 06fd791c2f..026a9ebbf4 100644 --- a/test/tint/bug/oss-fuzz/57795.spv.expected.wgsl +++ b/test/tint/bug/oss-fuzz/57795.spv.expected.wgsl @@ -1,5 +1,5 @@ struct S { - field0 : mat3x3, + field0 : mat3x3f, } struct S_1 { @@ -32,9 +32,9 @@ struct S_7 { const x_72 = vec4f(0.0f, 0.0f, 0.0f, 0.0f); -const x_73 = mat4x4(x_72, x_72, x_72, x_72); +const x_73 = mat4x4f(x_72, x_72, x_72, x_72); -var x_75 : array, 58u> = array, 58u>(x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73); +var x_75 : array = array(x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73, x_73); const x_77 = vec3f(0.0f, 0.0f, 0.0f); diff --git a/test/tint/bug/tint/1061.spvasm.expected.wgsl b/test/tint/bug/tint/1061.spvasm.expected.wgsl index b1c8742fd7..016c549861 100644 --- a/test/tint/bug/tint/1061.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1061.spvasm.expected.wgsl @@ -10,7 +10,7 @@ var x_GLF_color : vec4f; fn main_1() { var f : f32; var v : vec4f; - f = determinant(mat3x3(vec3f(1.0f, 0.0f, 0.0f), vec3f(0.0f, 1.0f, 0.0f), vec3f(0.0f, 0.0f, 1.0f))); + f = determinant(mat3x3f(vec3f(1.0f, 0.0f, 0.0f), vec3f(0.0f, 1.0f, 0.0f), vec3f(0.0f, 0.0f, 1.0f))); let x_33 : f32 = f; let x_35 : f32 = f; let x_37 : f32 = f; diff --git a/test/tint/bug/tint/1088.spvasm.expected.wgsl b/test/tint/bug/tint/1088.spvasm.expected.wgsl index 2f6ad19a17..1db30f9668 100644 --- a/test/tint/bug/tint/1088.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1088.spvasm.expected.wgsl @@ -1,4 +1,4 @@ -alias Arr = array, 2u>; +alias Arr = array; struct strided_arr { @size(16) @@ -9,7 +9,7 @@ alias Arr_1 = array; struct LeftOver { /* @offset(0) */ - worldViewProjection : mat4x4, + worldViewProjection : mat4x4f, /* @offset(64) */ time : f32, /* @offset(80) */ @@ -45,7 +45,7 @@ fn main_1() { let x_55 : f32 = p.y; let x_57 : f32 = x_14.time; p.y = (x_55 + sin((x_57 + 4.0f))); - let x_69 : mat4x4 = x_14.worldViewProjection; + let x_69 : mat4x4f = x_14.worldViewProjection; let x_70 : vec3f = p; gl_Position = (x_69 * vec4f(x_70.x, x_70.y, x_70.z, 1.0f)); let x_83 : vec2f = uv; diff --git a/test/tint/bug/tint/1520.spvasm.expected.wgsl b/test/tint/bug/tint/1520.spvasm.expected.wgsl index 25817ce756..bfad42b00f 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1520.spvasm.expected.wgsl @@ -8,7 +8,7 @@ struct UniformBuffer { /* @offset(48) */ ucolorGreen_S1_c0 : vec4f, /* @offset(64) */ - umatrix_S1 : mat3x3, + umatrix_S1 : mat3x3f, } @binding(0) @group(0) var x_4 : UniformBuffer; diff --git a/test/tint/bug/tint/1670.spvasm.expected.wgsl b/test/tint/bug/tint/1670.spvasm.expected.wgsl index 3ab32735d9..ff35a02b7a 100644 --- a/test/tint/bug/tint/1670.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1670.spvasm.expected.wgsl @@ -1,19 +1,19 @@ fn main_1() { - var m2i : mat2x2; - var m2 : mat2x2; - var m3i : mat3x3; - var m3 : mat3x3; - var m4i : mat4x4; - var m4 : mat4x4; - let x_12 : mat2x2 = m2; + var m2i : mat2x2f; + var m2 : mat2x2f; + var m3i : mat3x3f; + var m3 : mat3x3f; + var m4i : mat4x4f; + var m4 : mat4x4f; + let x_12 : mat2x2f = m2; let s = (1.0f / determinant(x_12)); - m2i = mat2x2(vec2f((s * x_12[1u][1u]), (-(s) * x_12[0u][1u])), vec2f((-(s) * x_12[1u][0u]), (s * x_12[0u][0u]))); - let x_19 : mat3x3 = m3; + m2i = mat2x2f(vec2f((s * x_12[1u][1u]), (-(s) * x_12[0u][1u])), vec2f((-(s) * x_12[1u][0u]), (s * x_12[0u][0u]))); + let x_19 : mat3x3f = m3; let s_1 = (1.0f / determinant(x_19)); - m3i = (s_1 * mat3x3(vec3f(((x_19[1u][1u] * x_19[2u][2u]) - (x_19[1u][2u] * x_19[2u][1u])), ((x_19[0u][2u] * x_19[2u][1u]) - (x_19[0u][1u] * x_19[2u][2u])), ((x_19[0u][1u] * x_19[1u][2u]) - (x_19[0u][2u] * x_19[1u][1u]))), vec3f(((x_19[1u][2u] * x_19[2u][0u]) - (x_19[1u][0u] * x_19[2u][2u])), ((x_19[0u][0u] * x_19[2u][2u]) - (x_19[0u][2u] * x_19[2u][0u])), ((x_19[0u][2u] * x_19[1u][0u]) - (x_19[0u][0u] * x_19[1u][2u]))), vec3f(((x_19[1u][0u] * x_19[2u][1u]) - (x_19[1u][1u] * x_19[2u][0u])), ((x_19[0u][1u] * x_19[2u][0u]) - (x_19[0u][0u] * x_19[2u][1u])), ((x_19[0u][0u] * x_19[1u][1u]) - (x_19[0u][1u] * x_19[1u][0u]))))); - let x_26 : mat4x4 = m4; + m3i = (s_1 * mat3x3f(vec3f(((x_19[1u][1u] * x_19[2u][2u]) - (x_19[1u][2u] * x_19[2u][1u])), ((x_19[0u][2u] * x_19[2u][1u]) - (x_19[0u][1u] * x_19[2u][2u])), ((x_19[0u][1u] * x_19[1u][2u]) - (x_19[0u][2u] * x_19[1u][1u]))), vec3f(((x_19[1u][2u] * x_19[2u][0u]) - (x_19[1u][0u] * x_19[2u][2u])), ((x_19[0u][0u] * x_19[2u][2u]) - (x_19[0u][2u] * x_19[2u][0u])), ((x_19[0u][2u] * x_19[1u][0u]) - (x_19[0u][0u] * x_19[1u][2u]))), vec3f(((x_19[1u][0u] * x_19[2u][1u]) - (x_19[1u][1u] * x_19[2u][0u])), ((x_19[0u][1u] * x_19[2u][0u]) - (x_19[0u][0u] * x_19[2u][1u])), ((x_19[0u][0u] * x_19[1u][1u]) - (x_19[0u][1u] * x_19[1u][0u]))))); + let x_26 : mat4x4f = m4; let s_2 = (1.0f / determinant(x_26)); - m4i = (s_2 * mat4x4(vec4f((((x_26[1u][1u] * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) - (x_26[1u][2u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u])))) + (x_26[1u][3u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u])))), (((-(x_26[0u][1u]) * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) + (x_26[0u][2u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u])))) - (x_26[0u][3u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u])))), (((x_26[0u][1u] * ((x_26[1u][2u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][2u]))) - (x_26[0u][2u] * ((x_26[1u][1u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][1u])))) + (x_26[0u][3u] * ((x_26[1u][1u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][1u])))), (((-(x_26[0u][1u]) * ((x_26[1u][2u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][2u]))) + (x_26[0u][2u] * ((x_26[1u][1u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][1u])))) - (x_26[0u][3u] * ((x_26[1u][1u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][1u]))))), vec4f((((-(x_26[1u][0u]) * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) + (x_26[1u][2u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) - (x_26[1u][3u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) - (x_26[0u][2u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) + (x_26[0u][3u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][2u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][2u]))) + (x_26[0u][2u] * ((x_26[1u][0u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][0u])))) - (x_26[0u][3u] * ((x_26[1u][0u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][2u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][2u]))) - (x_26[0u][2u] * ((x_26[1u][0u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][0u])))) + (x_26[0u][3u] * ((x_26[1u][0u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][0u]))))), vec4f((((x_26[1u][0u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u]))) - (x_26[1u][1u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) + (x_26[1u][3u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u]))) + (x_26[0u][1u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) - (x_26[0u][3u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][1u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][1u]))) - (x_26[0u][1u] * ((x_26[1u][0u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][0u])))) + (x_26[0u][3u] * ((x_26[1u][0u] * x_26[3u][1u]) - (x_26[1u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][1u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][1u]))) + (x_26[0u][1u] * ((x_26[1u][0u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][0u])))) - (x_26[0u][3u] * ((x_26[1u][0u] * x_26[2u][1u]) - (x_26[1u][1u] * x_26[2u][0u]))))), vec4f((((-(x_26[1u][0u]) * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u]))) + (x_26[1u][1u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))) - (x_26[1u][2u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u]))) - (x_26[0u][1u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))) + (x_26[0u][2u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][1u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][1u]))) + (x_26[0u][1u] * ((x_26[1u][0u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][0u])))) - (x_26[0u][2u] * ((x_26[1u][0u] * x_26[3u][1u]) - (x_26[1u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][1u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][1u]))) - (x_26[0u][1u] * ((x_26[1u][0u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][0u])))) + (x_26[0u][2u] * ((x_26[1u][0u] * x_26[2u][1u]) - (x_26[1u][1u] * x_26[2u][0u]))))))); + m4i = (s_2 * mat4x4f(vec4f((((x_26[1u][1u] * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) - (x_26[1u][2u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u])))) + (x_26[1u][3u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u])))), (((-(x_26[0u][1u]) * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) + (x_26[0u][2u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u])))) - (x_26[0u][3u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u])))), (((x_26[0u][1u] * ((x_26[1u][2u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][2u]))) - (x_26[0u][2u] * ((x_26[1u][1u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][1u])))) + (x_26[0u][3u] * ((x_26[1u][1u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][1u])))), (((-(x_26[0u][1u]) * ((x_26[1u][2u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][2u]))) + (x_26[0u][2u] * ((x_26[1u][1u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][1u])))) - (x_26[0u][3u] * ((x_26[1u][1u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][1u]))))), vec4f((((-(x_26[1u][0u]) * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) + (x_26[1u][2u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) - (x_26[1u][3u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[2u][2u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][2u]))) - (x_26[0u][2u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) + (x_26[0u][3u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][2u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][2u]))) + (x_26[0u][2u] * ((x_26[1u][0u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][0u])))) - (x_26[0u][3u] * ((x_26[1u][0u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][2u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][2u]))) - (x_26[0u][2u] * ((x_26[1u][0u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][0u])))) + (x_26[0u][3u] * ((x_26[1u][0u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][0u]))))), vec4f((((x_26[1u][0u] * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u]))) - (x_26[1u][1u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) + (x_26[1u][3u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[2u][1u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][1u]))) + (x_26[0u][1u] * ((x_26[2u][0u] * x_26[3u][3u]) - (x_26[2u][3u] * x_26[3u][0u])))) - (x_26[0u][3u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][1u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][1u]))) - (x_26[0u][1u] * ((x_26[1u][0u] * x_26[3u][3u]) - (x_26[1u][3u] * x_26[3u][0u])))) + (x_26[0u][3u] * ((x_26[1u][0u] * x_26[3u][1u]) - (x_26[1u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][1u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][1u]))) + (x_26[0u][1u] * ((x_26[1u][0u] * x_26[2u][3u]) - (x_26[1u][3u] * x_26[2u][0u])))) - (x_26[0u][3u] * ((x_26[1u][0u] * x_26[2u][1u]) - (x_26[1u][1u] * x_26[2u][0u]))))), vec4f((((-(x_26[1u][0u]) * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u]))) + (x_26[1u][1u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))) - (x_26[1u][2u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[2u][1u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][1u]))) - (x_26[0u][1u] * ((x_26[2u][0u] * x_26[3u][2u]) - (x_26[2u][2u] * x_26[3u][0u])))) + (x_26[0u][2u] * ((x_26[2u][0u] * x_26[3u][1u]) - (x_26[2u][1u] * x_26[3u][0u])))), (((-(x_26[0u][0u]) * ((x_26[1u][1u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][1u]))) + (x_26[0u][1u] * ((x_26[1u][0u] * x_26[3u][2u]) - (x_26[1u][2u] * x_26[3u][0u])))) - (x_26[0u][2u] * ((x_26[1u][0u] * x_26[3u][1u]) - (x_26[1u][1u] * x_26[3u][0u])))), (((x_26[0u][0u] * ((x_26[1u][1u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][1u]))) - (x_26[0u][1u] * ((x_26[1u][0u] * x_26[2u][2u]) - (x_26[1u][2u] * x_26[2u][0u])))) + (x_26[0u][2u] * ((x_26[1u][0u] * x_26[2u][1u]) - (x_26[1u][1u] * x_26[2u][0u]))))))); return; } diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl index 2a511a2b85..9d83f4d0c7 100644 --- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl +++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl @@ -19,7 +19,7 @@ fn mat2x2_stride_16_to_arr(m : mat2x2) -> array { } fn f_1() { - let x_15 : mat2x2 = arr_to_mat2x2_stride_16(ssbo.m); + let x_15 : mat2x2f = arr_to_mat2x2_stride_16(ssbo.m); ssbo.m = mat2x2_stride_16_to_arr(x_15); return; } diff --git a/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl b/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl index 9671518133..57e0ee3e82 100644 --- a/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl +++ b/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl @@ -1,6 +1,6 @@ fn main_1() { - var m : mat3x3 = mat3x3(); - m = mat3x3(vec3f(1.0f, 2.0f, 3.0f), vec3f(4.0f, 5.0f, 6.0f), vec3f(7.0f, 8.0f, 9.0f)); + var m : mat3x3f = mat3x3f(); + m = mat3x3f(vec3f(1.0f, 2.0f, 3.0f), vec3f(4.0f, 5.0f, 6.0f), vec3f(7.0f, 8.0f, 9.0f)); m[1i] = vec3f(5.0f, 5.0f, 5.0f); return; }