diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc index f0e51a1923..c982ffe3e0 100644 --- a/src/writer/glsl/generator_impl.cc +++ b/src/writer/glsl/generator_impl.cc @@ -1165,9 +1165,9 @@ bool GeneratorImpl::EmitBarrierCall(std::ostream& out, // TODO(crbug.com/tint/661): Combine sequential barriers to a single // instruction. if (builtin->Type() == sem::BuiltinType::kWorkgroupBarrier) { - out << "memoryBarrierShared()"; + out << "barrier()"; } else if (builtin->Type() == sem::BuiltinType::kStorageBarrier) { - out << "memoryBarrierBuffer()"; + out << "{ barrier(); memoryBarrierBuffer(); }"; } else { TINT_UNREACHABLE(Writer, diagnostics_) << "unexpected barrier builtin type " << sem::str(builtin->Type()); diff --git a/src/writer/glsl/generator_impl_builtin_test.cc b/src/writer/glsl/generator_impl_builtin_test.cc index d88d38ad67..4d3b49d9c2 100644 --- a/src/writer/glsl/generator_impl_builtin_test.cc +++ b/src/writer/glsl/generator_impl_builtin_test.cc @@ -645,6 +645,8 @@ TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) { HasSubstr("f16tof32(uint2(tint_tmp & 0xffff, tint_tmp >> 16))")); } +#endif + TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) { Func("main", {}, ty.void_(), {CallStmt(Call("storageBarrier"))}, @@ -656,9 +658,12 @@ TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) { GeneratorImpl& gen = Build(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + EXPECT_EQ(gen.result(), R"(#version 310 es +precision mediump float; + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void main() { - DeviceMemoryBarrierWithGroupSync(); + { barrier(); memoryBarrierBuffer(); }; return; } )"); @@ -675,16 +680,17 @@ TEST_F(GlslGeneratorImplTest_Builtin, WorkgroupBarrier) { GeneratorImpl& gen = Build(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), R"(layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + EXPECT_EQ(gen.result(), R"(#version 310 es +precision mediump float; + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void main() { - GroupMemoryBarrierWithGroupSync(); + barrier(); return; } )"); } -#endif - TEST_F(GlslGeneratorImplTest_Builtin, DotI32) { Global("v", ty.vec3(), ast::StorageClass::kPrivate); WrapInFunction(CallStmt(Call("dot", "v", "v"))); diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.glsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.glsl index 30963db44d..f6a025948c 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.glsl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.glsl @@ -28,7 +28,7 @@ void f(uint local_invocation_index) { s.data[i] = 0; } } - memoryBarrierShared(); + barrier(); result.tint_symbol = s.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.glsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.glsl index dc7ae93c98..dfdf81a98d 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.glsl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.glsl @@ -28,7 +28,7 @@ void f(uint local_invocation_index) { s.data[i] = 0; } } - memoryBarrierShared(); + barrier(); s.data[ubo.dynamic_idx] = 1; result.tint_symbol = s.data[3]; } diff --git a/test/bug/tint/914.wgsl.expected.glsl b/test/bug/tint/914.wgsl.expected.glsl index 75fc66350d..268b480e77 100644 --- a/test/bug/tint/914.wgsl.expected.glsl +++ b/test/bug/tint/914.wgsl.expected.glsl @@ -71,7 +71,7 @@ void tint_symbol(uvec3 local_id, uvec3 global_id, uint local_invocation_index) { mm_Bsub[i][i_1] = 0.0f; } } - memoryBarrierShared(); + barrier(); uint tileRow = (local_id.y * RowPerThread); uint tileCol = (local_id.x * ColPerThread); uint globalRow = (global_id.y * RowPerThread); @@ -113,7 +113,7 @@ void tint_symbol(uvec3 local_id, uvec3 global_id, uint local_invocation_index) { } } } - memoryBarrierShared(); + barrier(); { for(uint k = 0u; (k < TileInner); k = (k + 1u)) { { @@ -134,7 +134,7 @@ void tint_symbol(uvec3 local_id, uvec3 global_id, uint local_invocation_index) { } } } - memoryBarrierShared(); + barrier(); } } { diff --git a/test/bug/tint/942.wgsl.expected.glsl b/test/bug/tint/942.wgsl.expected.glsl index 8e41450b79..b3dc10ad6e 100644 --- a/test/bug/tint/942.wgsl.expected.glsl +++ b/test/bug/tint/942.wgsl.expected.glsl @@ -32,7 +32,7 @@ void tint_symbol(uvec3 WorkGroupID, uvec3 LocalInvocationID, uint local_invocati tile[i_1][i_2] = vec3(0.0f, 0.0f, 0.0f); } } - memoryBarrierShared(); + barrier(); uint filterOffset = ((params.filterDim - 1u) / 2u); ivec2 dims = textureSize(inputTex_1, 0); ivec2 baseIndex = (ivec2(((WorkGroupID.xy * uvec2(params.blockDim, 4u)) + (LocalInvocationID.xy * uvec2(4u, 1u)))) - ivec2(int(filterOffset), 0)); @@ -49,7 +49,7 @@ void tint_symbol(uvec3 WorkGroupID, uvec3 LocalInvocationID, uint local_invocati } } } - memoryBarrierShared(); + barrier(); { for(uint r = 0u; (r < 4u); r = (r + 1u)) { { diff --git a/test/bug/tint/943.spvasm.expected.glsl b/test/bug/tint/943.spvasm.expected.glsl index 5ddf3e51ae..b33420339f 100644 --- a/test/bug/tint/943.spvasm.expected.glsl +++ b/test/bug/tint/943.spvasm.expected.glsl @@ -277,7 +277,7 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB } } } - memoryBarrierShared(); + barrier(); k = 0; { for(; (k < 64); k = (k + 1)) { @@ -309,7 +309,7 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB } } } - memoryBarrierShared(); + barrier(); } } innerRow_4 = 0; @@ -387,7 +387,7 @@ void tint_symbol_2(uvec3 tint_symbol_3, uvec3 tint_symbol_4, uint local_invocati mm_Asub[i][i_1] = 0.0f; } } - memoryBarrierShared(); + barrier(); tint_symbol = tint_symbol_3; tint_symbol_1 = tint_symbol_4; main_1(); diff --git a/test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl index 8a41180da5..bb7797f700 100644 --- a/test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl +++ b/test/builtins/gen/atomicAdd/794055.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicAdd_794055(); } diff --git a/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl index e172f7bd11..2bc498d96e 100644 --- a/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl +++ b/test/builtins/gen/atomicAdd/d5db1d.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicAdd_d5db1d(); } diff --git a/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl index eabffe0cf0..39cca89784 100644 --- a/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl +++ b/test/builtins/gen/atomicAnd/34edd3.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicAnd_34edd3(); } diff --git a/test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl index b95352050c..4acc0f3db9 100644 --- a/test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl +++ b/test/builtins/gen/atomicAnd/45a819.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicAnd_45a819(); } diff --git a/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl index bbe2a57d39..7794290292 100644 --- a/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl +++ b/test/builtins/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.glsl @@ -18,7 +18,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicCompareExchangeWeak_89ea3b(); } diff --git a/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl index 8bf8acb8db..8eee6286d3 100644 --- a/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl +++ b/test/builtins/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.glsl @@ -18,7 +18,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicCompareExchangeWeak_b2ab2c(); } diff --git a/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl index 2dfde42ec7..3547265ff3 100644 --- a/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl +++ b/test/builtins/gen/atomicExchange/0a5dca.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicExchange_0a5dca(); } diff --git a/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl index ddc73bf31b..5a981893ed 100644 --- a/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl +++ b/test/builtins/gen/atomicExchange/e114ba.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicExchange_e114ba(); } diff --git a/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl index f69415711c..3a11a14395 100644 --- a/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl +++ b/test/builtins/gen/atomicLoad/361bf1.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicLoad_361bf1(); } diff --git a/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl index 5623e5a65f..7bd9bb4127 100644 --- a/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl +++ b/test/builtins/gen/atomicLoad/afcc03.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicLoad_afcc03(); } diff --git a/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl index 9721ba0987..215658cfff 100644 --- a/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl +++ b/test/builtins/gen/atomicMax/a89cc3.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicMax_a89cc3(); } diff --git a/test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl index 02c3171730..672527161b 100644 --- a/test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl +++ b/test/builtins/gen/atomicMax/beccfc.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicMax_beccfc(); } diff --git a/test/builtins/gen/atomicMin/278235.wgsl.expected.glsl b/test/builtins/gen/atomicMin/278235.wgsl.expected.glsl index 4e84d71f03..b162c5a100 100644 --- a/test/builtins/gen/atomicMin/278235.wgsl.expected.glsl +++ b/test/builtins/gen/atomicMin/278235.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicMin_278235(); } diff --git a/test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl b/test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl index 6dfcb0d7ee..ae3960bb6c 100644 --- a/test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl +++ b/test/builtins/gen/atomicMin/69d383.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicMin_69d383(); } diff --git a/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl index 7e349a9777..57d9728077 100644 --- a/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl +++ b/test/builtins/gen/atomicOr/5e3d61.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicOr_5e3d61(); } diff --git a/test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl b/test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl index 5d831d1a98..79171ef4f1 100644 --- a/test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl +++ b/test/builtins/gen/atomicOr/d09248.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicOr_d09248(); } diff --git a/test/builtins/gen/atomicStore/726882.wgsl.expected.glsl b/test/builtins/gen/atomicStore/726882.wgsl.expected.glsl index 29be3dc1a4..3d30417bce 100644 --- a/test/builtins/gen/atomicStore/726882.wgsl.expected.glsl +++ b/test/builtins/gen/atomicStore/726882.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicStore_726882(); } diff --git a/test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl index d24fcba8fd..d152765475 100644 --- a/test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl +++ b/test/builtins/gen/atomicStore/8bea94.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicStore_8bea94(); } diff --git a/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl index 63ebf58314..e2f878a394 100644 --- a/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl +++ b/test/builtins/gen/atomicSub/0d26c2.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicSub_0d26c2(); } diff --git a/test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl b/test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl index 7c136f55ba..f47901fe1d 100644 --- a/test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl +++ b/test/builtins/gen/atomicSub/77883a.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicSub_77883a(); } diff --git a/test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl index 15b9972f0c..f39ea9e56e 100644 --- a/test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl +++ b/test/builtins/gen/atomicXor/75dc95.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0); } - memoryBarrierShared(); + barrier(); atomicXor_75dc95(); } diff --git a/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl index 6d3a6f79ed..ef6381486a 100644 --- a/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl +++ b/test/builtins/gen/atomicXor/c8e6be.wgsl.expected.glsl @@ -10,7 +10,7 @@ void compute_main(uint local_invocation_index) { { atomicExchange(arg_0, 0u); } - memoryBarrierShared(); + barrier(); atomicXor_c8e6be(); } diff --git a/test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl index 31a51a73d8..a354c9211d 100644 --- a/test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl +++ b/test/builtins/gen/storageBarrier/d87211.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void storageBarrier_d87211() { - memoryBarrierBuffer(); + { barrier(); memoryBarrierBuffer(); }; } void compute_main() { diff --git a/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl index 71ce5cb662..1355106f82 100644 --- a/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl +++ b/test/builtins/gen/workgroupBarrier/a17f7f.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void workgroupBarrier_a17f7f() { - memoryBarrierShared(); + barrier(); } void compute_main() { diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.glsl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.glsl index c601cc7709..9b99e9b080 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.glsl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.glsl @@ -6,7 +6,7 @@ void tint_symbol(uint local_invocation_index) { { i = 0; } - memoryBarrierShared(); + barrier(); i = 123; int use = (i + 1); } diff --git a/test/var/initialization/workgroup/array.wgsl.expected.glsl b/test/var/initialization/workgroup/array.wgsl.expected.glsl index adbf51ce7f..6e695f1576 100644 --- a/test/var/initialization/workgroup/array.wgsl.expected.glsl +++ b/test/var/initialization/workgroup/array.wgsl.expected.glsl @@ -9,7 +9,7 @@ void tint_symbol(uint local_invocation_index) { v[i] = 0; } } - memoryBarrierShared(); + barrier(); } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; diff --git a/test/var/initialization/workgroup/matrix.wgsl.expected.glsl b/test/var/initialization/workgroup/matrix.wgsl.expected.glsl index 0738874a13..7e1c8f2c21 100644 --- a/test/var/initialization/workgroup/matrix.wgsl.expected.glsl +++ b/test/var/initialization/workgroup/matrix.wgsl.expected.glsl @@ -6,7 +6,7 @@ void tint_symbol(uint local_invocation_index) { { v = mat2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); } - memoryBarrierShared(); + barrier(); } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.glsl b/test/var/initialization/workgroup/scalar.wgsl.expected.glsl index dc95a7de3f..b361c7f8b2 100644 --- a/test/var/initialization/workgroup/scalar.wgsl.expected.glsl +++ b/test/var/initialization/workgroup/scalar.wgsl.expected.glsl @@ -6,7 +6,7 @@ void tint_symbol(uint local_invocation_index) { { v = 0; } - memoryBarrierShared(); + barrier(); } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.glsl b/test/var/initialization/workgroup/struct.wgsl.expected.glsl index 87458fb9b6..dab558ae6c 100644 --- a/test/var/initialization/workgroup/struct.wgsl.expected.glsl +++ b/test/var/initialization/workgroup/struct.wgsl.expected.glsl @@ -12,7 +12,7 @@ void tint_symbol(uint local_invocation_index) { S tint_symbol_1 = S(0, 0.0f); v = tint_symbol_1; } - memoryBarrierShared(); + barrier(); } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.glsl b/test/var/initialization/workgroup/vector.wgsl.expected.glsl index 917de43cee..087b0e004b 100644 --- a/test/var/initialization/workgroup/vector.wgsl.expected.glsl +++ b/test/var/initialization/workgroup/vector.wgsl.expected.glsl @@ -6,7 +6,7 @@ void tint_symbol(uint local_invocation_index) { { v = ivec3(0, 0, 0); } - memoryBarrierShared(); + barrier(); } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; diff --git a/test/var/uses/many_workgroup_vars.wgsl.expected.glsl b/test/var/uses/many_workgroup_vars.wgsl.expected.glsl index 1ff7afe8c0..b719fa6ae5 100644 --- a/test/var/uses/many_workgroup_vars.wgsl.expected.glsl +++ b/test/var/uses/many_workgroup_vars.wgsl.expected.glsl @@ -204,7 +204,7 @@ void tint_symbol(uint idx) { m98 = mat2(0.0f, 0.0f, 0.0f, 0.0f); m99 = mat2(0.0f, 0.0f, 0.0f, 0.0f); } - memoryBarrierShared(); + barrier(); m00[0][0] = 1.0f; m01[0][0] = 1.0f; m02[0][0] = 1.0f; diff --git a/test/var/uses/workgroup.wgsl.expected.glsl b/test/var/uses/workgroup.wgsl.expected.glsl index 2918be4f09..084d9e29c2 100644 --- a/test/var/uses/workgroup.wgsl.expected.glsl +++ b/test/var/uses/workgroup.wgsl.expected.glsl @@ -10,7 +10,7 @@ void main1(uint local_invocation_index) { { a = 0; } - memoryBarrierShared(); + barrier(); a = 42; uses_a(); } @@ -32,7 +32,7 @@ void main2(uint local_invocation_index_1) { { b = 0; } - memoryBarrierShared(); + barrier(); b = 7; uses_b(); } @@ -75,7 +75,7 @@ void main3(uint local_invocation_index_2) { a = 0; b = 0; } - memoryBarrierShared(); + barrier(); outer(); no_uses(); } diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.glsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.glsl index bc6900e2b1..0320d9f33b 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.glsl @@ -40,7 +40,7 @@ void main_1() { break; } } - memoryBarrierShared(); + barrier(); } } if ((lid == 0)) { diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.glsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.glsl index a7ca19e76a..42be698473 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.glsl @@ -44,7 +44,7 @@ void main_1() { break; } } - memoryBarrierShared(); + barrier(); } } if ((lid == 0)) { diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.glsl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.glsl index 2c0ca1cc56..a2eeaa9ec1 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.glsl @@ -37,7 +37,7 @@ void main_1() { float x_13 = GLF_live2gl_FragCoord.x; if ((int(x_13) < 120)) { } else { - memoryBarrierShared(); + barrier(); } } } @@ -62,7 +62,7 @@ void main_1() { } float x_16 = GLF_live2gl_FragCoord.x; GLF_dead3x = x_16; - memoryBarrierShared(); + barrier(); } } x_12.x_compute_data[0] = 42u; diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.glsl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.glsl index e81d36cfd0..cfb7c4907b 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.glsl @@ -41,7 +41,7 @@ void main_1() { float x_13 = GLF_live2gl_FragCoord.x; if ((int(x_13) < 120)) { } else { - memoryBarrierShared(); + barrier(); } } } @@ -66,7 +66,7 @@ void main_1() { } float x_16 = GLF_live2gl_FragCoord.x; GLF_dead3x = x_16; - memoryBarrierShared(); + barrier(); } } x_12.x_compute_data[0] = 42u; diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.glsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.glsl index 0e215f4da0..cdeb375555 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.glsl @@ -70,7 +70,7 @@ void main_1() { float x_118 = x_10.injectionSwitch.x; float x_120 = x_10.injectionSwitch.y; if ((x_118 > x_120)) { - memoryBarrierShared(); + barrier(); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.glsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.glsl index 397b67ada5..a8f1f20676 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.glsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.glsl @@ -74,7 +74,7 @@ void main_1() { float x_118 = x_10.injectionSwitch.x; float x_120 = x_10.injectionSwitch.y; if ((x_118 > x_120)) { - memoryBarrierShared(); + barrier(); } } }