tint/reader/spirv: Generate 'i' suffixed literals
For all i32 literal values.
Reduces risk of the SPIR-V reader producing WGSL that behaves
differently, when abstract-integers are fully implemented.
Bug: tint:1504
Change-Id: Ieaf8afec5b09c7978c75a38c6ed144633ddc017e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88843
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/reader/spirv/function.cc b/src/tint/reader/spirv/function.cc
index ef3d7f0..f2fa3a4 100644
--- a/src/tint/reader/spirv/function.cc
+++ b/src/tint/reader/spirv/function.cc
@@ -2989,9 +2989,9 @@
selectors.emplace_back(create<ast::IntLiteralExpression>(
Source{}, value32, ast::IntLiteralExpression::Suffix::kU));
} else {
- selectors.emplace_back(create<ast::IntLiteralExpression>(
- Source{}, static_cast<int32_t>(value32),
- ast::IntLiteralExpression::Suffix::kNone));
+ selectors.emplace_back(
+ create<ast::IntLiteralExpression>(Source{}, static_cast<int32_t>(value32),
+ ast::IntLiteralExpression::Suffix::kI));
}
}
}
diff --git a/src/tint/reader/spirv/function_arithmetic_test.cc b/src/tint/reader/spirv/function_arithmetic_test.cc
index c82e19f..9db49d9 100644
--- a/src/tint/reader/spirv/function_arithmetic_test.cc
+++ b/src/tint/reader/spirv/function_arithmetic_test.cc
@@ -81,16 +81,16 @@
return "vec2<u32>(20u, 10u)";
}
if (assembly == "v2int_30_40") {
- return "vec2<i32>(30, 40)";
+ return "vec2<i32>(30i, 40i)";
}
if (assembly == "v2int_40_30") {
- return "vec2<i32>(40, 30)";
+ return "vec2<i32>(40i, 30i)";
}
if (assembly == "cast_int_v2uint_10_20") {
return "bitcast<vec2<i32>>(vec2<u32>(10u, 20u))";
}
if (assembly == "cast_uint_v2int_40_30") {
- return "bitcast<vec2<u32>>(vec2<i32>(40, 30))";
+ return "bitcast<vec2<u32>>(vec2<i32>(40i, 30i))";
}
if (assembly == "v2float_50_60") {
return "vec2<f32>(50.0, 60.0)";
@@ -116,7 +116,7 @@
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 : i32 = -(30);"));
+ EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr("let x_1 : i32 = -(30i);"));
}
TEST_F(SpvUnaryArithTest, SNegate_Int_Uint) {
@@ -150,7 +150,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : u32 = bitcast<u32>(-(30));"));
+ HasSubstr("let x_1 : u32 = bitcast<u32>(-(30i));"));
}
TEST_F(SpvUnaryArithTest, SNegate_Uint_Uint) {
@@ -184,7 +184,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : vec2<i32> = -(vec2<i32>(30, 40));"));
+ HasSubstr("let x_1 : vec2<i32> = -(vec2<i32>(30i, 40i));"));
}
TEST_F(SpvUnaryArithTest, SNegate_SignedVec_UnsignedVec) {
@@ -218,7 +218,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : vec2<u32> = bitcast<vec2<u32>>(-(vec2<i32>(30, 40)));"));
+ HasSubstr("let x_1 : vec2<u32> = bitcast<vec2<u32>>(-(vec2<i32>(30i, 40i)));"));
}
TEST_F(SpvUnaryArithTest, SNegate_UnsignedVec_UnsignedVec) {
@@ -359,7 +359,7 @@
::testing::Values(
// Both uint
BinaryData{"uint", "uint_10", "OpIAdd", "uint_20", "u32", "10u", "+", "20u"}, // Both int
- BinaryData{"int", "int_30", "OpIAdd", "int_40", "i32", "30", "+", "40"}, // Both v2uint
+ BinaryData{"int", "int_30", "OpIAdd", "int_40", "i32", "30i", "+", "40i"}, // Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpIAdd", "v2uint_20_10", "vec2<u32>",
AstFor("v2uint_10_20"), "+", AstFor("v2uint_20_10")},
// Both v2int
@@ -372,22 +372,23 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpIAdd", "uint_10", "u32",
- "bitcast<u32>((30 + bitcast<i32>(10u)))"},
+ "bitcast<u32>((30i + bitcast<i32>(10u)))"},
// Mixed, int <- int uint
- BinaryDataGeneral{"int", "int_30", "OpIAdd", "uint_10", "i32", "(30 + bitcast<i32>(10u))"},
+ BinaryDataGeneral{"int", "int_30", "OpIAdd", "uint_10", "i32", "(30i + bitcast<i32>(10u))"},
// Mixed, uint <- uint int
- BinaryDataGeneral{"uint", "uint_10", "OpIAdd", "int_30", "u32", "(10u + bitcast<u32>(30))"},
+ BinaryDataGeneral{"uint", "uint_10", "OpIAdd", "int_30", "u32",
+ "(10u + bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpIAdd", "uint_10", "i32",
"bitcast<i32>((20u + 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpIAdd", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) + bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) + bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpIAdd", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) + bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) + bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
INSTANTIATE_TEST_SUITE_P(SpvParserTest_FAdd,
SpvBinaryArithTest,
@@ -405,7 +406,7 @@
::testing::Values(
// Both uint
BinaryData{"uint", "uint_10", "OpISub", "uint_20", "u32", "10u", "-", "20u"}, // Both int
- BinaryData{"int", "int_30", "OpISub", "int_40", "i32", "30", "-", "40"}, // Both v2uint
+ BinaryData{"int", "int_30", "OpISub", "int_40", "i32", "30i", "-", "40i"}, // Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpISub", "v2uint_20_10", "vec2<u32>",
AstFor("v2uint_10_20"), "-", AstFor("v2uint_20_10")},
// Both v2int
@@ -418,22 +419,23 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpISub", "uint_10", "u32",
- R"(bitcast<u32>((30 - bitcast<i32>(10u))))"},
+ R"(bitcast<u32>((30i - bitcast<i32>(10u))))"},
// Mixed, int <- int uint
- BinaryDataGeneral{"int", "int_30", "OpISub", "uint_10", "i32", "(30 - bitcast<i32>(10u))"},
+ BinaryDataGeneral{"int", "int_30", "OpISub", "uint_10", "i32", "(30i - bitcast<i32>(10u))"},
// Mixed, uint <- uint int
- BinaryDataGeneral{"uint", "uint_10", "OpISub", "int_30", "u32", "(10u - bitcast<u32>(30))"},
+ BinaryDataGeneral{"uint", "uint_10", "OpISub", "int_30", "u32",
+ "(10u - bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpISub", "uint_10", "i32",
"bitcast<i32>((20u - 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpISub", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) - bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) - bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpISub", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) - bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) - bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
INSTANTIATE_TEST_SUITE_P(SpvParserTest_FSub,
SpvBinaryArithTest,
@@ -451,7 +453,7 @@
::testing::Values(
// Both uint
BinaryData{"uint", "uint_10", "OpIMul", "uint_20", "u32", "10u", "*", "20u"}, // Both int
- BinaryData{"int", "int_30", "OpIMul", "int_40", "i32", "30", "*", "40"}, // Both v2uint
+ BinaryData{"int", "int_30", "OpIMul", "int_40", "i32", "30i", "*", "40i"}, // Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpIMul", "v2uint_20_10", "vec2<u32>",
AstFor("v2uint_10_20"), "*", AstFor("v2uint_20_10")},
// Both v2int
@@ -464,22 +466,23 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpIMul", "uint_10", "u32",
- "bitcast<u32>((30 * bitcast<i32>(10u)))"},
+ "bitcast<u32>((30i * bitcast<i32>(10u)))"},
// Mixed, int <- int uint
- BinaryDataGeneral{"int", "int_30", "OpIMul", "uint_10", "i32", "(30 * bitcast<i32>(10u))"},
+ BinaryDataGeneral{"int", "int_30", "OpIMul", "uint_10", "i32", "(30i * bitcast<i32>(10u))"},
// Mixed, uint <- uint int
- BinaryDataGeneral{"uint", "uint_10", "OpIMul", "int_30", "u32", "(10u * bitcast<u32>(30))"},
+ BinaryDataGeneral{"uint", "uint_10", "OpIMul", "int_30", "u32",
+ "(10u * bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpIMul", "uint_10", "i32",
"bitcast<i32>((20u * 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpIMul", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) * bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) * bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpIMul", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) * bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) * bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
INSTANTIATE_TEST_SUITE_P(SpvParserTest_FMul,
SpvBinaryArithTest,
@@ -506,7 +509,7 @@
SpvBinaryArithTest,
::testing::Values(
// Both int
- BinaryData{"int", "int_30", "OpSDiv", "int_40", "i32", "30", "/", "40"}, // Both v2int
+ BinaryData{"int", "int_30", "OpSDiv", "int_40", "i32", "30i", "/", "40i"}, // Both v2int
BinaryData{"v2int", "v2int_30_40", "OpSDiv", "v2int_40_30", "vec2<i32>",
AstFor("v2int_30_40"), "/", AstFor("v2int_40_30")}));
@@ -515,10 +518,10 @@
SpvBinaryArithTest,
::testing::Values(
// Mixed, returning int, second arg uint
- BinaryData{"int", "int_30", "OpSDiv", "uint_10", "i32", "30", "/", "bitcast<i32>(10u)"},
+ BinaryData{"int", "int_30", "OpSDiv", "uint_10", "i32", "30i", "/", "bitcast<i32>(10u)"},
// Mixed, returning int, first arg uint
BinaryData{"int", "uint_10", "OpSDiv", "int_30", "i32", "bitcast<i32>(10u)", "/",
- "30"}, // Mixed, returning v2int, first arg v2uint
+ "30i"}, // Mixed, returning v2int, first arg v2uint
BinaryData{"v2int", "v2uint_10_20", "OpSDiv", "v2int_30_40", "vec2<i32>",
AstFor("cast_int_v2uint_10_20"), "/", AstFor("v2int_30_40")},
// Mixed, returning v2int, second arg v2uint
@@ -543,7 +546,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : u32 = bitcast<u32>((30 / 40));"));
+ HasSubstr("let x_1 : u32 = bitcast<u32>((30i / 40i));"));
}
TEST_F(SpvBinaryArithTestBasic, SDiv_Vector_UnsignedResult) {
@@ -566,7 +569,7 @@
EXPECT_THAT(
test::ToString(p->program(), ast_body),
HasSubstr(
- R"(let x_1 : vec2<u32> = bitcast<vec2<u32>>((vec2<i32>(30, 40) / vec2<i32>(40, 30)));)"));
+ R"(let x_1 : vec2<u32> = bitcast<vec2<u32>>((vec2<i32>(30i, 40i) / vec2<i32>(40i, 30i)));)"));
}
INSTANTIATE_TEST_SUITE_P(SpvParserTest_FDiv,
@@ -597,7 +600,7 @@
SpvBinaryArithTest,
::testing::Values(
// Both int
- BinaryData{"int", "int_30", "OpSMod", "int_40", "i32", "30", "%", "40"}, // Both v2int
+ BinaryData{"int", "int_30", "OpSMod", "int_40", "i32", "30i", "%", "40i"}, // Both v2int
BinaryData{"v2int", "v2int_30_40", "OpSMod", "v2int_40_30", "vec2<i32>",
AstFor("v2int_30_40"), "%", AstFor("v2int_40_30")}));
@@ -606,10 +609,10 @@
SpvBinaryArithTest,
::testing::Values(
// Mixed, returning int, second arg uint
- BinaryData{"int", "int_30", "OpSMod", "uint_10", "i32", "30", "%", "bitcast<i32>(10u)"},
+ BinaryData{"int", "int_30", "OpSMod", "uint_10", "i32", "30i", "%", "bitcast<i32>(10u)"},
// Mixed, returning int, first arg uint
BinaryData{"int", "uint_10", "OpSMod", "int_30", "i32", "bitcast<i32>(10u)", "%",
- "30"}, // Mixed, returning v2int, first arg v2uint
+ "30i"}, // Mixed, returning v2int, first arg v2uint
BinaryData{"v2int", "v2uint_10_20", "OpSMod", "v2int_30_40", "vec2<i32>",
AstFor("cast_int_v2uint_10_20"), "%", AstFor("v2int_30_40")},
// Mixed, returning v2int, second arg v2uint
@@ -634,7 +637,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : u32 = bitcast<u32>((30 % 40));"));
+ HasSubstr("let x_1 : u32 = bitcast<u32>((30i % 40i));"));
}
TEST_F(SpvBinaryArithTestBasic, SMod_Vector_UnsignedResult) {
@@ -657,7 +660,7 @@
EXPECT_THAT(
test::ToString(p->program(), ast_body),
HasSubstr(
- R"(let x_1 : vec2<u32> = bitcast<vec2<u32>>((vec2<i32>(30, 40) % vec2<i32>(40, 30)));)"));
+ R"(let x_1 : vec2<u32> = bitcast<vec2<u32>>((vec2<i32>(30i, 40i) % vec2<i32>(40i, 30i)));)"));
}
INSTANTIATE_TEST_SUITE_P(SpvParserTest_FRem,
diff --git a/src/tint/reader/spirv/function_bit_test.cc b/src/tint/reader/spirv/function_bit_test.cc
index 7f63cb0..a8e97b3 100644
--- a/src/tint/reader/spirv/function_bit_test.cc
+++ b/src/tint/reader/spirv/function_bit_test.cc
@@ -72,10 +72,10 @@
return "vec2<u32>(20u, 10u)";
}
if (assembly == "v2int_30_40") {
- return "vec2<i32>(30, 40)";
+ return "vec2<i32>(30i, 40i)";
}
if (assembly == "v2int_40_30") {
- return "vec2<i32>(40, 30)";
+ return "vec2<i32>(40i, 30i)";
}
if (assembly == "cast_int_v2uint_10_20") {
return "bitcast<vec2<i32>(vec2<u32>(10u, 20u))";
@@ -177,7 +177,7 @@
// uint uint -> uint
BinaryData{"uint", "uint_10", "OpShiftLeftLogical", "uint_20", "u32", "10u", "<<", "20u"},
// int, uint -> int
- BinaryData{"int", "int_30", "OpShiftLeftLogical", "uint_20", "i32", "30", "<<", "20u"},
+ BinaryData{"int", "int_30", "OpShiftLeftLogical", "uint_20", "i32", "30i", "<<", "20u"},
// v2uint v2uint -> v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpShiftLeftLogical", "v2uint_20_10", "vec2<u32>",
AstFor("v2uint_10_20"), "<<", AstFor("v2uint_20_10")},
@@ -192,16 +192,16 @@
::testing::Values(
// int, int -> int
BinaryDataGeneral{"int", "int_30", "OpShiftLeftLogical", "int_40", "i32",
- "(30 << bitcast<u32>(40))"},
+ "(30i << bitcast<u32>(40i))"},
// uint, int -> uint
BinaryDataGeneral{"uint", "uint_10", "OpShiftLeftLogical", "int_40", "u32",
- "(10u << bitcast<u32>(40))"},
+ "(10u << bitcast<u32>(40i))"},
// v2uint, v2int -> v2uint
BinaryDataGeneral{"v2uint", "v2uint_10_20", "OpShiftLeftLogical", "v2uint_20_10",
"vec2<u32>", "(vec2<u32>(10u, 20u) << vec2<u32>(20u, 10u))"},
// v2int, v2int -> v2int
BinaryDataGeneral{"v2int", "v2int_30_40", "OpShiftLeftLogical", "v2int_40_30", "vec2<i32>",
- "(vec2<i32>(30, 40) << bitcast<vec2<u32>>(vec2<i32>(40, 30)))"}));
+ "(vec2<i32>(30i, 40i) << bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftLeftLogical_BitcastResult,
@@ -209,11 +209,11 @@
::testing::Values(
// int, int -> uint
BinaryDataGeneral{"uint", "int_30", "OpShiftLeftLogical", "uint_10", "u32",
- "bitcast<u32>((30 << 10u))"},
+ "bitcast<u32>((30i << 10u))"},
// v2uint, v2int -> v2uint
BinaryDataGeneral{"v2uint", "v2int_30_40", "OpShiftLeftLogical", "v2uint_20_10",
"vec2<u32>",
- "bitcast<vec2<u32>>((vec2<i32>(30, 40) << vec2<u32>(20u, 10u)))"}));
+ "bitcast<vec2<u32>>((vec2<i32>(30i, 40i) << vec2<u32>(20u, 10u)))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftRightLogical_Arg2Unsigned,
@@ -224,14 +224,14 @@
"(10u >> 20u)"},
// int, uint -> int
BinaryDataGeneral{"int", "int_30", "OpShiftRightLogical", "uint_20", "i32",
- "bitcast<i32>((bitcast<u32>(30) >> 20u))"},
+ "bitcast<i32>((bitcast<u32>(30i) >> 20u))"},
// v2uint, v2uint -> v2uint
BinaryDataGeneral{"v2uint", "v2uint_10_20", "OpShiftRightLogical", "v2uint_20_10",
"vec2<u32>", "(vec2<u32>(10u, 20u) >> vec2<u32>(20u, 10u))"},
// v2int, v2uint -> v2int
BinaryDataGeneral{
"v2int", "v2int_30_40", "OpShiftRightLogical", "v2uint_10_20", "vec2<i32>",
- R"(bitcast<vec2<i32>>((bitcast<vec2<u32>>(vec2<i32>(30, 40)) >> vec2<u32>(10u, 20u))))"}));
+ R"(bitcast<vec2<i32>>((bitcast<vec2<u32>>(vec2<i32>(30i, 40i)) >> vec2<u32>(10u, 20u))))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftRightLogical_Arg2Signed,
@@ -239,18 +239,18 @@
::testing::Values(
// uint, int -> uint
BinaryDataGeneral{"uint", "uint_10", "OpShiftRightLogical", "int_30", "u32",
- "(10u >> bitcast<u32>(30))"},
+ "(10u >> bitcast<u32>(30i))"},
// int, int -> int
BinaryDataGeneral{"int", "int_30", "OpShiftRightLogical", "int_40", "i32",
- "bitcast<i32>((bitcast<u32>(30) >> bitcast<u32>(40)))"},
+ "bitcast<i32>((bitcast<u32>(30i) >> bitcast<u32>(40i)))"},
// v2uint, v2int -> v2uint
BinaryDataGeneral{"v2uint", "v2uint_10_20", "OpShiftRightLogical", "v2int_30_40",
"vec2<u32>",
- "(vec2<u32>(10u, 20u) >> bitcast<vec2<u32>>(vec2<i32>(30, 40)))"},
+ "(vec2<u32>(10u, 20u) >> bitcast<vec2<u32>>(vec2<i32>(30i, 40i)))"},
// v2int, v2int -> v2int
BinaryDataGeneral{
"v2int", "v2int_40_30", "OpShiftRightLogical", "v2int_30_40", "vec2<i32>",
- R"(bitcast<vec2<i32>>((bitcast<vec2<u32>>(vec2<i32>(40, 30)) >> bitcast<vec2<u32>>(vec2<i32>(30, 40)))))"}));
+ R"(bitcast<vec2<i32>>((bitcast<vec2<u32>>(vec2<i32>(40i, 30i)) >> bitcast<vec2<u32>>(vec2<i32>(30i, 40i)))))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftRightLogical_BitcastResult,
@@ -273,14 +273,14 @@
"bitcast<u32>((bitcast<i32>(10u) >> 20u))"},
// int, uint -> int
BinaryDataGeneral{"int", "int_30", "OpShiftRightArithmetic", "uint_10", "i32",
- "(30 >> 10u)"},
+ "(30i >> 10u)"},
// v2uint, v2uint -> v2uint
BinaryDataGeneral{
"v2uint", "v2uint_10_20", "OpShiftRightArithmetic", "v2uint_20_10", "vec2<u32>",
R"(bitcast<vec2<u32>>((bitcast<vec2<i32>>(vec2<u32>(10u, 20u)) >> vec2<u32>(20u, 10u))))"},
// v2int, v2uint -> v2int
BinaryDataGeneral{"v2int", "v2int_40_30", "OpShiftRightArithmetic", "v2uint_20_10",
- "vec2<i32>", "(vec2<i32>(40, 30) >> vec2<u32>(20u, 10u))"}));
+ "vec2<i32>", "(vec2<i32>(40i, 30i) >> vec2<u32>(20u, 10u))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftRightArithmetic_Arg2Signed,
@@ -288,18 +288,18 @@
::testing::Values(
// uint, int -> uint
BinaryDataGeneral{"uint", "uint_10", "OpShiftRightArithmetic", "int_30", "u32",
- "bitcast<u32>((bitcast<i32>(10u) >> bitcast<u32>(30)))"},
+ "bitcast<u32>((bitcast<i32>(10u) >> bitcast<u32>(30i)))"},
// int, int -> int
BinaryDataGeneral{"int", "int_30", "OpShiftRightArithmetic", "int_40", "i32",
- "(30 >> bitcast<u32>(40))"},
+ "(30i >> bitcast<u32>(40i))"},
// v2uint, v2int -> v2uint
BinaryDataGeneral{
"v2uint", "v2uint_10_20", "OpShiftRightArithmetic", "v2int_30_40", "vec2<u32>",
- R"(bitcast<vec2<u32>>((bitcast<vec2<i32>>(vec2<u32>(10u, 20u)) >> bitcast<vec2<u32>>(vec2<i32>(30, 40)))))"},
+ R"(bitcast<vec2<u32>>((bitcast<vec2<i32>>(vec2<u32>(10u, 20u)) >> bitcast<vec2<u32>>(vec2<i32>(30i, 40i)))))"},
// v2int, v2int -> v2int
BinaryDataGeneral{"v2int", "v2int_40_30", "OpShiftRightArithmetic", "v2int_30_40",
"vec2<i32>",
- "(vec2<i32>(40, 30) >> bitcast<vec2<u32>>(vec2<i32>(30, 40)))"}));
+ "(vec2<i32>(40i, 30i) >> bitcast<vec2<u32>>(vec2<i32>(30i, 40i)))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_ShiftRightArithmetic_BitcastResult,
@@ -307,11 +307,11 @@
::testing::Values(
// int, uint -> uint
BinaryDataGeneral{"uint", "int_30", "OpShiftRightArithmetic", "uint_10", "u32",
- "bitcast<u32>((30 >> 10u))"},
+ "bitcast<u32>((30i >> 10u))"},
// v2int, v2uint -> v2uint
BinaryDataGeneral{"v2uint", "v2int_30_40", "OpShiftRightArithmetic", "v2uint_20_10",
"vec2<u32>",
- "bitcast<vec2<u32>>((vec2<i32>(30, 40) >> vec2<u32>(20u, 10u)))"}));
+ "bitcast<vec2<u32>>((vec2<i32>(30i, 40i) >> vec2<u32>(20u, 10u)))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_BitwiseAnd,
@@ -320,7 +320,7 @@
// Both uint
BinaryData{"uint", "uint_10", "OpBitwiseAnd", "uint_20", "u32", "10u", "&", "20u"},
// Both int
- BinaryData{"int", "int_30", "OpBitwiseAnd", "int_40", "i32", "30", "&", "40"},
+ BinaryData{"int", "int_30", "OpBitwiseAnd", "int_40", "i32", "30i", "&", "40i"},
// TODO(crbug.com/tint/678): Resolver fails on vector bitwise operations
// Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpBitwiseAnd", "v2uint_20_10", "vec2<u32>",
@@ -335,24 +335,24 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpBitwiseAnd", "uint_10", "u32",
- "bitcast<u32>((30 & bitcast<i32>(10u)))"},
+ "bitcast<u32>((30i & bitcast<i32>(10u)))"},
// Mixed, int <- int uint
BinaryDataGeneral{"int", "int_30", "OpBitwiseAnd", "uint_10", "i32",
- "(30 & bitcast<i32>(10u))"},
+ "(30i & bitcast<i32>(10u))"},
// Mixed, uint <- uint int
BinaryDataGeneral{"uint", "uint_10", "OpBitwiseAnd", "int_30", "u32",
- "(10u & bitcast<u32>(30))"},
+ "(10u & bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpBitwiseAnd", "uint_10", "i32",
"bitcast<i32>((20u & 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpBitwiseAnd", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) & bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) & bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpBitwiseAnd", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) & bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) & bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_BitwiseOr,
@@ -361,7 +361,7 @@
// Both uint
BinaryData{"uint", "uint_10", "OpBitwiseOr", "uint_20", "u32", "10u", "|", "20u"},
// Both int
- BinaryData{"int", "int_30", "OpBitwiseOr", "int_40", "i32", "30", "|", "40"},
+ BinaryData{"int", "int_30", "OpBitwiseOr", "int_40", "i32", "30i", "|", "40i"},
// TODO(crbug.com/tint/678): Resolver fails on vector bitwise operations
// Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpBitwiseOr", "v2uint_20_10", "vec2<u32>",
@@ -376,24 +376,24 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpBitwiseOr", "uint_10", "u32",
- "bitcast<u32>((30 | bitcast<i32>(10u)))"},
+ "bitcast<u32>((30i | bitcast<i32>(10u)))"},
// Mixed, int <- int uint
BinaryDataGeneral{"int", "int_30", "OpBitwiseOr", "uint_10", "i32",
- "(30 | bitcast<i32>(10u))"},
+ "(30i | bitcast<i32>(10u))"},
// Mixed, uint <- uint int
BinaryDataGeneral{"uint", "uint_10", "OpBitwiseOr", "int_30", "u32",
- "(10u | bitcast<u32>(30))"},
+ "(10u | bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpBitwiseOr", "uint_10", "i32",
"bitcast<i32>((20u | 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpBitwiseOr", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) | bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) | bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpBitwiseOr", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) | bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) | bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
INSTANTIATE_TEST_SUITE_P(
SpvParserTest_BitwiseXor,
@@ -402,7 +402,7 @@
// Both uint
BinaryData{"uint", "uint_10", "OpBitwiseXor", "uint_20", "u32", "10u", "^", "20u"},
// Both int
- BinaryData{"int", "int_30", "OpBitwiseXor", "int_40", "i32", "30", "^", "40"},
+ BinaryData{"int", "int_30", "OpBitwiseXor", "int_40", "i32", "30i", "^", "40i"},
// TODO(crbug.com/tint/678): Resolver fails on vector bitwise operations
// Both v2uint
BinaryData{"v2uint", "v2uint_10_20", "OpBitwiseXor", "v2uint_20_10", "vec2<u32>",
@@ -417,24 +417,24 @@
::testing::Values(
// Mixed, uint <- int uint
BinaryDataGeneral{"uint", "int_30", "OpBitwiseXor", "uint_10", "u32",
- "bitcast<u32>((30 ^ bitcast<i32>(10u)))"},
+ "bitcast<u32>((30i ^ bitcast<i32>(10u)))"},
// Mixed, int <- int uint
BinaryDataGeneral{"int", "int_30", "OpBitwiseXor", "uint_10", "i32",
- "(30 ^ bitcast<i32>(10u))"},
+ "(30i ^ bitcast<i32>(10u))"},
// Mixed, uint <- uint int
BinaryDataGeneral{"uint", "uint_10", "OpBitwiseXor", "int_30", "u32",
- "(10u ^ bitcast<u32>(30))"},
+ "(10u ^ bitcast<u32>(30i))"},
// Mixed, int <- uint uint
BinaryDataGeneral{"int", "uint_20", "OpBitwiseXor", "uint_10", "i32",
"bitcast<i32>((20u ^ 10u))"},
// Mixed, returning v2uint
BinaryDataGeneral{
"v2uint", "v2int_30_40", "OpBitwiseXor", "v2uint_10_20", "vec2<u32>",
- R"(bitcast<vec2<u32>>((vec2<i32>(30, 40) ^ bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
+ R"(bitcast<vec2<u32>>((vec2<i32>(30i, 40i) ^ bitcast<vec2<i32>>(vec2<u32>(10u, 20u)))))"},
// Mixed, returning v2int
BinaryDataGeneral{
"v2int", "v2uint_10_20", "OpBitwiseXor", "v2int_40_30", "vec2<i32>",
- R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) ^ bitcast<vec2<u32>>(vec2<i32>(40, 30)))))"}));
+ R"(bitcast<vec2<i32>>((vec2<u32>(10u, 20u) ^ bitcast<vec2<u32>>(vec2<i32>(40i, 30i)))))"}));
TEST_F(SpvUnaryBitTest, Not_Int_Int) {
const auto assembly = SimplePreamble() + R"(
@@ -450,7 +450,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : i32 = ~(30);"));
+ EXPECT_THAT(body, HasSubstr("let x_1 : i32 = ~(30i);"));
}
TEST_F(SpvUnaryBitTest, Not_Int_Uint) {
@@ -484,7 +484,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : u32 = bitcast<u32>(~(30));"));
+ EXPECT_THAT(body, HasSubstr("let x_1 : u32 = bitcast<u32>(~(30i));"));
}
TEST_F(SpvUnaryBitTest, Not_Uint_Uint) {
@@ -518,7 +518,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = ~(vec2<i32>(30, 40));"));
+ EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = ~(vec2<i32>(30i, 40i));"));
}
TEST_F(SpvUnaryBitTest, Not_SignedVec_UnsignedVec) {
@@ -553,7 +553,8 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : vec2<u32> = bitcast<vec2<u32>>(~(vec2<i32>(30, 40)));"));
+ EXPECT_THAT(body,
+ HasSubstr("let x_1 : vec2<u32> = bitcast<vec2<u32>>(~(vec2<i32>(30i, 40i)));"));
}
TEST_F(SpvUnaryBitTest, Not_UnsignedVec_UnsignedVec) {
const auto assembly = SimplePreamble() + R"(
@@ -840,7 +841,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = insertBits(30, 40, 10u, 20u);")) << body;
+ EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = insertBits(30i, 40i, 10u, 20u);")) << body;
}
TEST_F(SpvUnaryBitTest, InsertBits_IntVector) {
@@ -858,7 +859,7 @@
EXPECT_THAT(
body,
HasSubstr(
- R"(let x_1 : vec2<i32> = insertBits(vec2<i32>(30, 40), vec2<i32>(40, 30), 10u, 20u);)"))
+ R"(let x_1 : vec2<i32> = insertBits(vec2<i32>(30i, 40i), vec2<i32>(40i, 30i), 10u, 20u);)"))
<< body;
}
@@ -908,7 +909,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = extractBits(30, 10u, 20u);")) << body;
+ EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = extractBits(30i, 10u, 20u);")) << body;
}
TEST_F(SpvUnaryBitTest, ExtractBits_IntVector) {
@@ -923,7 +924,8 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
auto body = test::ToString(p->program(), ast_body);
- EXPECT_THAT(body, HasSubstr("let x_1 : vec2<i32> = extractBits(vec2<i32>(30, 40), 10u, 20u);"))
+ EXPECT_THAT(body,
+ HasSubstr("let x_1 : vec2<i32> = extractBits(vec2<i32>(30i, 40i), 10u, 20u);"))
<< body;
}
diff --git a/src/tint/reader/spirv/function_cfg_test.cc b/src/tint/reader/spirv/function_cfg_test.cc
index 6526667..edeea55 100644
--- a/src/tint/reader/spirv/function_cfg_test.cc
+++ b/src/tint/reader/spirv/function_cfg_test.cc
@@ -9392,14 +9392,14 @@
auto ast_body = fe.ast_body();
auto got = test::ToString(p->program(), ast_body);
auto* expect = R"(var_1 = 1u;
-switch(42) {
- case -294967296: {
+switch(42i) {
+ case -294967296i: {
var_1 = 40u;
}
- case 2000000000: {
+ case 2000000000i: {
var_1 = 30u;
}
- case 20: {
+ case 20i: {
var_1 = 20u;
}
default: {
diff --git a/src/tint/reader/spirv/function_composite_test.cc b/src/tint/reader/spirv/function_composite_test.cc
index 9383c00..2e15743 100644
--- a/src/tint/reader/spirv/function_composite_test.cc
+++ b/src/tint/reader/spirv/function_composite_test.cc
@@ -97,7 +97,7 @@
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
HasSubstr(R"(let x_1 : vec2<u32> = vec2<u32>(10u, 20u);
-let x_2 : vec2<i32> = vec2<i32>(30, 40);
+let x_2 : vec2<i32> = vec2<i32>(30i, 40i);
let x_3 : vec2<f32> = vec2<f32>(50.0, 60.0);
)"));
}
@@ -153,7 +153,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_1 : S = S(vec2<f32>(50.0, 60.0), 5u, 30);"));
+ HasSubstr("let x_1 : S = S(vec2<f32>(50.0, 60.0), 5u, 30i);"));
}
TEST_F(SpvParserTest_Composite_Construct, ConstantComposite_Struct_NoDeduplication) {
@@ -608,7 +608,7 @@
EXPECT_THAT(body_str, HasSubstr(R"(var x_36 : S;
let x_1 : S = x_36;
var x_2_1 : S = x_1;
-x_2_1.field2 = 30;
+x_2_1.field2 = 30i;
let x_2 : S = x_2_1;
)")) << body_str;
}
diff --git a/src/tint/reader/spirv/function_logical_test.cc b/src/tint/reader/spirv/function_logical_test.cc
index a6d0f2c..ba73d5d 100644
--- a/src/tint/reader/spirv/function_logical_test.cc
+++ b/src/tint/reader/spirv/function_logical_test.cc
@@ -94,22 +94,22 @@
return "bitcast<vec2<i32>>(vec2<u32>(20u, 10u))";
}
if (assembly == "cast_int_30") {
- return "bitcast<u32>(30)";
+ return "bitcast<u32>(30i)";
}
if (assembly == "cast_int_40") {
- return "bitcast<u32>(40)";
+ return "bitcast<u32>(40i)";
}
if (assembly == "v2int_30_40") {
- return "vec2<i32>(30, 40)";
+ return "vec2<i32>(30i, 40i)";
}
if (assembly == "cast_v2int_30_40") {
- return "bitcast<vec2<u32>>(vec2<i32>(30, 40))";
+ return "bitcast<vec2<u32>>(vec2<i32>(30i, 40i))";
}
if (assembly == "v2int_40_30") {
- return "vec2<i32>(40, 30)";
+ return "vec2<i32>(40i, 30i)";
}
if (assembly == "cast_v2int_40_30") {
- return "bitcast<vec2<u32>>(vec2<i32>(40, 30))";
+ return "bitcast<vec2<u32>>(vec2<i32>(40i, 30i))";
}
if (assembly == "v2float_50_60") {
return "vec2<f32>(50.0, 60.0)";
@@ -202,12 +202,12 @@
// uint uint
BinaryData{"bool", "uint_10", "OpIEqual", "uint_20", "bool", "10u", "==", "20u"},
// int int
- BinaryData{"bool", "int_30", "OpIEqual", "int_40", "bool", "30", "==", "40"},
+ BinaryData{"bool", "int_30", "OpIEqual", "int_40", "bool", "30i", "==", "40i"},
// uint int
BinaryData{"bool", "uint_10", "OpIEqual", "int_40", "bool", "10u",
- "==", "bitcast<u32>(40)"},
+ "==", "bitcast<u32>(40i)"},
// int uint
- BinaryData{"bool", "int_40", "OpIEqual", "uint_10", "bool", "40",
+ BinaryData{"bool", "int_40", "OpIEqual", "uint_10", "bool", "40i",
"==", "bitcast<i32>(10u)"},
// v2uint v2uint
BinaryData{"v2bool", "v2uint_10_20", "OpIEqual", "v2uint_20_10", "vec2<bool>",
@@ -232,12 +232,12 @@
// Both uint
BinaryData{"bool", "uint_10", "OpINotEqual", "uint_20", "bool", "10u", "!=", "20u"},
// Both int
- BinaryData{"bool", "int_30", "OpINotEqual", "int_40", "bool", "30", "!=", "40"},
+ BinaryData{"bool", "int_30", "OpINotEqual", "int_40", "bool", "30i", "!=", "40i"},
// uint int
BinaryData{"bool", "uint_10", "OpINotEqual", "int_40", "bool", "10u",
- "!=", "bitcast<u32>(40)"},
+ "!=", "bitcast<u32>(40i)"},
// int uint
- BinaryData{"bool", "int_40", "OpINotEqual", "uint_10", "bool", "40",
+ BinaryData{"bool", "int_40", "OpINotEqual", "uint_10", "bool", "40i",
"!=", "bitcast<i32>(10u)"},
// Both v2uint
BinaryData{"v2bool", "v2uint_10_20", "OpINotEqual", "v2uint_20_10", "vec2<bool>",
@@ -416,12 +416,12 @@
SpvBinaryLogicalTest,
::testing::Values(
// Both signed
- BinaryData{"bool", "int_30", "OpSGreaterThan", "int_40", "bool", "30", ">", "40"},
+ BinaryData{"bool", "int_30", "OpSGreaterThan", "int_40", "bool", "30i", ">", "40i"},
// First arg unsigned
BinaryData{"bool", "uint_10", "OpSGreaterThan", "int_40", "bool", AstFor("cast_uint_10"),
- ">", "40"},
+ ">", "40i"},
// Second arg unsigned
- BinaryData{"bool", "int_30", "OpSGreaterThan", "uint_20", "bool", "30", ">",
+ BinaryData{"bool", "int_30", "OpSGreaterThan", "uint_20", "bool", "30i", ">",
AstFor("cast_uint_20")},
// Vector, both signed
BinaryData{"v2bool", "v2int_30_40", "OpSGreaterThan", "v2int_40_30", "vec2<bool>",
@@ -438,12 +438,12 @@
SpvBinaryLogicalTest,
::testing::Values(
// Both signed
- BinaryData{"bool", "int_30", "OpSGreaterThanEqual", "int_40", "bool", "30", ">=", "40"},
+ BinaryData{"bool", "int_30", "OpSGreaterThanEqual", "int_40", "bool", "30i", ">=", "40i"},
// First arg unsigned
BinaryData{"bool", "uint_10", "OpSGreaterThanEqual", "int_40", "bool",
- AstFor("cast_uint_10"), ">=", "40"},
+ AstFor("cast_uint_10"), ">=", "40i"},
// Second arg unsigned
- BinaryData{"bool", "int_30", "OpSGreaterThanEqual", "uint_20", "bool", "30",
+ BinaryData{"bool", "int_30", "OpSGreaterThanEqual", "uint_20", "bool", "30i",
">=", AstFor("cast_uint_20")},
// Vector, both signed
BinaryData{"v2bool", "v2int_30_40", "OpSGreaterThanEqual", "v2int_40_30", "vec2<bool>",
@@ -460,12 +460,12 @@
SpvBinaryLogicalTest,
::testing::Values(
// Both signed
- BinaryData{"bool", "int_30", "OpSLessThan", "int_40", "bool", "30", "<", "40"},
+ BinaryData{"bool", "int_30", "OpSLessThan", "int_40", "bool", "30i", "<", "40i"},
// First arg unsigned
BinaryData{"bool", "uint_10", "OpSLessThan", "int_40", "bool", AstFor("cast_uint_10"), "<",
- "40"},
+ "40i"},
// Second arg unsigned
- BinaryData{"bool", "int_30", "OpSLessThan", "uint_20", "bool", "30", "<",
+ BinaryData{"bool", "int_30", "OpSLessThan", "uint_20", "bool", "30i", "<",
AstFor("cast_uint_20")},
// Vector, both signed
BinaryData{"v2bool", "v2int_30_40", "OpSLessThan", "v2int_40_30", "vec2<bool>",
@@ -482,12 +482,12 @@
SpvBinaryLogicalTest,
::testing::Values(
// Both signed
- BinaryData{"bool", "int_30", "OpSLessThanEqual", "int_40", "bool", "30", "<=", "40"},
+ BinaryData{"bool", "int_30", "OpSLessThanEqual", "int_40", "bool", "30i", "<=", "40i"},
// First arg unsigned
BinaryData{"bool", "uint_10", "OpSLessThanEqual", "int_40", "bool", AstFor("cast_uint_10"),
- "<=", "40"},
+ "<=", "40i"},
// Second arg unsigned
- BinaryData{"bool", "int_30", "OpSLessThanEqual", "uint_20", "bool", "30",
+ BinaryData{"bool", "int_30", "OpSLessThanEqual", "uint_20", "bool", "30i",
"<=", AstFor("cast_uint_20")},
// Vector, both signed
BinaryData{"v2bool", "v2int_30_40", "OpSLessThanEqual", "v2int_40_30", "vec2<bool>",
diff --git a/src/tint/reader/spirv/function_memory_test.cc b/src/tint/reader/spirv/function_memory_test.cc
index ea57e25..58cceda 100644
--- a/src/tint/reader/spirv/function_memory_test.cc
+++ b/src/tint/reader/spirv/function_memory_test.cc
@@ -107,8 +107,9 @@
auto fe = p->function_emitter(100);
EXPECT_TRUE(fe.EmitBody());
auto ast_body = fe.ast_body();
- EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(x_1 = 42;
-x_1 = 0;
+ EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(x_1 = 42i;
+x_1 = 0i;
+return;
)"));
}
diff --git a/src/tint/reader/spirv/function_misc_test.cc b/src/tint/reader/spirv/function_misc_test.cc
index 3d37325..9d40ffc 100644
--- a/src/tint/reader/spirv/function_misc_test.cc
+++ b/src/tint/reader/spirv/function_misc_test.cc
@@ -74,7 +74,7 @@
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(let x_11 : bool = false;
let x_12 : u32 = 0u;
-let x_13 : i32 = 0;
+let x_13 : i32 = 0i;
let x_14 : f32 = 0.0;
)"));
}
@@ -132,7 +132,7 @@
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(let x_11 : bool = false;
let x_12 : u32 = 0u;
-let x_13 : i32 = 0;
+let x_13 : i32 = 0i;
let x_14 : f32 = 0.0;
)"));
}
@@ -224,7 +224,7 @@
EXPECT_TRUE(fe.EmitBody()) << p->error();
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body),
- HasSubstr("let x_11 : S = S(false, 0u, 0, 0.0);"));
+ HasSubstr("let x_11 : S = S(false, 0u, 0i, 0.0);"));
}
TEST_F(SpvParserTestMiscInstruction, OpNop) {
diff --git a/src/tint/reader/spirv/function_var_test.cc b/src/tint/reader/spirv/function_var_test.cc
index 39436d2..c986af8 100644
--- a/src/tint/reader/spirv/function_var_test.cc
+++ b/src/tint/reader/spirv/function_var_test.cc
@@ -182,7 +182,7 @@
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(var a : bool = true;
var b : bool = false;
-var c : i32 = -1;
+var c : i32 = -1i;
var d : u32 = 1u;
var e : f32 = 1.5;
)"));
@@ -210,7 +210,7 @@
auto ast_body = fe.ast_body();
EXPECT_THAT(test::ToString(p->program(), ast_body), HasSubstr(R"(var a : bool = false;
-var b : i32 = 0;
+var b : i32 = 0i;
var c : u32 = 0u;
var d : f32 = 0.0;
)"));
@@ -1506,7 +1506,7 @@
const auto* expected = R"(var x_200 : vec2<i32>;
if (true) {
x_200 = vec2<i32>();
- x_200.x = 0;
+ x_200.x = 0i;
} else {
return;
}
@@ -1549,7 +1549,7 @@
const auto* expected = R"(var x_200 : vec2<i32>;
if (true) {
x_200 = vec2<i32>();
- x_200[1] = 3;
+ x_200[1i] = 3i;
} else {
return;
}
@@ -1597,7 +1597,7 @@
const auto got = test::ToString(p->program(), ast_body);
const auto* expected = R"(var x_200 : i32;
if (true) {
- x_200 = 1;
+ x_200 = 1i;
} else {
return;
}
diff --git a/src/tint/reader/spirv/parser_impl.cc b/src/tint/reader/spirv/parser_impl.cc
index ffcdd5b..28dc856 100644
--- a/src/tint/reader/spirv/parser_impl.cc
+++ b/src/tint/reader/spirv/parser_impl.cc
@@ -1332,7 +1332,7 @@
[&](const I32*) {
return create<ast::IntLiteralExpression>(
Source{}, static_cast<int64_t>(literal_value),
- ast::IntLiteralExpression::Suffix::kNone);
+ ast::IntLiteralExpression::Suffix::kI);
},
[&](const U32*) {
return create<ast::IntLiteralExpression>(
@@ -1907,7 +1907,7 @@
[&](const I32*) {
return TypedExpression{ty_.I32(), create<ast::IntLiteralExpression>(
source, spirv_const->GetS32(),
- ast::IntLiteralExpression::Suffix::kNone)};
+ ast::IntLiteralExpression::Suffix::kI)};
},
[&](const U32*) {
return TypedExpression{ty_.U32(), create<ast::IntLiteralExpression>(
@@ -1947,7 +1947,7 @@
type, //
[&](const I32*) {
return create<ast::IntLiteralExpression>(Source{}, 0,
- ast::IntLiteralExpression::Suffix::kNone);
+ ast::IntLiteralExpression::Suffix::kI);
},
[&](const U32*) {
return create<ast::IntLiteralExpression>(Source{}, 0,
diff --git a/src/tint/reader/spirv/parser_impl_handle_test.cc b/src/tint/reader/spirv/parser_impl_handle_test.cc
index aa1b8c2..0af3cc5 100644
--- a/src/tint/reader/spirv/parser_impl_handle_test.cc
+++ b/src/tint/reader/spirv/parser_impl_handle_test.cc
@@ -1499,7 +1499,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- "textureGather(1, x_20, x_10, coords12)"},
+ "textureGather(1i, x_20, x_10, coords12)"},
// OpImageGather 2D ConstOffset signed
ImageAccessCase{"%float 2D 0 0 0 1 Unknown",
"%result = OpImageGather "
@@ -1507,7 +1507,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- "textureGather(1, x_20, x_10, coords12, vec2<i32>(3, 4))"},
+ "textureGather(1i, x_20, x_10, coords12, vec2<i32>(3i, 4i))"},
// OpImageGather 2D ConstOffset unsigned
ImageAccessCase{"%float 2D 0 0 0 1 Unknown",
"%result = OpImageGather "
@@ -1516,7 +1516,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- "textureGather(1, x_20, x_10, coords12, "
+ "textureGather(1i, x_20, x_10, coords12, "
"vec2<i32>(vec2<u32>(3u, 4u)))"},
// OpImageGather 2D Array
ImageAccessCase{"%float 2D 0 1 0 1 Unknown",
@@ -1525,7 +1525,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- "textureGather(1, x_20, x_10, coords123.xy, "
+ "textureGather(1i, x_20, x_10, coords123.xy, "
"i32(round(coords123.z)))"},
// OpImageGather 2D Array ConstOffset signed
ImageAccessCase{"%float 2D 0 1 0 1 Unknown",
@@ -1534,8 +1534,8 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- "textureGather(1, x_20, x_10, coords123.xy, "
- "i32(round(coords123.z)), vec2<i32>(3, 4))"},
+ "textureGather(1i, x_20, x_10, coords123.xy, "
+ "i32(round(coords123.z)), vec2<i32>(3i, 4i))"},
// OpImageGather 2D Array ConstOffset unsigned
ImageAccessCase{"%float 2D 0 1 0 1 Unknown",
"%result = OpImageGather "
@@ -1544,7 +1544,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- "textureGather(1, x_20, x_10, coords123.xy, "
+ "textureGather(1i, x_20, x_10, coords123.xy, "
"i32(round(coords123.z)), "
"vec2<i32>(vec2<u32>(3u, 4u)))"},
// OpImageGather Cube
@@ -1554,7 +1554,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_cube<f32>;)",
- "textureGather(1, x_20, x_10, coords123)"},
+ "textureGather(1i, x_20, x_10, coords123)"},
// OpImageGather Cube Array
ImageAccessCase{"%float Cube 0 1 0 1 Unknown",
"%result = OpImageGather "
@@ -1562,7 +1562,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_cube_array<f32>;)",
- "textureGather(1, x_20, x_10, coords1234.xyz, "
+ "textureGather(1i, x_20, x_10, coords1234.xyz, "
"i32(round(coords1234.w)))"},
// OpImageGather 2DDepth
ImageAccessCase{"%float 2D 1 0 0 1 Unknown",
@@ -1579,7 +1579,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_depth_2d;)",
- "textureGather(x_20, x_10, coords12, vec2<i32>(3, 4))"},
+ "textureGather(x_20, x_10, coords12, vec2<i32>(3i, 4i))"},
// OpImageGather 2DDepth ConstOffset unsigned
ImageAccessCase{"%float 2D 1 0 0 1 Unknown",
"%result = OpImageGather "
@@ -1607,7 +1607,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
"textureGather(x_20, x_10, coords123.xy, "
- "i32(round(coords123.z)), vec2<i32>(3, 4))"},
+ "i32(round(coords123.z)), vec2<i32>(3i, 4i))"},
// OpImageGather 2DDepth Array ConstOffset unsigned
ImageAccessCase{"%float 2D 1 1 0 1 Unknown",
"%result = OpImageGather "
@@ -1657,7 +1657,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d;)",
"textureGatherCompare(x_20, x_10, coords12, 0.200000003, "
- "vec2<i32>(3, 4))"},
+ "vec2<i32>(3i, 4i))"},
// OpImageDrefGather 2DDepth ConstOffset unsigned
ImageAccessCase{"%float 2D 1 0 0 1 Unknown",
"%result = OpImageDrefGather "
@@ -1685,7 +1685,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
"textureGatherCompare(x_20, x_10, coords123.xy, "
- "i32(round(coords123.z)), 0.200000003, vec2<i32>(3, 4))"},
+ "i32(round(coords123.z)), 0.200000003, vec2<i32>(3i, 4i))"},
// OpImageDrefGather 2DDepth Array ConstOffset unsigned
ImageAccessCase{"%float 2D 1 1 0 1 Unknown",
"%result = OpImageDrefGather "
@@ -1745,7 +1745,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- "textureSample(x_20, x_10, coords12, vec2<i32>(3, 4))"},
+ "textureSample(x_20, x_10, coords12, vec2<i32>(3i, 4i))"},
// OpImageSampleImplicitLod arrayed with ConstOffset
ImageAccessCase{
@@ -1755,7 +1755,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(textureSample(x_20, x_10, coords123.xy, i32(round(coords123.z)), vec2<i32>(3, 4)))"},
+ R"(textureSample(x_20, x_10, coords123.xy, i32(round(coords123.z)), vec2<i32>(3i, 4i)))"},
// OpImageSampleImplicitLod with Bias
ImageAccessCase{"%float 2D 0 0 0 1 Unknown",
@@ -1784,7 +1784,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleBias(x_20, x_10, coords12, 7.0, vec2<i32>(3, 4))"},
+ R"(textureSampleBias(x_20, x_10, coords12, 7.0, vec2<i32>(3i, 4i))"},
// OpImageSampleImplicitLod with Bias and unsigned ConstOffset
// Convert ConstOffset to signed
@@ -1806,7 +1806,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(textureSampleBias(x_20, x_10, coords123.xy, i32(round(coords123.z)), 7.0, vec2<i32>(3, 4))"}));
+ R"(textureSampleBias(x_20, x_10, coords123.xy, i32(round(coords123.z)), 7.0, vec2<i32>(3i, 4i))"}));
INSTANTIATE_TEST_SUITE_P(
// This test shows the use of a sampled image used with both regular
@@ -1866,7 +1866,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d;
)",
- R"(textureSampleCompare(x_20, x_10, coords12, 0.200000003, vec2<i32>(3, 4)))"},
+ R"(textureSampleCompare(x_20, x_10, coords12, 0.200000003, vec2<i32>(3i, 4i)))"},
// ImageSampleDrefImplicitLod arrayed with ConstOffset
ImageAccessCase{
"%float 2D 0 1 0 1 Unknown",
@@ -1875,7 +1875,7 @@
R"(@group(0) @binding(0) var x_10 : sampler_comparison;
@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
- R"(textureSampleCompare(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2<i32>(3, 4)))"}));
+ R"(textureSampleCompare(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
ImageSampleDrefExplicitLod,
@@ -1911,7 +1911,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d;
)",
- R"(textureSampleCompareLevel(x_20, x_10, coords12, 0.200000003, vec2<i32>(3, 4)))"},
+ R"(textureSampleCompareLevel(x_20, x_10, coords12, 0.200000003, vec2<i32>(3i, 4i)))"},
// 2D array, ConstOffset
ImageAccessCase{
"%float 2D 1 1 0 1 Unknown",
@@ -1921,7 +1921,7 @@
R"(@group(0) @binding(0) var x_10 : sampler_comparison;
@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
- R"(textureSampleCompareLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2<i32>(3, 4)))"},
+ R"(textureSampleCompareLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2<i32>(3i, 4i)))"},
// Cube
ImageAccessCase{"%float Cube 1 0 0 1 Unknown",
"%result = OpImageSampleDrefExplicitLod "
@@ -1972,7 +1972,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleLevel(x_20, x_10, coords12, 0.0, vec2<i32>(3, 4)))"},
+ R"(textureSampleLevel(x_20, x_10, coords12, 0.0, vec2<i32>(3i, 4i)))"},
// OpImageSampleExplicitLod - using Lod and unsigned ConstOffset
// Convert the ConstOffset operand to signed
@@ -1995,7 +1995,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(textureSampleLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.0, vec2<i32>(3, 4)))"}));
+ R"(textureSampleLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.0, vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
ImageSampleExplicitLod_UsingGrad,
@@ -2022,14 +2022,15 @@
R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21))"},
// OpImageSampleExplicitLod - using Grad and ConstOffset
- ImageAccessCase{"%float 2D 0 0 0 1 Unknown",
- "%result = OpImageSampleExplicitLod "
- "%v4float %sampled_image %coords12 Grad|ConstOffset "
- "%vf12 %vf21 %offsets2d",
- R"(@group(0) @binding(0) var x_10 : sampler;
+ ImageAccessCase{
+ "%float 2D 0 0 0 1 Unknown",
+ "%result = OpImageSampleExplicitLod "
+ "%v4float %sampled_image %coords12 Grad|ConstOffset "
+ "%vf12 %vf21 %offsets2d",
+ R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleGrad(x_20, x_10, coords12, vf12, vf21, vec2<i32>(3, 4)))"},
+ R"(textureSampleGrad(x_20, x_10, coords12, vf12, vf21, vec2<i32>(3i, 4i)))"},
// OpImageSampleExplicitLod - using Grad and unsigned ConstOffset
ImageAccessCase{
@@ -2051,7 +2052,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21, vec2<i32>(3, 4)))"},
+ R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21, vec2<i32>(3i, 4i)))"},
// OpImageSampleExplicitLod arrayed - using Grad and unsigned
// ConstOffset
@@ -2160,7 +2161,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSample(x_20, x_10, (coords123.xy / coords123.z), vec2<i32>(3, 4)))"}));
+ R"(textureSample(x_20, x_10, (coords123.xy / coords123.z), vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
ImageSampleProjImplicitLod_Bias,
@@ -2186,7 +2187,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleBias(x_20, x_10, (coords123.xy / coords123.z), 7.0, vec2<i32>(3, 4)))"},
+ R"(textureSampleBias(x_20, x_10, (coords123.xy / coords123.z), 7.0, vec2<i32>(3i, 4i)))"},
// OpImageSampleProjImplicitLod with Bias and unsigned ConstOffset
// Convert ConstOffset to signed
@@ -2221,7 +2222,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleLevel(x_20, x_10, (coords123.xy / coords123.z), f1, vec2<i32>(3, 4)))"}));
+ R"(textureSampleLevel(x_20, x_10, (coords123.xy / coords123.z), f1, vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
ImageSampleProjExplicitLod_Grad,
@@ -2246,7 +2247,7 @@
R"(@group(0) @binding(0) var x_10 : sampler;
@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(textureSampleGrad(x_20, x_10, (coords123.xy / coords123.z), vf12, vf21, vec2<i32>(3, 4)))"}));
+ R"(textureSampleGrad(x_20, x_10, (coords123.xy / coords123.z), vf12, vf21, vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
// Ordinary (non-comparison) sampling on a depth texture.
@@ -2291,7 +2292,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d;
)",
- R"(textureSampleCompare(x_20, x_10, (coords123.xy / coords123.z), f1, vec2<i32>(3, 4)))"}));
+ R"(textureSampleCompare(x_20, x_10, (coords123.xy / coords123.z), f1, vec2<i32>(3i, 4i)))"}));
INSTANTIATE_TEST_SUITE_P(
DISABLED_ImageSampleProjDrefExplicitLod_Lod,
@@ -2322,7 +2323,7 @@
@group(2) @binding(1) var x_20 : texture_depth_2d;
)",
- R"(textureSampleCompareLevel(x_20, x_10, (coords123.xy / coords123.z), 0.200000003, 0.0, vec2<i32>(3, 4)))"}));
+ R"(textureSampleCompareLevel(x_20, x_10, (coords123.xy / coords123.z), 0.200000003, 0.0, vec2<i32>(3i, 4i)))"}));
/////
// End projection sampling
@@ -2563,7 +2564,7 @@
// Source signed, dest signed
{"%int 2D 0 0 0 2 R32i", "OpImageWrite %im %vi12 %vi12",
R"(@group(2) @binding(1) var x_20 : texture_storage_2d<r32sint, write>;)",
- R"(textureStore(x_20, vi12, vec4<i32>(vi12, 0, 0)))"}}));
+ R"(textureStore(x_20, vi12, vec4<i32>(vi12, 0i, 0i)))"}}));
INSTANTIATE_TEST_SUITE_P(
ImageFetch_OptionalParams,
@@ -2573,20 +2574,20 @@
// Level of detail is injected for sampled texture
{"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageFetch with explicit level, on sampled texture
{"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Lod %int_3",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 3);)"},
+ R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 3i);)"},
// OpImageFetch with no extra params, on depth texture
// Level of detail is injected for depth texture
{"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)",
- R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 0), 0.0, 0.0, 0.0);)"},
+ R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 0i), 0.0, 0.0, 0.0);)"},
// OpImageFetch with extra params, on depth texture
{"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Lod %int_3",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)",
- R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 3), 0.0, 0.0, 0.0);)"}}));
+ R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 3i), 0.0, 0.0, 0.0);)"}}));
INSTANTIATE_TEST_SUITE_P(
ImageFetch_Depth,
@@ -2599,7 +2600,7 @@
// ImageFetch on depth image.
{"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 ",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)",
- R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 0), 0.0, 0.0, 0.0);)"}}));
+ R"(let x_99 : vec4<f32> = vec4<f32>(textureLoad(x_20, vi12, 0i), 0.0, 0.0, 0.0);)"}}));
INSTANTIATE_TEST_SUITE_P(
ImageFetch_DepthMultisampled,
@@ -2657,11 +2658,11 @@
// OpImageFetch requires no conversion, float -> v4float
{"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageFetch requires no conversion, uint -> v4uint
{"%uint 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4uint %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<u32>;)",
- R"(let x_99 : vec4<u32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<u32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageFetch requires conversion, uint -> v4int
// is invalid SPIR-V:
// "Expected Image 'Sampled Type' to be the same as Result Type
@@ -2670,7 +2671,7 @@
// OpImageFetch requires no conversion, int -> v4int
{"%int 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4int %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<i32>;)",
- R"(let x_99 : vec4<i32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<i32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageFetch requires conversion, int -> v4uint
// is invalid SPIR-V:
// "Expected Image 'Sampled Type' to be the same as Result Type
@@ -2683,11 +2684,11 @@
// OpImageRead requires no conversion, float -> v4float
{"%float 2D 0 0 0 2 Rgba32f", "%99 = OpImageRead %v4float %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<f32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageRead requires no conversion, uint -> v4uint
{"%uint 2D 0 0 0 2 Rgba32ui", "%99 = OpImageRead %v4uint %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<u32>;)",
- R"(let x_99 : vec4<u32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<u32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageRead requires conversion, uint -> v4int
// is invalid SPIR-V:
@@ -2697,7 +2698,7 @@
// OpImageRead requires no conversion, int -> v4int
{"%int 2D 0 0 0 2 Rgba32i", "%99 = OpImageRead %v4int %im %vi12",
R"(@group(2) @binding(1) var x_20 : texture_2d<i32>;)",
- R"(let x_99 : vec4<i32> = textureLoad(x_20, vi12, 0);)"},
+ R"(let x_99 : vec4<i32> = textureLoad(x_20, vi12, 0i);)"},
// OpImageRead requires conversion, int -> v4uint
// is invalid SPIR-V:
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 4f8aa0d..5066659 100644
--- a/src/tint/reader/spirv/parser_impl_module_var_test.cc
+++ b/src/tint/reader/spirv/parser_impl_module_var_test.cc
@@ -885,7 +885,7 @@
var<private> x_2 : bool = false;
-var<private> x_3 : i32 = -1;
+var<private> x_3 : i32 = -1i;
var<private> x_4 : u32 = 1u;
@@ -910,7 +910,7 @@
const auto module_str = test::ToString(p->program());
EXPECT_THAT(module_str, HasSubstr(R"(var<private> x_1 : bool = false;
-var<private> x_2 : i32 = 0;
+var<private> x_2 : i32 = 0i;
var<private> x_3 : u32 = 0u;
@@ -935,7 +935,7 @@
const auto module_str = test::ToString(p->program());
EXPECT_THAT(module_str, HasSubstr(R"(var<private> x_1 : bool = false;
-var<private> x_2 : i32 = 0;
+var<private> x_2 : i32 = 0i;
var<private> x_3 : u32 = 0u;
@@ -1550,7 +1550,7 @@
ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error();
EXPECT_TRUE(p->error().empty());
const auto module_str = test::ToString(p->program());
- EXPECT_THAT(module_str, HasSubstr("@id(12) override myconst : i32 = 42;")) << module_str;
+ EXPECT_THAT(module_str, HasSubstr("@id(12) override myconst : i32 = 42i;")) << module_str;
}
TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_F32) {
@@ -1985,7 +1985,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- let x_3 : u32 = x_1[0];
+ let x_3 : u32 = x_1[0i];
return;
}
@@ -2017,7 +2017,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- let x_4 : u32 = x_1[0];
+ let x_4 : u32 = x_1[0i];
return;
}
@@ -2049,7 +2049,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- let x_4 : u32 = x_1[0];
+ let x_4 : u32 = x_1[0i];
return;
}
@@ -2080,7 +2080,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- let x_3 : i32 = x_1[0];
+ let x_3 : i32 = x_1[0i];
return;
}
@@ -2112,7 +2112,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- let x_4 : i32 = x_1[0];
+ let x_4 : i32 = x_1[0i];
return;
}
@@ -2144,7 +2144,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- let x_4 : i32 = x_1[0];
+ let x_4 : i32 = x_1[0i];
return;
}
@@ -2193,7 +2193,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- x_1[0] = 0u;
+ x_1[0i] = 0u;
return;
}
@@ -2230,7 +2230,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- x_1[0] = 0u;
+ x_1[0i] = 0u;
return;
}
@@ -2267,7 +2267,7 @@
const std::string expected = R"(var<private> x_1 : array<u32, 1u>;
fn main_1() {
- x_1[0] = 0u;
+ x_1[0i] = 0u;
return;
}
@@ -2303,7 +2303,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- x_1[0] = 12;
+ x_1[0i] = 12i;
return;
}
@@ -2340,7 +2340,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- x_1[0] = 12;
+ x_1[0i] = 12i;
return;
}
@@ -2377,7 +2377,7 @@
const std::string expected = R"(var<private> x_1 : array<i32, 1u>;
fn main_1() {
- x_1[0] = 12;
+ x_1[0i] = 12i;
return;
}
@@ -2421,7 +2421,7 @@
var<private> x_1 : Arr;
fn main_1() {
- let x_3 : u32 = x_1[0];
+ let x_3 : u32 = x_1[0i];
return;
}
@@ -2460,7 +2460,7 @@
var<private> x_1 : Arr;
fn main_1() {
- x_1[0] = 0u;
+ x_1[0i] = 0u;
return;
}
@@ -3467,7 +3467,7 @@
ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions());
EXPECT_TRUE(p->error().empty());
const auto got = test::ToString(p->program());
- const std::string expected = "var<private> x_1 : array<i32, 1u> = array<i32, 1u>(14);";
+ const std::string expected = "var<private> x_1 : array<i32, 1u> = array<i32, 1u>(14i);";
EXPECT_THAT(got, HasSubstr(expected)) << got;
}
diff --git a/test/tint/access/var/matrix.spvasm.expected.wgsl b/test/tint/access/var/matrix.spvasm.expected.wgsl
index d415abd..4e86283 100644
--- a/test/tint/access/var/matrix.spvasm.expected.wgsl
+++ b/test/tint/access/var/matrix.spvasm.expected.wgsl
@@ -1,6 +1,6 @@
fn main_1() {
var m : mat3x3<f32> = mat3x3<f32>();
- let x_15 : vec3<f32> = m[1];
+ let x_15 : vec3<f32> = m[1i];
let x_16 : f32 = x_15.y;
return;
}
diff --git a/test/tint/array/strides.spvasm.expected.wgsl b/test/tint/array/strides.spvasm.expected.wgsl
index 81342c9..5e01fe2 100644
--- a/test/tint/array/strides.spvasm.expected.wgsl
+++ b/test/tint/array/strides.spvasm.expected.wgsl
@@ -22,11 +22,11 @@
fn f_1() {
let x_19 : Arr_2 = s.a;
- let x_24 : Arr_1 = s.a[3].el;
- let x_28 : Arr = s.a[3].el[2];
- let x_32 : f32 = s.a[3].el[2][1].el;
+ let x_24 : Arr_1 = s.a[3i].el;
+ let x_28 : Arr = s.a[3i].el[2i];
+ let x_32 : f32 = s.a[3i].el[2i][1i].el;
s.a = array<strided_arr_1, 4u>();
- s.a[3].el[2][1].el = 5.0;
+ s.a[3i].el[2i][1i].el = 5.0;
return;
}
diff --git a/test/tint/bug/tint/1088.spvasm.expected.wgsl b/test/tint/bug/tint/1088.spvasm.expected.wgsl
index 418222d..e8db8e1 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.wgsl
@@ -36,7 +36,7 @@
let x_21 : vec4<f32> = q;
p = vec3<f32>(x_21.x, x_21.y, x_21.z);
let x_27 : f32 = p.x;
- let x_41 : f32 = x_14.test[0].el;
+ let x_41 : f32 = x_14.test[0i].el;
let x_45 : f32 = position.y;
let x_49 : f32 = x_14.time;
p.x = (x_27 + sin(((x_41 * x_45) + x_49)));
diff --git a/test/tint/bug/tint/1520.spvasm.expected.wgsl b/test/tint/bug/tint/1520.spvasm.expected.wgsl
index 359389e..108847d 100644
--- a/test/tint/bug/tint/1520.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/1520.spvasm.expected.wgsl
@@ -33,20 +33,20 @@
ok = true;
x_41_phi = false;
if (true) {
- x_40 = all(((vec4<i32>(0, 0, 0, 0) / vec4<i32>(x_27, x_27, x_27, x_27)) == vec4<i32>(0, 0, 0, 0)));
+ x_40 = all(((vec4<i32>(0i, 0i, 0i, 0i) / vec4<i32>(x_27, x_27, x_27, x_27)) == vec4<i32>(0i, 0i, 0i, 0i)));
x_41_phi = x_40;
}
let x_41 : bool = x_41_phi;
ok = x_41;
let x_44 : vec4<i32> = vec4<i32>(x_27, x_27, x_27, x_27);
val = x_44;
- let x_47 : vec4<i32> = (x_44 + vec4<i32>(1, 1, 1, 1));
+ let x_47 : vec4<i32> = (x_44 + vec4<i32>(1i, 1i, 1i, 1i));
val = x_47;
- let x_48 : vec4<i32> = (x_47 - vec4<i32>(1, 1, 1, 1));
+ let x_48 : vec4<i32> = (x_47 - vec4<i32>(1i, 1i, 1i, 1i));
val = x_48;
- let x_49 : vec4<i32> = (x_48 + vec4<i32>(1, 1, 1, 1));
+ let x_49 : vec4<i32> = (x_48 + vec4<i32>(1i, 1i, 1i, 1i));
val = x_49;
- let x_50 : vec4<i32> = (x_49 - vec4<i32>(1, 1, 1, 1));
+ let x_50 : vec4<i32> = (x_49 - vec4<i32>(1i, 1i, 1i, 1i));
val = x_50;
x_55_phi = false;
if (x_41) {
@@ -55,13 +55,13 @@
}
let x_55 : bool = x_55_phi;
ok = x_55;
- let x_58 : vec4<i32> = (x_50 * vec4<i32>(2, 2, 2, 2));
+ let x_58 : vec4<i32> = (x_50 * vec4<i32>(2i, 2i, 2i, 2i));
val = x_58;
- let x_59 : vec4<i32> = (x_58 / vec4<i32>(2, 2, 2, 2));
+ let x_59 : vec4<i32> = (x_58 / vec4<i32>(2i, 2i, 2i, 2i));
val = x_59;
- let x_60 : vec4<i32> = (x_59 * vec4<i32>(2, 2, 2, 2));
+ let x_60 : vec4<i32> = (x_59 * vec4<i32>(2i, 2i, 2i, 2i));
val = x_60;
- let x_61 : vec4<i32> = (x_60 / vec4<i32>(2, 2, 2, 2));
+ let x_61 : vec4<i32> = (x_60 / vec4<i32>(2i, 2i, 2i, 2i));
val = x_61;
x_66_phi = false;
if (x_55) {
diff --git a/test/tint/bug/tint/413.spvasm.expected.wgsl b/test/tint/bug/tint/413.spvasm.expected.wgsl
index a9318dc..c343386 100644
--- a/test/tint/bug/tint/413.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/413.spvasm.expected.wgsl
@@ -4,12 +4,12 @@
fn main_1() {
var srcValue : vec4<u32>;
- let x_18 : vec4<u32> = textureLoad(Src, vec2<i32>(0, 0), 0);
+ let x_18 : vec4<u32> = textureLoad(Src, vec2<i32>(0i, 0i), 0i);
srcValue = x_18;
let x_22 : u32 = srcValue.x;
- srcValue.x = (x_22 + bitcast<u32>(1));
+ srcValue.x = (x_22 + bitcast<u32>(1i));
let x_27 : vec4<u32> = srcValue;
- textureStore(Dst, vec2<i32>(0, 0), x_27);
+ textureStore(Dst, vec2<i32>(0i, 0i), x_27);
return;
}
diff --git a/test/tint/bug/tint/749.spvasm.expected.wgsl b/test/tint/bug/tint/749.spvasm.expected.wgsl
index 1832e71..e48b877 100644
--- a/test/tint/bug/tint/749.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/749.spvasm.expected.wgsl
@@ -17,86 +17,86 @@
fn swap_i1_i1_(i : ptr<function, i32>, j : ptr<function, i32>) {
var temp : i32;
let x_932 : i32 = temp;
- temp = 0;
+ temp = 0i;
temp = x_932;
let x_523 : vec3<f32> = vec3<f32>(vec3<f32>(1.0, 2.0, 3.0).z, vec3<f32>(1.0, 2.0, 3.0).y, vec3<f32>(1.0, 2.0, 3.0).z);
let x_933 : i32 = *(i);
- *(i) = 0;
+ *(i) = 0i;
*(i) = x_933;
let x_28 : i32 = *(i);
let x_934 : i32 = *(j);
- *(j) = 0;
+ *(j) = 0i;
*(j) = x_934;
let x_524 : vec3<f32> = vec3<f32>(x_523.y, x_523.x, x_523.y);
let x_935 : i32 = temp;
- temp = 0;
+ temp = 0i;
temp = x_935;
let x_30_save = x_28;
let x_936 : i32 = obj.numbers[x_30_save];
- obj.numbers[x_30_save] = 0;
+ obj.numbers[x_30_save] = 0i;
obj.numbers[x_30_save] = x_936;
let x_31 : i32 = obj.numbers[x_30_save];
let x_937 : i32 = temp;
- temp = 0;
+ temp = 0i;
temp = x_937;
temp = x_31;
let x_938 : i32 = *(j);
- *(j) = 0;
+ *(j) = 0i;
*(j) = x_938;
let x_525 : vec3<f32> = vec3<f32>(x_523.z, vec3<f32>(1.0, 2.0, 3.0).x, x_523.y);
let x_939 : i32 = *(i);
- *(i) = 0;
+ *(i) = 0i;
*(i) = x_939;
let x_32 : i32 = *(i);
let x_940 : i32 = obj.numbers[x_30_save];
- obj.numbers[x_30_save] = 0;
+ obj.numbers[x_30_save] = 0i;
obj.numbers[x_30_save] = x_940;
let x_33 : i32 = *(j);
let x_941 : i32 = *(i);
- *(i) = 0;
+ *(i) = 0i;
*(i) = x_941;
let x_526 : vec3<f32> = vec3<f32>(x_525.x, x_525.z, x_525.z);
let x_942 : i32 = obj.numbers[x_30_save];
- obj.numbers[x_30_save] = 0;
+ obj.numbers[x_30_save] = 0i;
obj.numbers[x_30_save] = x_942;
let x_34_save = x_33;
let x_35 : i32 = obj.numbers[x_34_save];
let x_943 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_943;
let x_527 : vec2<f32> = vec2<f32>(x_526.x, x_526.x);
let x_36_save = x_32;
let x_528 : vec3<f32> = vec3<f32>(x_524.x, x_524.z, x_524.x);
obj.numbers[x_36_save] = x_35;
let x_944 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_944;
let x_529 : vec3<f32> = vec3<f32>(x_526.y, x_526.z, x_526.x);
let x_945 : i32 = *(i);
- *(i) = 0;
+ *(i) = 0i;
*(i) = x_945;
let x_37 : i32 = *(j);
let x_946 : i32 = temp;
- temp = 0;
+ temp = 0i;
temp = x_946;
let x_530 : vec2<f32> = vec2<f32>(x_529.z, x_529.y);
let x_947 : i32 = obj.numbers[x_34_save];
- obj.numbers[x_34_save] = 0;
+ obj.numbers[x_34_save] = 0i;
obj.numbers[x_34_save] = x_947;
let x_38 : i32 = temp;
let x_948 : i32 = *(j);
- *(j) = 0;
+ *(j) = 0i;
*(j) = x_948;
let x_531 : vec3<f32> = vec3<f32>(x_527.x, x_526.y, x_526.x);
let x_949 : i32 = obj.numbers[x_36_save];
- obj.numbers[x_36_save] = 0;
+ obj.numbers[x_36_save] = 0i;
obj.numbers[x_36_save] = x_949;
let x_950 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_950;
let x_532 : vec3<f32> = vec3<f32>(x_528.x, x_528.y, x_528.x);
let x_951 : i32 = obj.numbers[x_34_save];
- obj.numbers[x_34_save] = 0;
+ obj.numbers[x_34_save] = 0i;
obj.numbers[x_34_save] = x_951;
obj.numbers[x_37] = x_38;
return;
@@ -113,71 +113,71 @@
var x_537 : vec2<f32>;
var x_538 : vec3<f32>;
let x_952 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_952;
let x_41 : i32 = *(h);
let x_953 : i32 = *(l);
- *(l) = 0;
+ *(l) = 0i;
*(l) = x_953;
let x_42_save = x_41;
let x_954 : i32 = obj.numbers[x_42_save];
- obj.numbers[x_42_save] = 0;
+ obj.numbers[x_42_save] = 0i;
obj.numbers[x_42_save] = x_954;
let x_43 : i32 = obj.numbers[x_42_save];
let x_955 : i32 = param_3;
- param_3 = 0;
+ param_3 = 0i;
param_3 = x_955;
let x_534 : vec3<f32> = vec3<f32>(vec3<f32>(1.0, 2.0, 3.0).z, vec3<f32>(1.0, 2.0, 3.0).x, vec3<f32>(1.0, 2.0, 3.0).z);
let x_956 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_956;
pivot = x_43;
let x_45 : i32 = *(l);
let x_957 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_957;
let x_958 : i32 = j_1;
- j_1 = 0;
+ j_1 = 0i;
j_1 = x_958;
let x_535 : vec3<f32> = vec3<f32>(x_534.y, x_534.z, x_534.y);
let x_959 : i32 = *(l);
- *(l) = 0;
+ *(l) = 0i;
*(l) = x_959;
i_1 = (x_45 - bitcast<i32>(1u));
let x_49 : i32 = *(l);
let x_536 : vec3<f32> = vec3<f32>(x_534.x, x_534.z, x_535.x);
- j_1 = 10;
+ j_1 = 10i;
let x_960 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_960;
loop {
let x_961 : i32 = pivot;
- pivot = 0;
+ pivot = 0i;
pivot = x_961;
let x_962 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_962;
let x_55 : i32 = j_1;
let x_963 : i32 = pivot;
- pivot = 0;
+ pivot = 0i;
pivot = x_963;
x_537 = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).y, vec3<f32>(1.0, 2.0, 3.0).z);
let x_964 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_964;
let x_56 : i32 = *(h);
let x_965 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_965;
let x_966 : i32 = param;
- param = 0;
+ param = 0i;
param = x_966;
let x_967 : i32 = j_1;
- j_1 = 0;
+ j_1 = 0i;
j_1 = x_967;
x_538 = vec3<f32>(x_534.x, x_537.y, x_534.z);
let x_968 : i32 = param;
- param = 0;
+ param = 0i;
param = x_968;
if ((x_55 <= (x_56 - bitcast<i32>(1u)))) {
} else {
@@ -185,161 +185,161 @@
}
let x_60 : i32 = j_1;
let x_969 : i32 = obj.numbers[x_42_save];
- obj.numbers[x_42_save] = 0;
+ obj.numbers[x_42_save] = 0i;
obj.numbers[x_42_save] = x_969;
let x_61_save = x_60;
let x_970 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_970;
let x_539 : vec3<f32> = vec3<f32>(x_537.x, x_535.z, x_537.x);
let x_971 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_971;
let x_62 : i32 = obj.numbers[x_61_save];
let x_972 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_972;
let x_63 : i32 = pivot;
let x_540 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).y, x_534.z);
let x_973 : i32 = i_1;
- i_1 = 0;
+ i_1 = 0i;
i_1 = x_973;
let x_974 : i32 = *(l);
- *(l) = 0;
+ *(l) = 0i;
*(l) = x_974;
let x_541 : vec3<f32> = vec3<f32>(x_534.y, x_534.x, x_534.y);
let x_975 : i32 = pivot;
- pivot = 0;
+ pivot = 0i;
pivot = x_975;
if ((x_62 <= x_63)) {
let x_542 : vec3<f32> = vec3<f32>(x_541.z, x_541.x, x_541.x);
let x_976 : i32 = param_3;
- param_3 = 0;
+ param_3 = 0i;
param_3 = x_976;
let x_67 : i32 = i_1;
let x_977 : i32 = pivot;
- pivot = 0;
+ pivot = 0i;
pivot = x_977;
let x_543 : vec2<f32> = vec2<f32>(x_539.x, x_541.y);
let x_978 : i32 = i_1;
- i_1 = 0;
+ i_1 = 0i;
i_1 = x_978;
let x_979 : i32 = param;
- param = 0;
+ param = 0i;
param = x_979;
i_1 = (x_67 + bitcast<i32>(1u));
let x_980 : i32 = *(l);
- *(l) = 0;
+ *(l) = 0i;
*(l) = x_980;
let x_544 : vec3<f32> = vec3<f32>(vec3<f32>(1.0, 2.0, 3.0).z, vec3<f32>(1.0, 2.0, 3.0).y, x_540.x);
let x_70 : i32 = i_1;
let x_545 : vec2<f32> = vec2<f32>(x_537.y, x_538.x);
let x_981 : i32 = param;
- param = 0;
+ param = 0i;
param = x_981;
param = x_70;
let x_982 : i32 = param;
- param = 0;
+ param = 0i;
param = x_982;
let x_546 : vec2<f32> = vec2<f32>(x_545.x, x_545.x);
let x_983 : i32 = i_1;
- i_1 = 0;
+ i_1 = 0i;
i_1 = x_983;
let x_72 : i32 = j_1;
param_1 = x_72;
let x_984 : i32 = param_3;
- param_3 = 0;
+ param_3 = 0i;
param_3 = x_984;
swap_i1_i1_(&(param), &(param_1));
let x_985 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_985;
}
let x_986 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_986;
continuing {
let x_987 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_987;
let x_74 : i32 = j_1;
let x_988 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_988;
let x_547 : vec3<f32> = vec3<f32>(x_539.x, x_541.z, x_541.z);
let x_989 : i32 = obj.numbers[x_61_save];
- obj.numbers[x_61_save] = 0;
+ obj.numbers[x_61_save] = 0i;
obj.numbers[x_61_save] = x_989;
let x_990 : i32 = param;
- param = 0;
+ param = 0i;
param = x_990;
- j_1 = (1 + x_74);
+ j_1 = (1i + x_74);
let x_991 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_991;
let x_548 : vec3<f32> = vec3<f32>(x_541.y, x_541.z, x_541.x);
let x_992 : i32 = obj.numbers[x_61_save];
- obj.numbers[x_61_save] = 0;
+ obj.numbers[x_61_save] = 0i;
obj.numbers[x_61_save] = x_992;
}
}
let x_76 : i32 = i_1;
let x_993 : i32 = obj.numbers[x_42_save];
- obj.numbers[x_42_save] = 0;
+ obj.numbers[x_42_save] = 0i;
obj.numbers[x_42_save] = x_993;
let x_549 : vec2<f32> = vec2<f32>(x_534.x, x_534.y);
let x_994 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_994;
let x_995 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_995;
- i_1 = (1 + x_76);
+ i_1 = (1i + x_76);
let x_996 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_996;
let x_79 : i32 = i_1;
let x_997 : i32 = j_1;
- j_1 = 0;
+ j_1 = 0i;
j_1 = x_997;
let x_550 : vec2<f32> = vec2<f32>(x_534.x, x_534.x);
let x_998 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_998;
param_2 = x_79;
let x_551 : vec2<f32> = vec2<f32>(x_534.y, x_536.x);
let x_999 : i32 = pivot;
- pivot = 0;
+ pivot = 0i;
pivot = x_999;
let x_81 : i32 = *(h);
let x_552 : vec2<f32> = vec2<f32>(x_550.x, x_549.y);
let x_1000 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_1000;
param_3 = x_81;
let x_1001 : i32 = i_1;
- i_1 = 0;
+ i_1 = 0i;
i_1 = x_1001;
let x_553 : vec2<f32> = vec2<f32>(x_549.y, x_552.x);
let x_1002 : i32 = *(h);
- *(h) = 0;
+ *(h) = 0i;
*(h) = x_1002;
swap_i1_i1_(&(param_2), &(param_3));
let x_1003 : i32 = *(l);
- *(l) = 0;
+ *(l) = 0i;
*(l) = x_1003;
let x_554 : vec2<f32> = vec2<f32>(x_536.z, vec3<f32>(1.0, 2.0, 3.0).y);
let x_1004 : i32 = param_1;
- param_1 = 0;
+ param_1 = 0i;
param_1 = x_1004;
let x_83 : i32 = i_1;
let x_1005 : i32 = param;
- param = 0;
+ param = 0i;
param = x_1005;
let x_555 : vec2<f32> = vec2<f32>(x_534.y, x_534.x);
let x_1006 : i32 = j_1;
- j_1 = 0;
+ j_1 = 0i;
j_1 = x_1006;
return x_83;
}
@@ -352,419 +352,419 @@
var top : i32;
var stack : array<i32, 10u>;
var param_5 : i32;
- l_1 = 0;
+ l_1 = 0i;
let x_1007 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1007;
- h_1 = 9;
+ h_1 = 9i;
let x_1008 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1008;
let x_556 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).y, vec3<f32>(1.0, 2.0, 3.0).y);
let x_1009 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1009;
- top = -1;
+ top = -1i;
let x_1010 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1010;
let x_93 : i32 = top;
let x_557 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).x, vec3<f32>(1.0, 2.0, 3.0).x);
let x_1011 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1011;
let x_94 : i32 = (x_93 + bitcast<i32>(1u));
let x_1012 : i32 = top;
- top = 0;
+ top = 0i;
top = x_1012;
let x_558 : vec2<f32> = vec2<f32>(x_556.y, x_557.y);
let x_1013 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1013;
top = x_94;
let x_1014 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1014;
let x_559 : vec3<f32> = vec3<f32>(x_557.y, x_557.x, x_557.x);
let x_1015 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1015;
let x_95 : i32 = l_1;
let x_1016 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_1016;
let x_560 : vec3<f32> = vec3<f32>(x_559.y, x_559.x, x_557.x);
let x_96_save = x_94;
let x_1017 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1017;
let x_561 : vec3<f32> = vec3<f32>(x_556.y, x_556.y, x_556.y);
let x_1018 : i32 = l_1;
- l_1 = 0;
- l_1 = 0;
+ l_1 = 0i;
+ l_1 = 0i;
stack[x_96_save] = x_95;
let x_1019 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1019;
let x_97 : i32 = top;
let x_1020 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1020;
let x_562 : vec3<f32> = vec3<f32>(vec3<f32>(1.0, 2.0, 3.0).z, x_558.y, vec3<f32>(1.0, 2.0, 3.0).y);
let x_1021 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1021;
- let x_98 : i32 = (x_97 + 1);
+ let x_98 : i32 = (x_97 + 1i);
let x_1022 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1022;
let x_563 : vec3<f32> = vec3<f32>(x_559.x, x_559.z, x_556.y);
top = x_98;
let x_1023 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1023;
let x_99 : i32 = h_1;
let x_1024 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1024;
let x_564 : vec3<f32> = vec3<f32>(x_558.x, x_561.x, x_558.y);
let x_1025 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1025;
let x_100_save = x_98;
let x_1026 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1026;
let x_565 : vec2<f32> = vec2<f32>(x_564.z, x_564.z);
let x_1027 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1027;
stack[x_100_save] = x_99;
loop {
let x_566 : vec3<f32> = vec3<f32>(x_563.x, x_563.x, x_563.x);
let x_1028 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1028;
let x_1029 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1029;
let x_106 : i32 = top;
let x_1030 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1030;
let x_567 : vec2<f32> = vec2<f32>(x_558.x, x_564.z);
let x_1031 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1031;
if ((x_106 >= bitcast<i32>(0u))) {
} else {
break;
}
let x_1032 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_1032;
let x_568 : vec3<f32> = vec3<f32>(x_559.y, x_559.x, x_563.y);
let x_1033 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1033;
let x_108 : i32 = top;
let x_569 : vec3<f32> = vec3<f32>(x_565.x, x_567.y, x_565.x);
let x_1034 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1034;
let x_570 : vec2<f32> = vec2<f32>(x_556.x, x_556.x);
let x_1035 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1035;
top = (x_108 - bitcast<i32>(1u));
let x_1036 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1036;
let x_110_save = x_108;
let x_1037 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1037;
let x_111 : i32 = stack[x_110_save];
let x_1038 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1038;
let x_571 : vec3<f32> = vec3<f32>(x_559.y, x_559.x, x_564.y);
let x_1039 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1039;
h_1 = x_111;
let x_1040 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1040;
let x_572 : vec2<f32> = vec2<f32>(x_562.y, x_561.y);
let x_1041 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1041;
let x_112 : i32 = top;
let x_1042 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1042;
let x_1043 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1043;
let x_573 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).y, vec3<f32>(1.0, 2.0, 3.0).z);
- top = (x_112 - 1);
+ top = (x_112 - 1i);
let x_1044 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1044;
let x_574 : vec3<f32> = vec3<f32>(x_570.y, x_565.x, x_570.y);
let x_1045 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1045;
let x_114_save = x_112;
let x_575 : vec2<f32> = vec2<f32>(x_564.y, x_564.z);
let x_1046 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1046;
let x_115 : i32 = stack[x_114_save];
let x_1047 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1047;
let x_576 : vec3<f32> = vec3<f32>(x_573.y, x_573.y, x_565.x);
let x_1048 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1048;
l_1 = x_115;
let x_1049 : i32 = top;
- top = 0;
+ top = 0i;
top = x_1049;
let x_118 : i32 = l_1;
param_4 = x_118;
let x_1050 : i32 = stack[x_110_save];
- stack[x_110_save] = 0;
+ stack[x_110_save] = 0i;
stack[x_110_save] = x_1050;
let x_577 : vec2<f32> = vec2<f32>(x_569.y, x_569.z);
let x_120 : i32 = h_1;
let x_578 : vec2<f32> = vec2<f32>(x_558.x, vec3<f32>(1.0, 2.0, 3.0).y);
param_5 = x_120;
let x_1051 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1051;
let x_121 : i32 = performPartition_i1_i1_(&(param_4), &(param_5));
let x_579 : vec2<f32> = vec2<f32>(x_567.x, x_568.x);
let x_1052 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1052;
p = x_121;
let x_1053 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1053;
let x_122 : i32 = p;
let x_1054 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1054;
let x_580 : vec2<f32> = vec2<f32>(x_568.y, x_568.y);
let x_1055 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1055;
let x_1056 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1056;
let x_124 : i32 = l_1;
let x_1057 : i32 = stack[x_110_save];
- stack[x_110_save] = 0;
+ stack[x_110_save] = 0i;
stack[x_110_save] = x_1057;
let x_1058 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1058;
let x_582 : vec2<f32> = vec2<f32>(x_567.y, x_573.x);
let x_1059 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1059;
if (((x_122 - bitcast<i32>(1u)) > x_124)) {
let x_1060 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1060;
let x_128 : i32 = top;
let x_583 : vec2<f32> = vec2<f32>(x_571.y, x_556.y);
let x_1061 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1061;
let x_1062 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1062;
let x_584 : vec2<f32> = vec2<f32>(x_569.z, x_569.y);
let x_585 : vec3<f32> = vec3<f32>(x_580.y, x_577.x, x_577.x);
let x_130 : i32 = l_1;
let x_1063 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1063;
let x_586 : vec2<f32> = vec2<f32>(x_564.x, x_585.x);
let x_1064 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1064;
- let x_131_save = (1 + x_128);
+ let x_131_save = (1i + x_128);
let x_1065 : i32 = stack[x_110_save];
- stack[x_110_save] = 0;
+ stack[x_110_save] = 0i;
stack[x_110_save] = x_1065;
let x_587 : vec3<f32> = vec3<f32>(x_566.y, x_566.y, x_563.x);
let x_1066 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1066;
stack[x_131_save] = x_130;
let x_132 : i32 = top;
let x_1067 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1067;
let x_588 : vec2<f32> = vec2<f32>(x_575.y, x_575.x);
let x_1068 : i32 = stack[x_131_save];
- stack[x_131_save] = 0;
+ stack[x_131_save] = 0i;
stack[x_131_save] = x_1068;
let x_133 : i32 = bitcast<i32>((1u + bitcast<u32>(x_132)));
let x_1069 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1069;
let x_589 : vec3<f32> = vec3<f32>(x_576.z, x_588.y, x_576.z);
let x_1070 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1070;
top = x_133;
let x_1071 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1071;
let x_134 : i32 = p;
let x_590 : vec2<f32> = vec2<f32>(x_576.x, x_573.y);
let x_1072 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1072;
let x_136_save = x_133;
let x_1073 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1073;
stack[x_136_save] = (x_134 - bitcast<i32>(1u));
let x_1074 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1074;
let x_591 : vec2<f32> = vec2<f32>(x_569.z, x_569.y);
let x_1075 : i32 = stack[x_136_save];
- stack[x_136_save] = 0;
+ stack[x_136_save] = 0i;
stack[x_136_save] = x_1075;
}
let x_1076 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1076;
let x_592 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).x, vec3<f32>(1.0, 2.0, 3.0).y);
let x_1077 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_1077;
let x_137 : i32 = p;
let x_1078 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1078;
let x_593 : vec3<f32> = vec3<f32>(x_571.z, x_556.x, x_556.y);
let x_1079 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1079;
let x_594 : vec3<f32> = vec3<f32>(x_563.z, x_563.x, x_575.x);
let x_1080 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1080;
let x_139 : i32 = h_1;
let x_1081 : i32 = top;
- top = 0;
+ top = 0i;
top = x_1081;
let x_595 : vec3<f32> = vec3<f32>(x_560.z, x_568.x, x_560.x);
let x_1082 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1082;
let x_1083 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1083;
if ((bitcast<i32>((1u + bitcast<u32>(x_137))) < x_139)) {
let x_1084 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1084;
let x_596 : vec2<f32> = vec2<f32>(x_592.y, x_582.x);
let x_1085 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1085;
let x_143 : i32 = top;
let x_1086 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1086;
let x_597 : vec3<f32> = vec3<f32>(x_562.y, x_560.y, x_560.y);
- let x_144 : i32 = (x_143 + 1);
+ let x_144 : i32 = (x_143 + 1i);
let x_1087 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1087;
top = x_144;
let x_1088 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1088;
let x_145 : i32 = p;
let x_1089 : i32 = param_5;
- param_5 = 0;
+ param_5 = 0i;
param_5 = x_1089;
let x_599 : vec3<f32> = vec3<f32>(x_560.z, x_560.x, x_568.x);
let x_1090 : i32 = p;
- p = 0;
+ p = 0i;
p = x_1090;
let x_600 : vec3<f32> = vec3<f32>(x_556.x, x_580.x, x_580.x);
let x_1091 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1091;
let x_147_save = x_144;
let x_1092 : i32 = stack[x_110_save];
- stack[x_110_save] = 0;
+ stack[x_110_save] = 0i;
stack[x_110_save] = x_1092;
let x_601 : vec2<f32> = vec2<f32>(x_563.x, x_563.y);
stack[x_147_save] = bitcast<i32>((1u + bitcast<u32>(x_145)));
let x_1093 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1093;
let x_148 : i32 = top;
let x_1094 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1094;
let x_602 : vec2<f32> = vec2<f32>(x_565.y, x_599.y);
let x_1095 : array<i32, 10u> = stack;
- stack = array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ stack = array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i);
stack = x_1095;
let x_149 : i32 = (x_148 + bitcast<i32>(1u));
let x_1096 : i32 = stack[x_147_save];
- stack[x_147_save] = 0;
+ stack[x_147_save] = 0i;
stack[x_147_save] = x_1096;
top = x_149;
let x_1097 : i32 = param_4;
- param_4 = 0;
+ param_4 = 0i;
param_4 = x_1097;
let x_150 : i32 = h_1;
let x_1098 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1098;
let x_1099 : i32 = stack[x_96_save];
- stack[x_96_save] = 0;
+ stack[x_96_save] = 0i;
stack[x_96_save] = x_1099;
stack[x_149] = x_150;
let x_1100 : i32 = stack[x_114_save];
- stack[x_114_save] = 0;
+ stack[x_114_save] = 0i;
stack[x_114_save] = x_1100;
let x_603 : vec3<f32> = vec3<f32>(x_568.y, x_564.x, x_564.x);
let x_1101 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1101;
}
let x_1102 : i32 = stack[x_100_save];
- stack[x_100_save] = 0;
+ stack[x_100_save] = 0i;
stack[x_100_save] = x_1102;
continuing {
let x_1103 : i32 = l_1;
- l_1 = 0;
+ l_1 = 0i;
l_1 = x_1103;
let x_604 : vec2<f32> = vec2<f32>(x_563.z, x_564.x);
let x_1104 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_1104;
}
}
let x_1105 : i32 = h_1;
- h_1 = 0;
+ h_1 = 0i;
h_1 = x_1105;
return;
}
@@ -776,13 +776,13 @@
let x_717 : vec2<f32> = uv;
uv = vec2<f32>(0.0, 0.0);
uv = x_717;
- i_2 = 0;
+ i_2 = 0i;
let x_721 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_721;
if (true) {
let x_722 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_722;
let x_431 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).x, vec3<f32>(1.0, 2.0, 3.0).x);
let x_158 : i32 = i_2;
@@ -794,19 +794,19 @@
color = x_725;
let x_432 : vec2<f32> = vec2<f32>(x_431.y, x_431.y);
let x_726 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_726;
}
let x_756 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_756;
let x_446 : vec2<f32> = vec2<f32>(vec2<f32>().x, vec2<f32>().x);
let x_757 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_757;
quicksort_();
let x_758 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_758;
let x_184 : vec4<f32> = gl_FragCoord;
let x_759 : vec2<f32> = uv;
@@ -819,14 +819,14 @@
let x_185 : vec2<f32> = vec2<f32>(x_184.x, x_184.y);
let x_448 : vec3<f32> = vec3<f32>(x_185.y, x_446.y, x_446.y);
let x_761 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_761;
let x_762 : vec2<f32> = uv;
uv = vec2<f32>(0.0, 0.0);
uv = x_762;
let x_191 : vec2<f32> = x_188.resolution;
let x_763 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_763;
let x_449 : vec3<f32> = vec3<f32>(x_184.y, vec3<f32>(1.0, 2.0, 3.0).z, x_184.w);
let x_764 : vec3<f32> = color;
@@ -834,7 +834,7 @@
color = x_764;
let x_192 : vec2<f32> = (x_185 / x_191);
let x_765 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_765;
let x_450 : vec2<f32> = vec2<f32>(x_447.x, x_185.y);
let x_766 : vec3<f32> = color;
@@ -850,17 +850,17 @@
color = x_768;
let x_451 : vec3<f32> = vec3<f32>(x_185.x, x_185.y, x_446.y);
let x_769 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_769;
let x_770 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_770;
let x_201 : i32 = obj.numbers[0u];
let x_771 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_771;
let x_772 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_772;
let x_206 : f32 = color.x;
let x_773 : f32 = color.x;
@@ -868,10 +868,10 @@
color.x = x_773;
let x_452 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).z, vec3<f32>(1.0, 2.0, 3.0).y);
let x_774 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_774;
let x_775 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_775;
let x_453 : vec3<f32> = vec3<f32>(x_451.x, x_450.x, x_450.y);
color.x = (x_206 + f32(x_201));
@@ -888,38 +888,38 @@
uv.x = 0.0;
uv.x = x_778;
let x_779 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_779;
if ((x_210 > 0.25)) {
let x_780 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_780;
let x_781 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_781;
let x_456 : vec3<f32> = vec3<f32>(vec2<f32>().y, x_448.y, x_448.y);
let x_782 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_782;
- let x_216 : i32 = obj.numbers[1];
+ let x_216 : i32 = obj.numbers[1i];
let x_783 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_783;
let x_457 : vec2<f32> = vec2<f32>(x_454.x, x_454.x);
let x_784 : vec2<f32> = uv;
uv = vec2<f32>(0.0, 0.0);
uv = x_784;
let x_785 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_785;
let x_458 : vec2<f32> = vec2<f32>(vec3<f32>(1.0, 2.0, 3.0).z, vec2<f32>().y);
let x_786 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_786;
- let x_219 : f32 = color[0];
- let x_787 : f32 = color[0];
- color[0] = 0.0;
- color[0] = x_787;
+ let x_219 : f32 = color[0i];
+ let x_787 : f32 = color[0i];
+ color[0i] = 0.0;
+ color[0i] = x_787;
let x_788 : vec3<f32> = color;
color = vec3<f32>(0.0, 0.0, 0.0);
color = x_788;
@@ -927,12 +927,12 @@
color = vec3<f32>(0.0, 0.0, 0.0);
color = x_789;
let x_459 : vec3<f32> = vec3<f32>(x_454.y, x_454.y, x_447.y);
- let x_790 : f32 = color[0];
- color[0] = 0.0;
- color[0] = x_790;
+ let x_790 : f32 = color[0i];
+ color[0i] = 0.0;
+ color[0i] = x_790;
color.x = (f32(x_216) + x_219);
let x_791 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_791;
}
let x_792 : f32 = uv.x;
@@ -979,7 +979,7 @@
color.x = 0.0;
color.x = x_803;
let x_804 : i32 = obj.numbers[2u];
- obj.numbers[2u] = 0;
+ obj.numbers[2u] = 0i;
obj.numbers[2u] = x_804;
let x_464 : vec2<f32> = vec2<f32>(x_450.y, x_191.x);
let x_805 : f32 = color.y;
@@ -987,18 +987,18 @@
color.y = x_805;
let x_234 : f32 = color.y;
let x_806 : i32 = obj.numbers[2u];
- obj.numbers[2u] = 0;
+ obj.numbers[2u] = 0i;
obj.numbers[2u] = x_806;
let x_465 : vec2<f32> = vec2<f32>(x_463.x, x_185.x);
let x_807 : f32 = color.x;
color.x = 0.0;
color.x = x_807;
let x_808 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_808;
let x_466 : vec2<f32> = vec2<f32>(x_455.y, vec2<f32>().y);
let x_809 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_809;
color.y = (f32(x_230) + x_234);
let x_810 : f32 = uv.x;
@@ -1006,13 +1006,13 @@
uv.x = x_810;
}
let x_811 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_811;
let x_467 : vec2<f32> = vec2<f32>(x_191.x, x_191.x);
let x_812 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_812;
- let x_238 : f32 = uv[0];
+ let x_238 : f32 = uv[0i];
let x_813 : vec3<f32> = color;
color = vec3<f32>(0.0, 0.0, 0.0);
color = x_813;
@@ -1023,17 +1023,17 @@
let x_815 : f32 = color.x;
color.x = 0.0;
color.x = x_815;
- let x_245 : i32 = obj.numbers[3];
+ let x_245 : i32 = obj.numbers[3i];
let x_816 : f32 = color.x;
color.x = 0.0;
color.x = x_816;
let x_817 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_817;
let x_468 : vec3<f32> = vec3<f32>(x_467.x, x_467.x, x_467.x);
- let x_818 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_818;
+ let x_818 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_818;
let x_819 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_819;
@@ -1046,7 +1046,7 @@
color.z = 0.0;
color.z = x_821;
let x_822 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_822;
let x_470 : vec2<f32> = vec2<f32>(vec2<f32>().x, vec2<f32>().y);
let x_823 : f32 = color.z;
@@ -1058,21 +1058,21 @@
uv = x_824;
let x_471 : vec2<f32> = vec2<f32>(x_470.y, x_470.y);
}
- let x_825 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_825;
+ let x_825 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_825;
let x_472 : vec3<f32> = vec3<f32>(x_454.x, x_454.y, x_454.y);
- let x_254 : i32 = obj.numbers[4];
- let x_826 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_826;
+ let x_254 : i32 = obj.numbers[4i];
+ let x_826 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_826;
let x_827 : vec3<f32> = color;
color = vec3<f32>(0.0, 0.0, 0.0);
color = x_827;
let x_473 : vec3<f32> = vec3<f32>(x_446.y, x_453.x, x_453.x);
- let x_828 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_828;
+ let x_828 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_828;
let x_474 : vec2<f32> = vec2<f32>(x_191.x, x_184.z);
let x_829 : f32 = uv.x;
uv.x = 0.0;
@@ -1103,11 +1103,11 @@
uv.y = x_835;
let x_261 : f32 = uv.y;
let x_836 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_836;
let x_479 : vec3<f32> = vec3<f32>(vec2<f32>().y, x_454.y, vec2<f32>().x);
let x_837 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_837;
let x_838 : f32 = color.y;
color.y = 0.0;
@@ -1126,24 +1126,24 @@
color.x = 0.0;
color.x = x_841;
let x_842 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_842;
let x_843 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_843;
let x_270 : f32 = color.x;
- let x_844 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_844;
+ let x_844 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_844;
let x_482 : vec3<f32> = vec3<f32>(x_455.x, x_475.y, x_455.y);
let x_845 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_845;
let x_846 : f32 = uv.y;
uv.y = 0.0;
uv.y = x_846;
let x_847 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_847;
let x_483 : vec3<f32> = vec3<f32>(x_184.w, x_184.w, x_192.x);
let x_848 : f32 = uv.x;
@@ -1162,12 +1162,12 @@
let x_851 : f32 = uv.y;
uv.y = 0.0;
uv.y = x_851;
- let x_852 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_852;
+ let x_852 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_852;
let x_274 : f32 = uv.y;
let x_853 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_853;
if ((x_274 > 0.5)) {
let x_854 : f32 = uv.x;
@@ -1186,11 +1186,11 @@
uv.y = 0.0;
uv.y = x_857;
let x_858 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_858;
- let x_859 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_859;
+ let x_859 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_859;
let x_488 : vec2<f32> = vec2<f32>(x_473.z, x_473.y);
let x_283 : f32 = color.y;
let x_860 : vec2<f32> = uv;
@@ -1201,14 +1201,14 @@
color.x = x_861;
let x_489 : vec2<f32> = vec2<f32>(x_475.y, x_475.x);
let x_862 : i32 = obj.numbers[6u];
- obj.numbers[6u] = 0;
+ obj.numbers[6u] = 0i;
obj.numbers[6u] = x_862;
let x_863 : i32 = obj.numbers[6u];
- obj.numbers[6u] = 0;
+ obj.numbers[6u] = 0i;
obj.numbers[6u] = x_863;
let x_490 : vec2<f32> = vec2<f32>(x_480.z, x_480.z);
let x_864 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_864;
color.y = (f32(x_280) + x_283);
let x_865 : f32 = color.x;
@@ -1225,19 +1225,19 @@
color.x = x_867;
let x_287 : f32 = uv.y;
let x_868 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_868;
let x_493 : vec2<f32> = vec2<f32>(x_475.x, x_475.y);
- let x_869 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_869;
+ let x_869 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_869;
let x_870 : f32 = color.y;
color.y = 0.0;
color.y = x_870;
let x_494 : vec3<f32> = vec3<f32>(x_191.x, x_191.y, x_191.y);
- let x_871 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_871;
+ let x_871 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_871;
if ((x_287 > 0.75)) {
let x_872 : vec3<f32> = color;
color = vec3<f32>(0.0, 0.0, 0.0);
@@ -1249,7 +1249,7 @@
let x_874 : vec3<f32> = color;
color = vec3<f32>(0.0, 0.0, 0.0);
color = x_874;
- let x_293 : i32 = obj.numbers[7];
+ let x_293 : i32 = obj.numbers[7i];
let x_875 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_875;
@@ -1259,7 +1259,7 @@
color.y = x_876;
let x_497 : vec2<f32> = vec2<f32>(x_477.x, x_461.y);
let x_877 : i32 = obj.numbers[0u];
- obj.numbers[0u] = 0;
+ obj.numbers[0u] = 0i;
obj.numbers[0u] = x_877;
let x_878 : f32 = color.y;
color.y = 0.0;
@@ -1296,20 +1296,20 @@
color.x = x_886;
}
let x_887 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_887;
let x_502 : vec2<f32> = vec2<f32>(x_451.y, x_192.y);
let x_888 : vec2<f32> = uv;
uv = vec2<f32>(0.0, 0.0);
uv = x_888;
- let x_301 : i32 = obj.numbers[8];
+ let x_301 : i32 = obj.numbers[8i];
let x_889 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_889;
let x_503 : vec2<f32> = vec2<f32>(x_185.x, x_451.z);
- let x_890 : i32 = obj.numbers[8];
- obj.numbers[8] = 0;
- obj.numbers[8] = x_890;
+ let x_890 : i32 = obj.numbers[8i];
+ obj.numbers[8i] = 0i;
+ obj.numbers[8i] = x_890;
let x_891 : f32 = color.y;
color.y = 0.0;
color.y = x_891;
@@ -1326,9 +1326,9 @@
color.x = 0.0;
color.x = x_894;
let x_506 : vec2<f32> = vec2<f32>(x_493.x, x_492.x);
- let x_895 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_895;
+ let x_895 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_895;
let x_896 : f32 = uv.y;
uv.y = 0.0;
uv.y = x_896;
@@ -1367,7 +1367,7 @@
color.z = 0.0;
color.z = x_905;
let x_906 : i32 = i_2;
- i_2 = 0;
+ i_2 = 0i;
i_2 = x_906;
let x_511 : vec2<f32> = vec2<f32>(x_485.z, x_485.y);
let x_907 : vec3<f32> = color;
@@ -1377,20 +1377,20 @@
uv.y = 0.0;
uv.y = x_908;
let x_512 : vec3<f32> = vec3<f32>(x_455.y, x_455.y, x_455.y);
- let x_909 : i32 = obj.numbers[4];
- obj.numbers[4] = 0;
- obj.numbers[4] = x_909;
+ let x_909 : i32 = obj.numbers[4i];
+ obj.numbers[4i] = 0i;
+ obj.numbers[4i] = x_909;
if ((abs((x_308 - x_310)) < 0.25)) {
let x_910 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_910;
let x_911 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_911;
let x_513 : vec3<f32> = vec3<f32>(x_505.z, x_505.x, x_448.x);
- let x_912 : i32 = obj.numbers[8];
- obj.numbers[8] = 0;
- obj.numbers[8] = x_912;
+ let x_912 : i32 = obj.numbers[8i];
+ obj.numbers[8i] = 0i;
+ obj.numbers[8i] = x_912;
let x_317 : i32 = obj.numbers[9u];
let x_514 : vec3<f32> = vec3<f32>(x_474.y, x_474.y, x_474.y);
let x_913 : f32 = uv.y;
@@ -1428,19 +1428,19 @@
uv.y = 0.0;
uv.y = x_921;
let x_325 : vec3<f32> = color;
- let x_922 : f32 = uv[0];
- uv[0] = 0.0;
- uv[0] = x_922;
+ let x_922 : f32 = uv[0i];
+ uv[0i] = 0.0;
+ uv[0i] = x_922;
let x_519 : vec3<f32> = vec3<f32>(x_447.x, x_446.x, x_446.y);
let x_326 : vec3<f32> = normalize(x_325);
let x_923 : f32 = uv.x;
uv.x = 0.0;
uv.x = x_923;
let x_924 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_924;
let x_925 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_925;
let x_926 : f32 = color.y;
color.y = 0.0;
@@ -1459,7 +1459,7 @@
uv.x = x_929;
x_GLF_color = x_330;
let x_930 : QuicksortObject = obj;
- obj = QuicksortObject(array<i32, 10u>(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ obj = QuicksortObject(array<i32, 10u>(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i));
obj = x_930;
let x_522 : vec3<f32> = vec3<f32>(x_330.w, x_330.y, x_493.x);
let x_931 : f32 = color.x;
diff --git a/test/tint/bug/tint/870.spvasm.expected.wgsl b/test/tint/bug/tint/870.spvasm.expected.wgsl
index f32dd4d..c3b7c8f 100644
--- a/test/tint/bug/tint/870.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/870.spvasm.expected.wgsl
@@ -16,12 +16,12 @@
fn main_1() {
var orientation : array<i32, 6u>;
let x_23 : Arr = sspp962805860buildInformation.passthru.orientation;
- orientation[0] = x_23[0u];
- orientation[1] = x_23[1u];
- orientation[2] = x_23[2u];
- orientation[3] = x_23[3u];
- orientation[4] = x_23[4u];
- orientation[5] = x_23[5u];
+ orientation[0i] = x_23[0u];
+ orientation[1i] = x_23[1u];
+ orientation[2i] = x_23[2u];
+ orientation[3i] = x_23[3u];
+ orientation[4i] = x_23[4u];
+ orientation[5i] = x_23[5u];
return;
}
diff --git a/test/tint/bug/tint/943.spvasm.expected.wgsl b/test/tint/bug/tint/943.spvasm.expected.wgsl
index 0cf809c..f7a524e 100644
--- a/test/tint/bug/tint/943.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/943.spvasm.expected.wgsl
@@ -60,7 +60,7 @@
var x_87 : bool;
var x_88_phi : bool;
let x_76 : vec2<i32> = *(coord);
- let x_81 : bool = all((x_76 >= vec2<i32>(0, 0)));
+ let x_81 : bool = all((x_76 >= vec2<i32>(0i, 0i)));
x_88_phi = x_81;
if (x_81) {
let x_84 : vec2<i32> = *(coord);
@@ -136,7 +136,7 @@
let x_99 : vec3<i32> = *(coords);
let x_105 : i32 = x_48.outShapeStrides.x;
let x_107 : i32 = x_48.outShapeStrides.y;
- return i32(dot(vec3<f32>(x_99), vec3<f32>(vec3<i32>(x_105, x_107, 1))));
+ return i32(dot(vec3<f32>(x_99), vec3<f32>(vec3<i32>(x_105, x_107, 1i))));
}
fn setOutput_i1_f1_(flatIndex : ptr<function, i32>, value : ptr<function, f32>) {
@@ -223,26 +223,26 @@
var param_8 : i32;
var param_9 : f32;
let x_132 : u32 = gl_LocalInvocationID.y;
- tileRow = (bitcast<i32>(x_132) * 1);
+ tileRow = (bitcast<i32>(x_132) * 1i);
let x_137 : u32 = gl_LocalInvocationID.x;
- tileCol = (bitcast<i32>(x_137) * 1);
+ tileCol = (bitcast<i32>(x_137) * 1i);
let x_143 : u32 = gl_GlobalInvocationID.y;
- globalRow = (bitcast<i32>(x_143) * 1);
+ globalRow = (bitcast<i32>(x_143) * 1i);
let x_148 : u32 = gl_GlobalInvocationID.x;
- globalCol = (bitcast<i32>(x_148) * 1);
+ globalCol = (bitcast<i32>(x_148) * 1i);
let x_152 : i32 = *(dimInner);
- numTiles = (((x_152 - 1) / 64) + 1);
- innerRow = 0;
+ numTiles = (((x_152 - 1i) / 64i) + 1i);
+ innerRow = 0i;
loop {
let x_163 : i32 = innerRow;
- if ((x_163 < 1)) {
+ if ((x_163 < 1i)) {
} else {
break;
}
- innerCol = 0;
+ innerCol = 0i;
loop {
let x_171 : i32 = innerCol;
- if ((x_171 < 1)) {
+ if ((x_171 < 1i)) {
} else {
break;
}
@@ -252,20 +252,20 @@
continuing {
let x_181 : i32 = innerCol;
- innerCol = (x_181 + 1);
+ innerCol = (x_181 + 1i);
}
}
continuing {
let x_183 : i32 = innerRow;
- innerRow = (x_183 + 1);
+ innerRow = (x_183 + 1i);
}
}
let x_187 : u32 = gl_LocalInvocationID.x;
- tileColA = (bitcast<i32>(x_187) * 64);
+ tileColA = (bitcast<i32>(x_187) * 64i);
let x_192 : u32 = gl_LocalInvocationID.y;
- tileRowB = (bitcast<i32>(x_192) * 1);
- t = 0;
+ tileRowB = (bitcast<i32>(x_192) * 1i);
+ t = 0i;
loop {
let x_201 : i32 = t;
let x_202 : i32 = numTiles;
@@ -273,17 +273,17 @@
} else {
break;
}
- innerRow_1 = 0;
+ innerRow_1 = 0i;
loop {
let x_210 : i32 = innerRow_1;
- if ((x_210 < 1)) {
+ if ((x_210 < 1i)) {
} else {
break;
}
- innerCol_1 = 0;
+ innerCol_1 = 0i;
loop {
let x_218 : i32 = innerCol_1;
- if ((x_218 < 64)) {
+ if ((x_218 < 64i)) {
} else {
break;
}
@@ -300,32 +300,32 @@
let x_238 : i32 = t;
let x_240 : i32 = inputCol;
param_3 = (x_235 + x_236);
- param_4 = ((x_238 * 64) + x_240);
+ param_4 = ((x_238 * 64i) + x_240);
let x_244 : f32 = mm_readA_i1_i1_(&(param_3), &(param_4));
mm_Asub[x_233][x_234] = x_244;
continuing {
let x_247 : i32 = innerCol_1;
- innerCol_1 = (x_247 + 1);
+ innerCol_1 = (x_247 + 1i);
}
}
continuing {
let x_249 : i32 = innerRow_1;
- innerRow_1 = (x_249 + 1);
+ innerRow_1 = (x_249 + 1i);
}
}
- innerRow_2 = 0;
+ innerRow_2 = 0i;
loop {
let x_257 : i32 = innerRow_2;
- if ((x_257 < 1)) {
+ if ((x_257 < 1i)) {
} else {
break;
}
- innerCol_2 = 0;
+ innerCol_2 = 0i;
loop {
let x_265 : i32 = innerCol_2;
- if ((x_265 < 1)) {
+ if ((x_265 < 1i)) {
} else {
break;
}
@@ -341,34 +341,34 @@
let x_282 : i32 = inputRow_1;
let x_284 : i32 = globalCol;
let x_285 : i32 = innerCol_2;
- param_5 = ((x_280 * 64) + x_282);
+ param_5 = ((x_280 * 64i) + x_282);
param_6 = (x_284 + x_285);
let x_289 : f32 = mm_readB_i1_i1_(&(param_5), &(param_6));
mm_Bsub[x_278][x_279] = x_289;
continuing {
let x_291 : i32 = innerCol_2;
- innerCol_2 = (x_291 + 1);
+ innerCol_2 = (x_291 + 1i);
}
}
continuing {
let x_293 : i32 = innerRow_2;
- innerRow_2 = (x_293 + 1);
+ innerRow_2 = (x_293 + 1i);
}
}
workgroupBarrier();
- k = 0;
+ k = 0i;
loop {
let x_302 : i32 = k;
- if ((x_302 < 64)) {
+ if ((x_302 < 64i)) {
} else {
break;
}
- inner = 0;
+ inner = 0i;
loop {
let x_310 : i32 = inner;
- if ((x_310 < 1)) {
+ if ((x_310 < 1i)) {
} else {
break;
}
@@ -381,13 +381,13 @@
continuing {
let x_322 : i32 = inner;
- inner = (x_322 + 1);
+ inner = (x_322 + 1i);
}
}
- innerRow_3 = 0;
+ innerRow_3 = 0i;
loop {
let x_330 : i32 = innerRow_3;
- if ((x_330 < 1)) {
+ if ((x_330 < 1i)) {
} else {
break;
}
@@ -396,10 +396,10 @@
let x_336 : i32 = k;
let x_338 : f32 = mm_Asub[(x_333 + x_334)][x_336];
ACached = x_338;
- innerCol_3 = 0;
+ innerCol_3 = 0i;
loop {
let x_345 : i32 = innerCol_3;
- if ((x_345 < 1)) {
+ if ((x_345 < 1i)) {
} else {
break;
}
@@ -413,41 +413,41 @@
continuing {
let x_358 : i32 = innerCol_3;
- innerCol_3 = (x_358 + 1);
+ innerCol_3 = (x_358 + 1i);
}
}
continuing {
let x_360 : i32 = innerRow_3;
- innerRow_3 = (x_360 + 1);
+ innerRow_3 = (x_360 + 1i);
}
}
continuing {
let x_362 : i32 = k;
- k = (x_362 + 1);
+ k = (x_362 + 1i);
}
}
workgroupBarrier();
continuing {
let x_364 : i32 = t;
- t = (x_364 + 1);
+ t = (x_364 + 1i);
}
}
- innerRow_4 = 0;
+ innerRow_4 = 0i;
loop {
let x_372 : i32 = innerRow_4;
- if ((x_372 < 1)) {
+ if ((x_372 < 1i)) {
} else {
break;
}
- innerCol_4 = 0;
+ innerCol_4 = 0i;
loop {
var x_393 : bool;
var x_394_phi : bool;
let x_380 : i32 = innerCol_4;
- if ((x_380 < 1)) {
+ if ((x_380 < 1i)) {
} else {
break;
}
@@ -480,13 +480,13 @@
continuing {
let x_411 : i32 = innerCol_4;
- innerCol_4 = (x_411 + 1);
+ innerCol_4 = (x_411 + 1i);
}
}
continuing {
let x_413 : i32 = innerRow_4;
- innerRow_4 = (x_413 + 1);
+ innerRow_4 = (x_413 + 1i);
}
}
return;
diff --git a/test/tint/bug/tint/977.spvasm.expected.wgsl b/test/tint/bug/tint/977.spvasm.expected.wgsl
index 1cbf103..e4f873d 100644
--- a/test/tint/bug/tint/977.spvasm.expected.wgsl
+++ b/test/tint/bug/tint/977.spvasm.expected.wgsl
@@ -60,7 +60,7 @@
var param_1 : f32;
let x_54 : u32 = gl_GlobalInvocationID.x;
index = bitcast<i32>(x_54);
- a_1 = -10;
+ a_1 = -10i;
let x_63 : i32 = index;
param = -4.0;
param_1 = -3.0;
diff --git a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.wgsl b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.wgsl
index eaa60de..5c2a634 100644
--- a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.wgsl
+++ b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.wgsl
@@ -1,5 +1,5 @@
fn f_1() {
- var v : i32 = 0;
+ var v : i32 = 0i;
var offset_1 : u32 = 0u;
var count : u32 = 0u;
let x_16 : i32 = v;
diff --git a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.wgsl b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.wgsl
index 65de288..aefe0dc 100644
--- a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.wgsl
+++ b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.wgsl
@@ -1,6 +1,6 @@
fn f_1() {
- var v : i32 = 0;
- var n : i32 = 0;
+ var v : i32 = 0i;
+ var n : i32 = 0i;
var offset_1 : u32 = 0u;
var count : u32 = 0u;
let x_17 : i32 = v;
diff --git a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.wgsl b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.wgsl
index 3a8ac6d..26e6b12 100644
--- a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.wgsl
+++ b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.wgsl
@@ -4,7 +4,7 @@
fn textureLoad_6273b1() {
var res : f32 = 0.0;
- let x_17 : vec4<f32> = vec4<f32>(textureLoad(arg_0, vec2<i32>(), 1), 0.0, 0.0, 0.0);
+ let x_17 : vec4<f32> = vec4<f32>(textureLoad(arg_0, vec2<i32>(), 1i), 0.0, 0.0, 0.0);
res = x_17.x;
return;
}
diff --git a/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl b/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl
index 3f2b3f9..e53342a 100644
--- a/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl
+++ b/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.wgsl
@@ -3,7 +3,7 @@
var<private> tint_symbol_1 : vec4<f32> = vec4<f32>();
fn textureNumSamples_a3c8a0() {
- var res : i32 = 0;
+ var res : i32 = 0i;
let x_16 : i32 = textureNumSamples(arg_0);
res = x_16;
return;
diff --git a/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl b/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl
index 45ab66f..c066728 100644
--- a/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl
@@ -1,7 +1,7 @@
fn main_1() {
var m : mat3x3<f32> = mat3x3<f32>();
m = mat3x3<f32>(vec3<f32>(1.0, 2.0, 3.0), vec3<f32>(4.0, 5.0, 6.0), vec3<f32>(7.0, 8.0, 9.0));
- m[1] = vec3<f32>(5.0, 5.0, 5.0);
+ m[1i] = vec3<f32>(5.0, 5.0, 5.0);
return;
}
diff --git a/test/tint/ptr_ref/load/global/i32.spvasm.expected.wgsl b/test/tint/ptr_ref/load/global/i32.spvasm.expected.wgsl
index fa2c115..f90e547 100644
--- a/test/tint/ptr_ref/load/global/i32.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/load/global/i32.spvasm.expected.wgsl
@@ -1,8 +1,8 @@
-var<private> I : i32 = 0;
+var<private> I : i32 = 0i;
fn main_1() {
let x_9 : i32 = I;
- let x_11 : i32 = (x_9 + 1);
+ let x_11 : i32 = (x_9 + 1i);
return;
}
diff --git a/test/tint/ptr_ref/load/local/i32.spvasm.expected.wgsl b/test/tint/ptr_ref/load/local/i32.spvasm.expected.wgsl
index 22952b8..7386377 100644
--- a/test/tint/ptr_ref/load/local/i32.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/load/local/i32.spvasm.expected.wgsl
@@ -1,8 +1,8 @@
fn main_1() {
- var i : i32 = 0;
- i = 123;
+ var i : i32 = 0i;
+ i = 123i;
let x_10 : i32 = i;
- let x_12 : i32 = (x_10 + 1);
+ let x_12 : i32 = (x_10 + 1i);
return;
}
diff --git a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.wgsl b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.wgsl
index e8df997..7ac40a4 100644
--- a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.wgsl
@@ -4,8 +4,8 @@
}
fn main_1() {
- var i : i32 = 0;
- i = 123;
+ var i : i32 = 0i;
+ i = 123i;
let x_19 : i32 = i;
let x_18 : i32 = func(x_19, &(i));
return;
diff --git a/test/tint/ptr_ref/store/global/i32.spvasm.expected.wgsl b/test/tint/ptr_ref/store/global/i32.spvasm.expected.wgsl
index d50fc89..6357eec 100644
--- a/test/tint/ptr_ref/store/global/i32.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/store/global/i32.spvasm.expected.wgsl
@@ -1,8 +1,8 @@
-var<private> I : i32 = 0;
+var<private> I : i32 = 0i;
fn main_1() {
- I = 123;
- I = ((100 + 20) + 3);
+ I = 123i;
+ I = ((100i + 20i) + 3i);
return;
}
diff --git a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.wgsl b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.wgsl
index 0a63914..b1828e1 100644
--- a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.wgsl
@@ -5,7 +5,7 @@
var<private> V : S;
fn main_1() {
- V.i = 5;
+ V.i = 5i;
return;
}
diff --git a/test/tint/ptr_ref/store/local/i32.spvasm.expected.wgsl b/test/tint/ptr_ref/store/local/i32.spvasm.expected.wgsl
index 822c64b..1585e23 100644
--- a/test/tint/ptr_ref/store/local/i32.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/store/local/i32.spvasm.expected.wgsl
@@ -1,8 +1,8 @@
fn main_1() {
- var i : i32 = 0;
- i = 123;
- i = 123;
- i = ((100 + 20) + 3);
+ var i : i32 = 0i;
+ i = 123i;
+ i = 123i;
+ i = ((100i + 20i) + 3i);
return;
}
diff --git a/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.wgsl b/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.wgsl
index 44c8b63..603a463 100644
--- a/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.wgsl
@@ -4,7 +4,7 @@
fn main_1() {
var V : S;
- V.i = 5;
+ V.i = 5i;
return;
}
diff --git a/test/tint/ptr_ref/store/param/ptr.spvasm.expected.wgsl b/test/tint/ptr_ref/store/param/ptr.spvasm.expected.wgsl
index c505b66..35560e9 100644
--- a/test/tint/ptr_ref/store/param/ptr.spvasm.expected.wgsl
+++ b/test/tint/ptr_ref/store/param/ptr.spvasm.expected.wgsl
@@ -4,9 +4,9 @@
}
fn main_1() {
- var i : i32 = 0;
- i = 123;
- func(123, &(i));
+ var i : i32 = 0i;
+ i = 123i;
+ func(123i, &(i));
return;
}