diff --git a/src/writer/hlsl/generator_impl.cc b/src/writer/hlsl/generator_impl.cc index c60be69618..76b46c1a20 100644 --- a/src/writer/hlsl/generator_impl.cc +++ b/src/writer/hlsl/generator_impl.cc @@ -116,13 +116,6 @@ std::ostream& operator<<(std::ostream& s, const RegisterAndSpace& rs) { return s; } -const char* LoopAttribute() { - // Force loops not to be unrolled to work around FXC compilation issues when - // it attempts and fails to unroll loops when it contains gradient operations. - // https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-while - return "[loop] "; -} - } // namespace SanitizedResult::SanitizedResult() = default; @@ -2834,7 +2827,7 @@ bool GeneratorImpl::EmitLoop(const ast::LoopStatement* stmt) { }; TINT_SCOPED_ASSIGNMENT(emit_continuing_, emit_continuing); - line() << LoopAttribute() << "while (true) {"; + line() << "while (true) {"; { ScopedIndent si(this); if (!EmitStatements(stmt->body->statements)) { @@ -2904,7 +2897,7 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) { }; TINT_SCOPED_ASSIGNMENT(emit_continuing_, emit_continuing); - line() << LoopAttribute() << "while (true) {"; + line() << "while (true) {"; increment_indent(); TINT_DEFER({ decrement_indent(); @@ -2927,7 +2920,7 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) { // For-loop can be generated. { auto out = line(); - out << LoopAttribute() << "for"; + out << "for"; { ScopedParen sp(out); diff --git a/src/writer/hlsl/generator_impl_continue_test.cc b/src/writer/hlsl/generator_impl_continue_test.cc index 80baf57e42..e312b826ed 100644 --- a/src/writer/hlsl/generator_impl_continue_test.cc +++ b/src/writer/hlsl/generator_impl_continue_test.cc @@ -30,7 +30,7 @@ TEST_F(HlslGeneratorImplTest_Continue, Emit_Continue) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(loop)) << gen.error(); - EXPECT_EQ(gen.result(), R"( [loop] while (true) { + EXPECT_EQ(gen.result(), R"( while (true) { continue; } )"); diff --git a/src/writer/hlsl/generator_impl_loop_test.cc b/src/writer/hlsl/generator_impl_loop_test.cc index c6a919f768..a66782e960 100644 --- a/src/writer/hlsl/generator_impl_loop_test.cc +++ b/src/writer/hlsl/generator_impl_loop_test.cc @@ -34,7 +34,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_Loop) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(l)) << gen.error(); - EXPECT_EQ(gen.result(), R"( [loop] while (true) { + EXPECT_EQ(gen.result(), R"( while (true) { discard; } )"); @@ -54,7 +54,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_LoopWithContinuing) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(l)) << gen.error(); - EXPECT_EQ(gen.result(), R"( [loop] while (true) { + EXPECT_EQ(gen.result(), R"( while (true) { discard; { a_statement(); @@ -88,8 +88,8 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_LoopNestedWithContinuing) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(outer)) << gen.error(); - EXPECT_EQ(gen.result(), R"( [loop] while (true) { - [loop] while (true) { + EXPECT_EQ(gen.result(), R"( while (true) { + while (true) { discard; { a_statement(); @@ -142,7 +142,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_LoopWithVarUsedInContinuing) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(outer)) << gen.error(); - EXPECT_EQ(gen.result(), R"( [loop] while (true) { + EXPECT_EQ(gen.result(), R"( while (true) { float lhs = 2.400000095f; float other = 0.0f; { @@ -169,7 +169,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoop) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] for(; ; ) { + for(; ; ) { a_statement(); } } @@ -193,7 +193,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleInit) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] for(int i = 0; ; ) { + for(int i = 0; ; ) { a_statement(); } } @@ -223,7 +223,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInit) { tint_tmp = false; } bool b = (tint_tmp); - [loop] for(; ; ) { + for(; ; ) { a_statement(); } } @@ -246,7 +246,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleCond) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] for(; true; ) { + for(; true; ) { a_statement(); } } @@ -272,7 +272,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtCond) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] while (true) { + while (true) { bool tint_tmp = true; if (tint_tmp) { tint_tmp = false; @@ -302,7 +302,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleCont) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] for(; ; i = (i + 1)) { + for(; ; i = (i + 1)) { a_statement(); } } @@ -329,7 +329,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtCont) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] while (true) { + while (true) { a_statement(); bool tint_tmp = true; if (tint_tmp) { @@ -358,7 +358,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithSimpleInitCondCont) { ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); EXPECT_EQ(gen.result(), R"( { - [loop] for(int i = 0; true; i = (i + 1)) { + for(int i = 0; true; i = (i + 1)) { a_statement(); } } @@ -394,7 +394,7 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInitCondCont) { tint_tmp = false; } bool i = (tint_tmp); - [loop] while (true) { + while (true) { bool tint_tmp_1 = true; if (tint_tmp_1) { tint_tmp_1 = false; diff --git a/test/array/assign_to_function_var.wgsl.expected.hlsl b/test/array/assign_to_function_var.wgsl.expected.hlsl index f5c4ff0a76..5b15fc1256 100644 --- a/test/array/assign_to_function_var.wgsl.expected.hlsl +++ b/test/array/assign_to_function_var.wgsl.expected.hlsl @@ -32,7 +32,7 @@ typedef tint_padded_array_element tint_symbol_1_ret[4]; tint_symbol_1_ret tint_symbol_1(uint4 buffer[4], uint offset) { tint_padded_array_element arr_1[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) { + for(uint i = 0u; (i < 4u); i = (i + 1u)) { const uint scalar_offset = ((offset + (i * 16u))) / 4; arr_1[i].el = asint(buffer[scalar_offset / 4][scalar_offset % 4]); } @@ -44,7 +44,7 @@ typedef tint_padded_array_element tint_symbol_3_ret[4]; tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr_2[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr_2[i_1].el = asint(buffer.Load((offset + (i_1 * 16u)))); } } diff --git a/test/array/assign_to_private_var.wgsl.expected.hlsl b/test/array/assign_to_private_var.wgsl.expected.hlsl index 4fd9d453dd..8cd8ee1b62 100644 --- a/test/array/assign_to_private_var.wgsl.expected.hlsl +++ b/test/array/assign_to_private_var.wgsl.expected.hlsl @@ -34,7 +34,7 @@ typedef tint_padded_array_element tint_symbol_1_ret[4]; tint_symbol_1_ret tint_symbol_1(uint4 buffer[4], uint offset) { tint_padded_array_element arr_1[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) { + for(uint i = 0u; (i < 4u); i = (i + 1u)) { const uint scalar_offset = ((offset + (i * 16u))) / 4; arr_1[i].el = asint(buffer[scalar_offset / 4][scalar_offset % 4]); } @@ -46,7 +46,7 @@ typedef tint_padded_array_element tint_symbol_3_ret[4]; tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr_2[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr_2[i_1].el = asint(buffer.Load((offset + (i_1 * 16u)))); } } diff --git a/test/array/assign_to_storage_var.wgsl.expected.hlsl b/test/array/assign_to_storage_var.wgsl.expected.hlsl index 8e9d0b6e04..8825ef39d7 100644 --- a/test/array/assign_to_storage_var.wgsl.expected.hlsl +++ b/test/array/assign_to_storage_var.wgsl.expected.hlsl @@ -33,7 +33,7 @@ S ret_struct_arr() { void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, tint_padded_array_element value[4]) { tint_padded_array_element array[4] = value; { - [loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) { + for(uint i = 0u; (i < 4u); i = (i + 1u)) { buffer.Store((offset + (i * 16u)), asuint(array[i].el)); } } @@ -43,7 +43,7 @@ typedef tint_padded_array_element tint_symbol_3_ret[4]; tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) { tint_padded_array_element arr_1[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { const uint scalar_offset = ((offset + (i_1 * 16u))) / 4; arr_1[i_1].el = asint(buffer[scalar_offset / 4][scalar_offset % 4]); } @@ -55,7 +55,7 @@ typedef tint_padded_array_element tint_symbol_5_ret[4]; tint_symbol_5_ret tint_symbol_5(RWByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr_2[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) { + for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) { arr_2[i_2].el = asint(buffer.Load((offset + (i_2 * 16u)))); } } @@ -65,7 +65,7 @@ tint_symbol_5_ret tint_symbol_5(RWByteAddressBuffer buffer, uint offset) { void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[2]) { int array_3[2] = value; { - [loop] for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) { + for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) { buffer.Store((offset + (i_3 * 4u)), asuint(array_3[i_3])); } } @@ -74,7 +74,7 @@ void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[2]) { void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, int value[3][2]) { int array_2[3][2] = value; { - [loop] for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) { + for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) { tint_symbol_9(buffer, (offset + (i_4 * 8u)), array_2[i_4]); } } @@ -83,7 +83,7 @@ void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, int value[3][2]) { void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, int value[4][3][2]) { int array_1[4][3][2] = value; { - [loop] for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) { + for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) { tint_symbol_8(buffer, (offset + (i_5 * 24u)), array_1[i_5]); } } diff --git a/test/array/assign_to_workgroup_var.wgsl.expected.hlsl b/test/array/assign_to_workgroup_var.wgsl.expected.hlsl index b60b9741ba..43a8a1cb29 100644 --- a/test/array/assign_to_workgroup_var.wgsl.expected.hlsl +++ b/test/array/assign_to_workgroup_var.wgsl.expected.hlsl @@ -34,7 +34,7 @@ typedef tint_padded_array_element tint_symbol_1_ret[4]; tint_symbol_1_ret tint_symbol_1(uint4 buffer[4], uint offset) { tint_padded_array_element arr_1[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) { + for(uint i = 0u; (i < 4u); i = (i + 1u)) { const uint scalar_offset = ((offset + (i * 16u))) / 4; arr_1[i].el = asint(buffer[scalar_offset / 4][scalar_offset % 4]); } @@ -46,7 +46,7 @@ typedef tint_padded_array_element tint_symbol_3_ret[4]; tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr_2[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr_2[i_1].el = asint(buffer.Load((offset + (i_1 * 16u)))); } } diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl index 25056c12eb..789126bf81 100644 --- a/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl +++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.hlsl @@ -16,7 +16,7 @@ typedef int4 tint_symbol_11_ret[4]; tint_symbol_11_ret tint_symbol_11(ByteAddressBuffer buffer, uint offset) { int4 arr_1[4] = (int4[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr_1[i_1] = asint(buffer.Load4((offset + (i_1 * 16u)))); } } diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl index 3fb60a25d5..d267673c0e 100644 --- a/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl +++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.hlsl @@ -18,7 +18,7 @@ void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, float3x2 value) { void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int4 value[4]) { int4 array[4] = value; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { buffer.Store4((offset + (i_1 * 16u)), asuint(array[i_1])); } } diff --git a/test/buffer/storage/static_index/read.wgsl.expected.hlsl b/test/buffer/storage/static_index/read.wgsl.expected.hlsl index 667739be6a..42a6a71d42 100644 --- a/test/buffer/storage/static_index/read.wgsl.expected.hlsl +++ b/test/buffer/storage/static_index/read.wgsl.expected.hlsl @@ -24,7 +24,7 @@ typedef tint_padded_array_element tint_symbol_10_ret[4]; tint_symbol_10_ret tint_symbol_10(ByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr[i_1].el = tint_symbol_9(buffer, (offset + (i_1 * 16u))); } } diff --git a/test/buffer/storage/static_index/write.wgsl.expected.hlsl b/test/buffer/storage/static_index/write.wgsl.expected.hlsl index 8a2e683a06..8c9b7ea6c5 100644 --- a/test/buffer/storage/static_index/write.wgsl.expected.hlsl +++ b/test/buffer/storage/static_index/write.wgsl.expected.hlsl @@ -25,7 +25,7 @@ void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) { void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, tint_padded_array_element value[4]) { tint_padded_array_element array[4] = value; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { tint_symbol_9(buffer, (offset + (i_1 * 16u)), array[i_1].el); } } diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl index 0d7bd06a72..b110fb71d8 100644 --- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl +++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.hlsl @@ -26,7 +26,7 @@ typedef int4 tint_symbol_12_ret[4]; tint_symbol_12_ret tint_symbol_12(uint4 buffer[96], uint offset) { int4 arr_1[4] = (int4[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { const uint scalar_offset_5 = ((offset + (i_1 * 16u))) / 4; arr_1[i_1] = asint(buffer[scalar_offset_5 / 4]); } diff --git a/test/buffer/uniform/static_index/read.wgsl.expected.hlsl b/test/buffer/uniform/static_index/read.wgsl.expected.hlsl index 9fa1d0393a..f66c81b288 100644 --- a/test/buffer/uniform/static_index/read.wgsl.expected.hlsl +++ b/test/buffer/uniform/static_index/read.wgsl.expected.hlsl @@ -35,7 +35,7 @@ typedef tint_padded_array_element tint_symbol_11_ret[4]; tint_symbol_11_ret tint_symbol_11(uint4 buffer[13], uint offset) { tint_padded_array_element arr[4] = (tint_padded_array_element[4])0; { - [loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) { arr[i_1].el = tint_symbol_10(buffer, (offset + (i_1 * 16u))); } } diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl index 0c590e46bc..0ea2ad60c6 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.hlsl @@ -15,7 +15,7 @@ struct tint_symbol_2 { void f_inner(uint local_invocation_index) { { - [loop] for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { + for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { const uint i = idx; s.data[i] = 0; } diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl index 5080be8b95..1098254f3a 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.hlsl @@ -15,7 +15,7 @@ struct tint_symbol_2 { void f_inner(uint local_invocation_index) { { - [loop] for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { + for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { const uint i = idx; s.data[i] = 0; } diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.hlsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.hlsl index 00000e97cd..7b10259dba 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.hlsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.hlsl @@ -21,7 +21,7 @@ static bool2 v2b = bool2(false, false); void foo() { { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { set_float2(v2f, i, 1.0f); set_int3(v3i, i, 1); set_uint4(v4u, i, 1u); @@ -33,7 +33,7 @@ void foo() { [numthreads(1, 1, 1)] void main() { { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { foo(); } } diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.hlsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.hlsl index cc096ac700..64b4feaaa8 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.hlsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.hlsl @@ -30,7 +30,7 @@ void foo() { [numthreads(1, 1, 1)] void main() { { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { foo(); } } diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.hlsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.hlsl index 13dd87cfd2..158e0e15b4 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.hlsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.hlsl @@ -61,7 +61,7 @@ void main() { bool3 v3b = bool3(false, false, false); bool4 v4b = bool4(false, false, false, false); { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { set_float2(v2f, i, 1.0f); set_float3(v3f, i, 1.0f); set_float4(v4f, i, 1.0f); diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.hlsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.hlsl index 0c3db07790..6cabffe8ba 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.hlsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.hlsl @@ -25,7 +25,7 @@ void main() { bool2 v2b = bool2(false, false); bool2 v2b_2 = bool2(false, false); { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { set_float2(v2f, i, 1.0f); set_int3(v3i, i, 1); set_uint4(v4u, i, 1u); diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.hlsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.hlsl index 0740864c6c..1461d03c1a 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.hlsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.hlsl @@ -61,7 +61,7 @@ void main() { bool3 v3b = bool3(false, false, false); bool4 v4b = bool4(false, false, false, false); { - [loop] for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = (i + 1)) { set_float2(v2f, i, 1.0f); set_int2(v2i, i, 1); set_uint2(v2u, i, 1u); diff --git a/test/bug/tint/1064.wgsl.expected.hlsl b/test/bug/tint/1064.wgsl.expected.hlsl index ed00540a4b..56911a4b81 100644 --- a/test/bug/tint/1064.wgsl.expected.hlsl +++ b/test/bug/tint/1064.wgsl.expected.hlsl @@ -1,5 +1,5 @@ void main() { - [loop] while (true) { + while (true) { if (false) { } else { break; diff --git a/test/bug/tint/1081.wgsl.expected.hlsl b/test/bug/tint/1081.wgsl.expected.hlsl index 1aba907086..056c225261 100644 --- a/test/bug/tint/1081.wgsl.expected.hlsl +++ b/test/bug/tint/1081.wgsl.expected.hlsl @@ -22,7 +22,7 @@ struct tint_symbol_2 { int main_inner(int3 x) { int y = x.x; - [loop] while (true) { + while (true) { const int r = f(y); if ((r == 0)) { break; diff --git a/test/bug/tint/1121.wgsl.expected.hlsl b/test/bug/tint/1121.wgsl.expected.hlsl index a5ab12d742..12d8865772 100644 --- a/test/bug/tint/1121.wgsl.expected.hlsl +++ b/test/bug/tint/1121.wgsl.expected.hlsl @@ -52,9 +52,9 @@ void main_inner(uint3 GlobalInvocationID) { const int TILE_SIZE = 16; const int TILE_COUNT_X = 2; { - [loop] for(int y_1 = 0; (y_1 < 2); y_1 = (y_1 + 1)) { + for(int y_1 = 0; (y_1 < 2); y_1 = (y_1 + 1)) { { - [loop] for(int x_1 = 0; (x_1 < TILE_COUNT_X); x_1 = (x_1 + 1)) { + for(int x_1 = 0; (x_1 < TILE_COUNT_X); x_1 = (x_1 + 1)) { int2 tilePixel0Idx = int2((x_1 * TILE_SIZE), (y_1 * TILE_SIZE)); float2 floorCoord = (((2.0f * float2(tilePixel0Idx)) / asfloat(uniforms[10]).xy) - float2((1.0f).xx)); float2 ceilCoord = (((2.0f * float2((tilePixel0Idx + int2((TILE_SIZE).xx)))) / asfloat(uniforms[10]).xy) - float2((1.0f).xx)); @@ -66,7 +66,7 @@ void main_inner(uint3 GlobalInvocationID) { frustumPlanes[3] = float4(0.0f, -1.0f, (viewCeilCoord.y / viewNear), 0.0f); float dp = 0.0f; { - [loop] for(uint i = 0u; (i < 6u); i = (i + 1u)) { + for(uint i = 0u; (i < 6u); i = (i + 1u)) { float4 p = float4(0.0f, 0.0f, 0.0f, 0.0f); if ((frustumPlanes[i].x > 0.0f)) { p.x = boxMax.x; diff --git a/test/bug/tint/221.wgsl.expected.hlsl b/test/bug/tint/221.wgsl.expected.hlsl index 04406bba52..ea467eae49 100644 --- a/test/bug/tint/221.wgsl.expected.hlsl +++ b/test/bug/tint/221.wgsl.expected.hlsl @@ -3,7 +3,7 @@ RWByteAddressBuffer b : register(u0, space0); [numthreads(1, 1, 1)] void main() { uint i = 0u; - [loop] while (true) { + while (true) { if ((i >= b.Load(0u))) { break; } diff --git a/test/bug/tint/534.wgsl.expected.hlsl b/test/bug/tint/534.wgsl.expected.hlsl index 0bee2d802c..03518c791a 100644 --- a/test/bug/tint/534.wgsl.expected.hlsl +++ b/test/bug/tint/534.wgsl.expected.hlsl @@ -32,7 +32,7 @@ void main_inner(uint3 GlobalInvocationID) { uint4 srcColorBits = uint4(0u, 0u, 0u, 0u); uint4 dstColorBits = uint4(dstColor); { - [loop] for(uint i = 0u; (i < uniforms[0].w); i = (i + 1u)) { + for(uint i = 0u; (i < uniforms[0].w); i = (i + 1u)) { set_uint4(srcColorBits, i, ConvertToFp16FloatValue(srcColor[i])); bool tint_tmp_1 = success; if (tint_tmp_1) { diff --git a/test/bug/tint/744.wgsl.expected.hlsl b/test/bug/tint/744.wgsl.expected.hlsl index 7870d26585..0b1434e1fe 100644 --- a/test/bug/tint/744.wgsl.expected.hlsl +++ b/test/bug/tint/744.wgsl.expected.hlsl @@ -15,7 +15,7 @@ void main_inner(uint3 global_id) { const uint dimOutter = uniforms[1].y; uint result = 0u; { - [loop] for(uint i = 0u; (i < dimInner); i = (i + 1u)) { + for(uint i = 0u; (i < dimInner); i = (i + 1u)) { const uint a = (i + (resultCell.x * dimInner)); const uint b = (resultCell.y + (i * dimOutter)); result = (result + (firstMatrix.Load((4u * a)) * secondMatrix.Load((4u * b)))); diff --git a/test/bug/tint/749.spvasm.expected.hlsl b/test/bug/tint/749.spvasm.expected.hlsl index 0b5ecf85ef..3fef834a3c 100644 --- a/test/bug/tint/749.spvasm.expected.hlsl +++ b/test/bug/tint/749.spvasm.expected.hlsl @@ -153,7 +153,7 @@ int performPartition_i1_i1_(inout int l, inout int h) { const QuicksortObject tint_symbol_11 = {tint_symbol_10}; obj = tint_symbol_11; obj = x_960; - [loop] while (true) { + while (true) { const int x_961 = pivot; pivot = 0; pivot = x_961; @@ -453,7 +453,7 @@ void quicksort_() { p = 0; p = x_1027; stack[x_100_save] = x_99; - [loop] while (true) { + while (true) { const float3 x_566 = float3(x_563.x, x_563.x, x_563.x); const int x_1028 = h_1; h_1 = 0; diff --git a/test/bug/tint/757.wgsl.expected.hlsl b/test/bug/tint/757.wgsl.expected.hlsl index d144aff8e9..8be66c6ede 100644 --- a/test/bug/tint/757.wgsl.expected.hlsl +++ b/test/bug/tint/757.wgsl.expected.hlsl @@ -14,7 +14,7 @@ void main_inner(uint3 GlobalInvocationID) { flatIndex = (flatIndex * 1u); float4 texel = myTexture.Load(int4(int3(int2(GlobalInvocationID.xy), 0), 0)); { - [loop] for(uint i = 0u; (i < 1u); i = (i + 1u)) { + for(uint i = 0u; (i < 1u); i = (i + 1u)) { result.Store((4u * (flatIndex + i)), asuint(texel.r)); } } diff --git a/test/bug/tint/870.spvasm.expected.hlsl b/test/bug/tint/870.spvasm.expected.hlsl index 69b21b914e..db19a18586 100644 --- a/test/bug/tint/870.spvasm.expected.hlsl +++ b/test/bug/tint/870.spvasm.expected.hlsl @@ -4,7 +4,7 @@ typedef int tint_symbol_ret[6]; tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) { int arr[6] = (int[6])0; { - [loop] for(uint i = 0u; (i < 6u); i = (i + 1u)) { + for(uint i = 0u; (i < 6u); i = (i + 1u)) { arr[i] = asint(buffer.Load((offset + (i * 4u)))); } } diff --git a/test/bug/tint/914.wgsl.expected.hlsl b/test/bug/tint/914.wgsl.expected.hlsl index 4c2e060457..b4add28c64 100644 --- a/test/bug/tint/914.wgsl.expected.hlsl +++ b/test/bug/tint/914.wgsl.expected.hlsl @@ -56,7 +56,7 @@ struct tint_symbol_1 { void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { { - [loop] for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) { + for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) { const uint i = (idx / 64u); const uint i_1 = (idx % 64u); mm_Asub[i][i_1] = 0.0f; @@ -73,7 +73,7 @@ void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { float ACached = 0.0f; float BCached[4] = (float[4])0; { - [loop] for(uint index = 0u; (index < (RowPerThread * ColPerThread)); index = (index + 1u)) { + for(uint index = 0u; (index < (RowPerThread * ColPerThread)); index = (index + 1u)) { acc[index] = 0.0f; } } @@ -82,11 +82,11 @@ void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { const uint RowPerThreadB = (TileInner / 16u); const uint tileRowB = (local_id.y * RowPerThreadB); { - [loop] for(uint t = 0u; (t < numTiles); t = (t + 1u)) { + for(uint t = 0u; (t < numTiles); t = (t + 1u)) { { - [loop] for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { + for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { { - [loop] for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) { + for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) { const uint inputRow = (tileRow + innerRow); const uint inputCol = (tileColA + innerCol); mm_Asub[inputRow][inputCol] = mm_readA((globalRow + innerRow), ((t * TileInner) + inputCol)); @@ -95,9 +95,9 @@ void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { } } { - [loop] for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) { + for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) { { - [loop] for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { + for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { const uint inputRow = (tileRowB + innerRow); const uint inputCol = (tileCol + innerCol); mm_Bsub[innerCol][inputCol] = mm_readB(((t * TileInner) + inputRow), (globalCol + innerCol)); @@ -107,17 +107,17 @@ void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { } GroupMemoryBarrierWithGroupSync(); { - [loop] for(uint k = 0u; (k < TileInner); k = (k + 1u)) { + for(uint k = 0u; (k < TileInner); k = (k + 1u)) { { - [loop] for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) { + for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) { BCached[inner] = mm_Bsub[k][(tileCol + inner)]; } } { - [loop] for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { + for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { ACached = mm_Asub[(tileRow + innerRow)][k]; { - [loop] for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { + for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { const uint index = ((innerRow * ColPerThread) + innerCol); acc[index] = (acc[index] + (ACached * BCached[innerCol])); } @@ -130,9 +130,9 @@ void main_inner(uint3 local_id, uint3 global_id, uint local_invocation_index) { } } { - [loop] for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { + for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { { - [loop] for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { + for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { const uint index = ((innerRow * ColPerThread) + innerCol); mm_write((globalRow + innerRow), (globalCol + innerCol), acc[index]); } diff --git a/test/bug/tint/942.wgsl.expected.hlsl b/test/bug/tint/942.wgsl.expected.hlsl index 7c38bdcd3d..2325c62f5e 100644 --- a/test/bug/tint/942.wgsl.expected.hlsl +++ b/test/bug/tint/942.wgsl.expected.hlsl @@ -18,7 +18,7 @@ struct tint_symbol_1 { void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index) { { - [loop] for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) { + for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) { const uint i_1 = (idx / 256u); const uint i_2 = (idx % 256u); tile[i_1][i_2] = float3(0.0f, 0.0f, 0.0f); @@ -31,9 +31,9 @@ void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocatio const int2 dims = tint_tmp.xy; const int2 baseIndex = (int2(((WorkGroupID.xy * uint2(params[0].y, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u)))) - int2(int(filterOffset), 0)); { - [loop] for(uint r = 0u; (r < 4u); r = (r + 1u)) { + for(uint r = 0u; (r < 4u); r = (r + 1u)) { { - [loop] for(uint c = 0u; (c < 4u); c = (c + 1u)) { + for(uint c = 0u; (c < 4u); c = (c + 1u)) { int2 loadIndex = (baseIndex + int2(int(c), int(r))); if ((flip[0].x != 0u)) { loadIndex = loadIndex.yx; @@ -45,9 +45,9 @@ void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocatio } GroupMemoryBarrierWithGroupSync(); { - [loop] for(uint r = 0u; (r < 4u); r = (r + 1u)) { + for(uint r = 0u; (r < 4u); r = (r + 1u)) { { - [loop] for(uint c = 0u; (c < 4u); c = (c + 1u)) { + for(uint c = 0u; (c < 4u); c = (c + 1u)) { int2 writeIndex = (baseIndex + int2(int(c), int(r))); if ((flip[0].x != 0u)) { writeIndex = writeIndex.yx; @@ -64,7 +64,7 @@ void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocatio if ((tint_tmp_1)) { float3 acc = float3(0.0f, 0.0f, 0.0f); { - [loop] for(uint f = 0u; (f < params[0].x); f = (f + 1u)) { + for(uint f = 0u; (f < params[0].x); f = (f + 1u)) { uint i = ((center + f) - filterOffset); acc = (acc + ((1.0f / float(params[0].x)) * tile[r][i])); } diff --git a/test/bug/tint/943.spvasm.expected.hlsl b/test/bug/tint/943.spvasm.expected.hlsl index bdf9b12cbf..38e87d39b8 100644 --- a/test/bug/tint/943.spvasm.expected.hlsl +++ b/test/bug/tint/943.spvasm.expected.hlsl @@ -186,10 +186,10 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB numTiles = (((x_152 - 1) / 64) + 1); innerRow = 0; { - [loop] for(; (innerRow < 1); innerRow = (innerRow + 1)) { + for(; (innerRow < 1); innerRow = (innerRow + 1)) { innerCol = 0; { - [loop] for(; (innerCol < 1); innerCol = (innerCol + 1)) { + for(; (innerCol < 1); innerCol = (innerCol + 1)) { acc[innerRow][innerCol] = 0.0f; } } @@ -201,13 +201,13 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB tileRowB = (asint(x_192) * 1); t = 0; { - [loop] for(; (t < numTiles); t = (t + 1)) { + for(; (t < numTiles); t = (t + 1)) { innerRow_1 = 0; { - [loop] for(; (innerRow_1 < 1); innerRow_1 = (innerRow_1 + 1)) { + for(; (innerRow_1 < 1); innerRow_1 = (innerRow_1 + 1)) { innerCol_1 = 0; { - [loop] for(; (innerCol_1 < 64); innerCol_1 = (innerCol_1 + 1)) { + for(; (innerCol_1 < 64); innerCol_1 = (innerCol_1 + 1)) { inputRow = (tileRow + innerRow_1); inputCol = (tileColA + innerCol_1); const int x_233 = inputRow; @@ -224,10 +224,10 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB } innerRow_2 = 0; { - [loop] for(; (innerRow_2 < 1); innerRow_2 = (innerRow_2 + 1)) { + for(; (innerRow_2 < 1); innerRow_2 = (innerRow_2 + 1)) { innerCol_2 = 0; { - [loop] for(; (innerCol_2 < 1); innerCol_2 = (innerCol_2 + 1)) { + for(; (innerCol_2 < 1); innerCol_2 = (innerCol_2 + 1)) { inputRow_1 = (tileRowB + innerRow_2); inputCol_1 = (tileCol + innerCol_2); const int x_278 = inputRow_1; @@ -245,10 +245,10 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB GroupMemoryBarrierWithGroupSync(); k = 0; { - [loop] for(; (k < 64); k = (k + 1)) { + for(; (k < 64); k = (k + 1)) { inner = 0; { - [loop] for(; (inner < 1); inner = (inner + 1)) { + for(; (inner < 1); inner = (inner + 1)) { const int x_314 = inner; const float x_320 = mm_Bsub[k][(tileCol + inner)]; BCached[x_314] = x_320; @@ -256,12 +256,12 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB } innerRow_3 = 0; { - [loop] for(; (innerRow_3 < 1); innerRow_3 = (innerRow_3 + 1)) { + for(; (innerRow_3 < 1); innerRow_3 = (innerRow_3 + 1)) { const float x_338 = mm_Asub[(tileRow + innerRow_3)][k]; ACached = x_338; innerCol_3 = 0; { - [loop] for(; (innerCol_3 < 1); innerCol_3 = (innerCol_3 + 1)) { + for(; (innerCol_3 < 1); innerCol_3 = (innerCol_3 + 1)) { const int x_347 = innerRow_3; const int x_348 = innerCol_3; const float x_349 = ACached; @@ -279,9 +279,9 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB } innerRow_4 = 0; { - [loop] for(; (innerRow_4 < 1); innerRow_4 = (innerRow_4 + 1)) { + for(; (innerRow_4 < 1); innerRow_4 = (innerRow_4 + 1)) { innerCol_4 = 0; - [loop] while (true) { + while (true) { bool x_393 = false; bool x_394_phi = false; if ((innerCol_4 < 1)) { @@ -352,7 +352,7 @@ void main_inner(uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_pa mm_Bsub[i_1][i_2] = 0.0f; } { - [loop] for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) { + for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) { const uint i = (idx / 64u); const uint i_1 = (idx % 64u); mm_Asub[i][i_1] = 0.0f; diff --git a/test/bug/tint/948.wgsl.expected.hlsl b/test/bug/tint/948.wgsl.expected.hlsl index 5a253ad267..869f3e3ea6 100644 --- a/test/bug/tint/948.wgsl.expected.hlsl +++ b/test/bug/tint/948.wgsl.expected.hlsl @@ -62,7 +62,7 @@ void main_1() { stageUnits = (float2(1.0f, 1.0f) / x_111); i = 0; { - [loop] for(; (i < 2); i = (i + 1)) { + for(; (i < 2); i = (i + 1)) { switch(i) { case 1: { const float2 x_150 = tileID; @@ -93,7 +93,7 @@ void main_1() { mt = ((x_181 * x_184) % 1.0f); f = 0.0f; { - [loop] for(; (f < 8.0f); f = (f + 1.0f)) { + for(; (f < 8.0f); f = (f + 1.0f)) { const float x_197 = animationData.y; if ((x_197 > mt)) { const float x_203 = animationData.x; diff --git a/test/bug/tint/949.wgsl.expected.hlsl b/test/bug/tint/949.wgsl.expected.hlsl index 4869166be8..e875c0dcd9 100644 --- a/test/bug/tint/949.wgsl.expected.hlsl +++ b/test/bug/tint/949.wgsl.expected.hlsl @@ -244,7 +244,7 @@ void main_1() { currSampledHeight = 1.0f; i = 0; { - [loop] for(; (i < 15); i = (i + 1)) { + for(; (i < 15); i = (i + 1)) { const float4 x_397 = TextureSamplerTexture.Sample(TextureSamplerSampler, (v_uv + vCurrOffset)); currSampledHeight = x_397.w; if ((currSampledHeight > currRayHeight)) { diff --git a/test/bug/tint/990.wgsl.expected.hlsl b/test/bug/tint/990.wgsl.expected.hlsl index 49ec198f30..80751f801d 100644 --- a/test/bug/tint/990.wgsl.expected.hlsl +++ b/test/bug/tint/990.wgsl.expected.hlsl @@ -6,7 +6,7 @@ void unused_entry_point() { void f() { int i = 0; { - [loop] for(; ; ) { + for(; ; ) { } } } diff --git a/test/layout/storage/mat2x2/stride/16.spvasm.expected.hlsl b/test/layout/storage/mat2x2/stride/16.spvasm.expected.hlsl index 18bd54dcf5..f9ad3adefb 100644 --- a/test/layout/storage/mat2x2/stride/16.spvasm.expected.hlsl +++ b/test/layout/storage/mat2x2/stride/16.spvasm.expected.hlsl @@ -18,7 +18,7 @@ typedef tint_padded_array_element tint_symbol_ret[2]; tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) { tint_padded_array_element arr_1[2] = (tint_padded_array_element[2])0; { - [loop] for(uint i = 0u; (i < 2u); i = (i + 1u)) { + for(uint i = 0u; (i < 2u); i = (i + 1u)) { arr_1[i].el = asfloat(buffer.Load2((offset + (i * 16u)))); } } @@ -28,7 +28,7 @@ tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) { void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, tint_padded_array_element value[2]) { tint_padded_array_element array[2] = value; { - [loop] for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { + for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { buffer.Store2((offset + (i_1 * 16u)), asuint(array[i_1].el)); } } diff --git a/test/loops/loop.wgsl.expected.hlsl b/test/loops/loop.wgsl.expected.hlsl index 8eed4b2b9c..44b45fd593 100644 --- a/test/loops/loop.wgsl.expected.hlsl +++ b/test/loops/loop.wgsl.expected.hlsl @@ -5,7 +5,7 @@ void unused_entry_point() { int f() { int i = 0; - [loop] while (true) { + while (true) { i = (i + 1); if ((i > 4)) { return i; diff --git a/test/loops/loop_with_continuing.wgsl.expected.hlsl b/test/loops/loop_with_continuing.wgsl.expected.hlsl index 440ef88364..0d57d1fc7f 100644 --- a/test/loops/loop_with_continuing.wgsl.expected.hlsl +++ b/test/loops/loop_with_continuing.wgsl.expected.hlsl @@ -5,7 +5,7 @@ void unused_entry_point() { int f() { int i = 0; - [loop] while (true) { + while (true) { if ((i > 4)) { return i; } diff --git a/test/loops/nested_loops.wgsl.expected.hlsl b/test/loops/nested_loops.wgsl.expected.hlsl index 5278d00256..793339e9b9 100644 --- a/test/loops/nested_loops.wgsl.expected.hlsl +++ b/test/loops/nested_loops.wgsl.expected.hlsl @@ -6,12 +6,12 @@ void unused_entry_point() { int f() { int i = 0; int j = 0; - [loop] while (true) { + while (true) { i = (i + 1); if ((i > 4)) { return 1; } - [loop] while (true) { + while (true) { j = (j + 1); if ((j > 4)) { return 2; diff --git a/test/loops/nested_loops_with_continuing.wgsl.expected.hlsl b/test/loops/nested_loops_with_continuing.wgsl.expected.hlsl index 8d795a846d..9ccdf02447 100644 --- a/test/loops/nested_loops_with_continuing.wgsl.expected.hlsl +++ b/test/loops/nested_loops_with_continuing.wgsl.expected.hlsl @@ -6,11 +6,11 @@ void unused_entry_point() { int f() { int i = 0; int j = 0; - [loop] while (true) { + while (true) { if ((i > 4)) { return 1; } - [loop] while (true) { + while (true) { if ((j > 4)) { return 2; } diff --git a/test/samples/compute_boids.wgsl.expected.hlsl b/test/samples/compute_boids.wgsl.expected.hlsl index b94e5e76b4..a19fa71a12 100644 --- a/test/samples/compute_boids.wgsl.expected.hlsl +++ b/test/samples/compute_boids.wgsl.expected.hlsl @@ -60,7 +60,7 @@ void comp_main_inner(uint3 gl_GlobalInvocationID) { float2 pos = float2(0.0f, 0.0f); float2 vel = float2(0.0f, 0.0f); { - [loop] for(uint i = 0u; (i < 5u); i = (i + 1u)) { + for(uint i = 0u; (i < 5u); i = (i + 1u)) { if ((i == index)) { continue; } diff --git a/test/statements/for/basic.wgsl.expected.hlsl b/test/statements/for/basic.wgsl.expected.hlsl index 223650392b..f215f4bbce 100644 --- a/test/statements/for/basic.wgsl.expected.hlsl +++ b/test/statements/for/basic.wgsl.expected.hlsl @@ -8,7 +8,7 @@ void some_loop_body() { void f() { { - [loop] for(int i = 0; (i < 5); i = (i + 1)) { + for(int i = 0; (i < 5); i = (i + 1)) { some_loop_body(); } } diff --git a/test/statements/for/complex.wgsl.expected.hlsl b/test/statements/for/complex.wgsl.expected.hlsl index ebc9720860..b48727f4e7 100644 --- a/test/statements/for/complex.wgsl.expected.hlsl +++ b/test/statements/for/complex.wgsl.expected.hlsl @@ -10,7 +10,7 @@ void f() { int j = 0; { int i = 0; - [loop] while (true) { + while (true) { bool tint_tmp = (i < 5); if (tint_tmp) { tint_tmp = (j < 10); diff --git a/test/statements/for/condition.wgsl.expected.hlsl b/test/statements/for/condition.wgsl.expected.hlsl index 96122e55e1..e4456e05cd 100644 --- a/test/statements/for/condition.wgsl.expected.hlsl +++ b/test/statements/for/condition.wgsl.expected.hlsl @@ -6,7 +6,7 @@ void unused_entry_point() { void f() { int i = 0; { - [loop] for(; (i < 4); ) { + for(; (i < 4); ) { } } } diff --git a/test/statements/for/continuing.wgsl.expected.hlsl b/test/statements/for/continuing.wgsl.expected.hlsl index 3e2e84783e..b3ec736bc6 100644 --- a/test/statements/for/continuing.wgsl.expected.hlsl +++ b/test/statements/for/continuing.wgsl.expected.hlsl @@ -6,7 +6,7 @@ void unused_entry_point() { void f() { int i = 0; { - [loop] for(; ; i = (i + 1)) { + for(; ; i = (i + 1)) { } } } diff --git a/test/statements/for/empty.wgsl.expected.hlsl b/test/statements/for/empty.wgsl.expected.hlsl index fe6edeee68..cd85e1a55f 100644 --- a/test/statements/for/empty.wgsl.expected.hlsl +++ b/test/statements/for/empty.wgsl.expected.hlsl @@ -5,7 +5,7 @@ void unused_entry_point() { void f() { { - [loop] for(; ; ) { + for(; ; ) { } } } diff --git a/test/statements/for/initializer.wgsl.expected.hlsl b/test/statements/for/initializer.wgsl.expected.hlsl index 57b4e10aed..e614afdf4b 100644 --- a/test/statements/for/initializer.wgsl.expected.hlsl +++ b/test/statements/for/initializer.wgsl.expected.hlsl @@ -5,7 +5,7 @@ void unused_entry_point() { void f() { { - [loop] for(int i = 0; ; ) { + for(int i = 0; ; ) { } } } diff --git a/test/statements/for/scoping.wgsl.expected.hlsl b/test/statements/for/scoping.wgsl.expected.hlsl index 65cfcf7994..143b1e363e 100644 --- a/test/statements/for/scoping.wgsl.expected.hlsl +++ b/test/statements/for/scoping.wgsl.expected.hlsl @@ -5,7 +5,7 @@ void unused_entry_point() { void f() { { - [loop] for(int must_not_collide = 0; ; ) { + for(int must_not_collide = 0; ; ) { } } int must_not_collide = 0; diff --git a/test/var/initialization/workgroup/array.wgsl.expected.hlsl b/test/var/initialization/workgroup/array.wgsl.expected.hlsl index 21c4cabbee..95222e99ed 100644 --- a/test/var/initialization/workgroup/array.wgsl.expected.hlsl +++ b/test/var/initialization/workgroup/array.wgsl.expected.hlsl @@ -6,7 +6,7 @@ struct tint_symbol_1 { void main_inner(uint local_invocation_index) { { - [loop] for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) { + for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) { const uint i = idx; v[i] = 0; }