diff --git a/src/tint/reader/spirv/function_memory_test.cc b/src/tint/reader/spirv/function_memory_test.cc index 66979aea03..0ff9ba56eb 100644 --- a/src/tint/reader/spirv/function_memory_test.cc +++ b/src/tint/reader/spirv/function_memory_test.cc @@ -953,7 +953,9 @@ TEST_F(SpvParserMemoryTest, RemapStorageBuffer_TypesAndVarDeclarations) { EXPECT_THAT(module_str, HasSubstr(R"(type RTArr = @stride(4) array; struct S { + /* @offset(0) */ field0 : u32, + /* @offset(4) */ field1 : RTArr, } 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 be931a6815..75437926fa 100644 --- a/src/tint/reader/spirv/parser_impl_module_var_test.cc +++ b/src/tint/reader/spirv/parser_impl_module_var_test.cc @@ -1254,8 +1254,11 @@ TEST_F(SpvModuleScopeVarParserTest, StructMember_NonReadableDecoration_Dropped) EXPECT_THAT(module_str, HasSubstr(R"(type Arr = @stride(4) array; struct S { + /* @offset(0) */ field0 : u32, + /* @offset(4) */ field1 : f32, + /* @offset(8) */ field2 : Arr, } @@ -1286,6 +1289,7 @@ TEST_F(SpvModuleScopeVarParserTest, ColMajorDecoration_Dropped) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ field0 : mat3x2, } @@ -1316,6 +1320,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixStrideDecoration_Natural_Dropped) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ field0 : mat3x2, } @@ -1346,6 +1351,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixStrideDecoration) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ @stride(64) @internal(disable_validation__ignore_stride) field0 : mat3x2, } @@ -1399,7 +1405,9 @@ TEST_F(SpvModuleScopeVarParserTest, StorageBuffer_NonWritable_AllMembers) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ field0 : f32, + /* @offset(4) */ field1 : f32, } @@ -1428,7 +1436,9 @@ TEST_F(SpvModuleScopeVarParserTest, StorageBuffer_NonWritable_NotAllMembers) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ field0 : f32, + /* @offset(4) */ field1 : f32, } @@ -1459,7 +1469,9 @@ TEST_F(SpvModuleScopeVarParserTest, EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, HasSubstr(R"(struct S { + /* @offset(0) */ field0 : f32, + /* @offset(4) */ field1 : f32, } diff --git a/src/tint/transform/decompose_strided_matrix_test.cc b/src/tint/transform/decompose_strided_matrix_test.cc index bd202c95e7..e3ba4bb13a 100644 --- a/src/tint/transform/decompose_strided_matrix_test.cc +++ b/src/tint/transform/decompose_strided_matrix_test.cc @@ -90,6 +90,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix) { struct S { @size(16) padding : u32, + /* @offset(16) */ m : @stride(32) array, 2u>, } @@ -147,6 +148,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformColumn) { struct S { @size(16) padding : u32, + /* @offset(16) */ m : @stride(32) array, 2u>, } @@ -199,6 +201,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix_DefaultStride) { struct S { @size(16) padding : u32, + /* @offset(16u) */ @stride(8) @internal(disable_validation__ignore_stride) m : mat2x2, } @@ -253,6 +256,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadStorageMatrix) { struct S { @size(8) padding : u32, + /* @offset(8) */ m : @stride(32) array, 2u>, } @@ -311,6 +315,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadStorageColumn) { struct S { @size(16) padding : u32, + /* @offset(16) */ m : @stride(32) array, 2u>, } @@ -365,6 +370,7 @@ TEST_F(DecomposeStridedMatrixTest, WriteStorageMatrix) { struct S { @size(8) padding : u32, + /* @offset(8) */ m : @stride(32) array, 2u>, } @@ -422,6 +428,7 @@ TEST_F(DecomposeStridedMatrixTest, WriteStorageColumn) { struct S { @size(8) padding : u32, + /* @offset(8) */ m : @stride(32) array, 2u>, } @@ -487,6 +494,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadWriteViaPointerLets) { struct S { @size(8) padding : u32, + /* @offset(8) */ m : @stride(32) array, 2u>, } @@ -551,6 +559,7 @@ TEST_F(DecomposeStridedMatrixTest, ReadPrivateMatrix) { struct S { @size(8) padding : u32, + /* @offset(8u) */ @stride(32) @internal(disable_validation__ignore_stride) m : mat2x2, } @@ -605,6 +614,7 @@ TEST_F(DecomposeStridedMatrixTest, WritePrivateMatrix) { struct S { @size(8) padding : u32, + /* @offset(8u) */ @stride(32) @internal(disable_validation__ignore_stride) m : mat2x2, } diff --git a/src/tint/writer/wgsl/generator_impl.cc b/src/tint/writer/wgsl/generator_impl.cc index 6327c6c976..f701146347 100644 --- a/src/tint/writer/wgsl/generator_impl.cc +++ b/src/tint/writer/wgsl/generator_impl.cc @@ -623,7 +623,14 @@ bool GeneratorImpl::EmitStructType(const ast::Struct* str) { utils::Vector attributes_sanitized; attributes_sanitized.Reserve(mem->attributes.Length()); for (auto* attr : mem->attributes) { - if (!attr->Is()) { + if (attr->Is()) { + auto l = line(); + l << "/* "; + if (!EmitAttributes(l, utils::Vector{attr})) { + return false; + } + l << " */"; + } else { attributes_sanitized.Push(attr); } } @@ -792,6 +799,14 @@ bool GeneratorImpl::EmitAttributes(std::ostream& out, out << ")"; return true; }, + [&](const ast::StructMemberOffsetAttribute* offset) { + out << "offset("; + if (!EmitExpression(out, offset->expr)) { + return false; + } + out << ")"; + return true; + }, [&](const ast::StructMemberSizeAttribute* size) { out << "size("; if (!EmitExpression(out, size->expr)) { diff --git a/src/tint/writer/wgsl/generator_impl_type_test.cc b/src/tint/writer/wgsl/generator_impl_type_test.cc index 13c8411ffd..50bc7df403 100644 --- a/src/tint/writer/wgsl/generator_impl_type_test.cc +++ b/src/tint/writer/wgsl/generator_impl_type_test.cc @@ -188,9 +188,11 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructOffsetDecl) { EXPECT_EQ(gen.result(), R"(struct S { @size(8) padding : u32, + /* @offset(8) */ a : i32, @size(4) padding_1 : u32, + /* @offset(16) */ b : f32, } )"); @@ -209,9 +211,11 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructOffsetDecl_WithSymbolCollisions) { EXPECT_EQ(gen.result(), R"(struct S { @size(8) padding : u32, + /* @offset(8) */ tint_0_padding : i32, @size(4) padding_1 : u32, + /* @offset(16) */ tint_2_padding : f32, } )"); diff --git a/test/tint/array/strides.spvasm.expected.wgsl b/test/tint/array/strides.spvasm.expected.wgsl index 74fe15c627..aa59b2fb18 100644 --- a/test/tint/array/strides.spvasm.expected.wgsl +++ b/test/tint/array/strides.spvasm.expected.wgsl @@ -15,6 +15,7 @@ struct strided_arr_1 { type Arr_2 = array; struct S { + /* @offset(0) */ a : Arr_2, } diff --git a/test/tint/bug/tint/1061.spvasm.expected.wgsl b/test/tint/bug/tint/1061.spvasm.expected.wgsl index e7c252f831..3dcf16cd8b 100644 --- a/test/tint/bug/tint/1061.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1061.spvasm.expected.wgsl @@ -1,4 +1,5 @@ struct buf0 { + /* @offset(0) */ r : vec4, } diff --git a/test/tint/bug/tint/1088.spvasm.expected.wgsl b/test/tint/bug/tint/1088.spvasm.expected.wgsl index 74fb32d09b..54ce4f293c 100644 --- a/test/tint/bug/tint/1088.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1088.spvasm.expected.wgsl @@ -8,11 +8,15 @@ struct strided_arr { type Arr_1 = array; struct LeftOver { + /* @offset(0) */ worldViewProjection : mat4x4, + /* @offset(64) */ time : f32, @size(12) padding : u32, + /* @offset(80) */ test2 : Arr, + /* @offset(208) */ test : Arr_1, } diff --git a/test/tint/bug/tint/1520.spvasm.expected.wgsl b/test/tint/bug/tint/1520.spvasm.expected.wgsl index bc85a84adf..931944d3e6 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1520.spvasm.expected.wgsl @@ -1,11 +1,15 @@ struct UniformBuffer { @size(16) padding : u32, + /* @offset(16) */ unknownInput_S1_c0 : f32, @size(12) padding_1 : u32, + /* @offset(32) */ ucolorRed_S1_c0 : vec4, + /* @offset(48) */ ucolorGreen_S1_c0 : vec4, + /* @offset(64) */ umatrix_S1 : mat3x3, } diff --git a/test/tint/bug/tint/870.spvasm.expected.wgsl b/test/tint/bug/tint/870.spvasm.expected.wgsl index 1dfaaa072b..5e434ded7d 100644 --- a/test/tint/bug/tint/870.spvasm.expected.wgsl +++ b/test/tint/bug/tint/870.spvasm.expected.wgsl @@ -1,13 +1,18 @@ type Arr = array; struct sspp962805860buildInformationS { + /* @offset(0) */ footprint : vec4, + /* @offset(16) */ offset : vec4, + /* @offset(32) */ essence : i32, + /* @offset(36) */ orientation : Arr, } struct x_B4_BuildInformation { + /* @offset(0) */ passthru : sspp962805860buildInformationS, } diff --git a/test/tint/bug/tint/977.spvasm.expected.wgsl b/test/tint/bug/tint/977.spvasm.expected.wgsl index 7ec6a24547..984d555583 100644 --- a/test/tint/bug/tint/977.spvasm.expected.wgsl +++ b/test/tint/bug/tint/977.spvasm.expected.wgsl @@ -3,22 +3,28 @@ type RTArr = array; type RTArr_1 = array; struct ResultMatrix { + /* @offset(0) */ numbers : RTArr_1, } type RTArr_2 = array; struct FirstMatrix { + /* @offset(0) */ numbers : RTArr_1, } struct SecondMatrix { + /* @offset(0) */ numbers : RTArr_1, } struct Uniforms { + /* @offset(0) */ NAN : f32, + /* @offset(4) */ sizeA : i32, + /* @offset(8) */ sizeB : i32, } diff --git a/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.wgsl index de42f484ca..ef6735c8e4 100644 --- a/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.wgsl @@ -1,12 +1,18 @@ struct S_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : atomic, + /* @offset(8) */ y : u32, } struct S { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : u32, + /* @offset(8) */ y : u32, } diff --git a/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.wgsl index 20d066a906..c9a899df0c 100644 --- a/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.wgsl @@ -1,12 +1,18 @@ struct S_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : atomic, + /* @offset(8) */ b : atomic, } struct S { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : u32, + /* @offset(8) */ b : u32, } diff --git a/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.wgsl index 2d90f56850..ff3d543baf 100644 --- a/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.wgsl @@ -1,12 +1,18 @@ struct S_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : atomic, + /* @offset(8) */ y : u32, } struct S { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : u32, + /* @offset(8) */ y : u32, } diff --git a/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.wgsl index 7f3c3b3d60..e448d74aac 100644 --- a/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.wgsl @@ -1,42 +1,66 @@ struct S0_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : atomic, + /* @offset(8) */ y : i32, + /* @offset(12) */ z : i32, } struct S0 { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : u32, + /* @offset(8) */ y : i32, + /* @offset(12) */ z : i32, } struct S1_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : S0_atomic, + /* @offset(20) */ y : i32, + /* @offset(24) */ z : i32, } struct S1 { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : S0, + /* @offset(20) */ y : i32, + /* @offset(24) */ z : i32, } struct S2_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ y : i32, + /* @offset(8) */ z : i32, + /* @offset(12) */ a : S1_atomic, } struct S2 { + /* @offset(0) */ x : i32, + /* @offset(4) */ y : i32, + /* @offset(8) */ z : i32, + /* @offset(12) */ a : S1, } diff --git a/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.wgsl index f82a9ff493..09769cf369 100644 --- a/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.wgsl @@ -1,14 +1,20 @@ type Arr = array; struct S_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : array, 10u>, + /* @offset(44) */ y : u32, } struct S { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : Arr, + /* @offset(44) */ y : u32, } diff --git a/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.wgsl b/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.wgsl index 2d90f56850..ff3d543baf 100644 --- a/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.wgsl +++ b/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.wgsl @@ -1,12 +1,18 @@ struct S_atomic { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : atomic, + /* @offset(8) */ y : u32, } struct S { + /* @offset(0) */ x : i32, + /* @offset(4) */ a : u32, + /* @offset(8) */ y : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.wgsl index cfc64fbba6..13dd085365 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.wgsl index b5d5856764..c6e4f53ef2 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.wgsl index c76ec1b616..fa4790ba84 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.wgsl index 2f8f4591c5..a7c316a9bd 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl index cf8754d81a..fb78b80ab5 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl @@ -1,13 +1,17 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } struct x__atomic_compare_exchange_resulti32 { + /* @offset(0) */ old_value : i32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl index 4382a2338c..acb5674caf 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl @@ -1,13 +1,17 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } struct x__atomic_compare_exchange_resultu32 { + /* @offset(0) */ old_value : u32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl index 349dccfe6a..f85055d118 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl @@ -1,5 +1,7 @@ struct x__atomic_compare_exchange_resulti32 { + /* @offset(0) */ old_value : i32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl index 9c897f96b9..8855c3bee3 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl @@ -1,5 +1,7 @@ struct x__atomic_compare_exchange_resultu32 { + /* @offset(0) */ old_value : u32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.wgsl index 625f2c3a43..540d5734e0 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.wgsl index e80aa80578..86a83f3fd8 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.wgsl index b13dbfb432..713ca8a454 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.wgsl index b03da62e6d..076cf38f6e 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.wgsl index ae52315047..b6e2367dc6 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.wgsl index 9b20062782..8a7a1d5da0 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.wgsl index 667b13a4a2..b5b5a4bafc 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.wgsl index 62f9e6aec6..06d1469b7b 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.wgsl index bd4a06b184..42130b33c7 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.wgsl index 4f5bf4c62d..7a5c53a2ce 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.wgsl index eaf478bdaf..75f9038445 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.wgsl index 93b7fff109..aa3d11d5c5 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.wgsl index 3fde6a5333..8a692bd305 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.wgsl index 23ba9fe3a2..4761d22ad9 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.wgsl index 7992f58e4c..d73e8773f6 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.wgsl index 7fbc313591..a721751759 100644 --- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl index e048762b51..2ad75d2cee 100644 --- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl index d22b2aaa0f..933808f43e 100644 --- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl index cfc64fbba6..13dd085365 100644 --- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl index b5d5856764..c6e4f53ef2 100644 --- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.wgsl index ea83a0587c..483fc27d45 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.wgsl index 887a79869b..b0b8cfa8f6 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.wgsl index bdc601ddf2..1e387a0ab1 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.wgsl index 4bf4b48b8e..f8f4bcfd6d 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl index 84a3a29fd5..0345c33b2c 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.wgsl @@ -1,13 +1,17 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } struct x__atomic_compare_exchange_resulti32 { + /* @offset(0) */ old_value : i32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl index c3b661b632..9bf485881d 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.wgsl @@ -1,13 +1,17 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } struct x__atomic_compare_exchange_resultu32 { + /* @offset(0) */ old_value : u32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl index aaa949ea64..b091a13911 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.wgsl @@ -1,5 +1,7 @@ struct x__atomic_compare_exchange_resulti32 { + /* @offset(0) */ old_value : i32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl index 4a5fdf835d..be08380ef2 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.wgsl @@ -1,5 +1,7 @@ struct x__atomic_compare_exchange_resultu32 { + /* @offset(0) */ old_value : u32, + /* @offset(4) */ exchanged : bool, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.wgsl index e4dad2dce0..0362d77e15 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.wgsl index d7b8cb6d08..633c7a6027 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.wgsl index b13dbfb432..713ca8a454 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.wgsl index b03da62e6d..076cf38f6e 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.wgsl index eea496ef2d..effbc0eaac 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.wgsl index ea27f1d7c2..4bd55a5a1a 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.wgsl index 0ef454132d..138b81d2f9 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.wgsl index 3586e32234..e1815701ba 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.wgsl index 5c96c733a5..d361e4b56f 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.wgsl index 8dae20d3b5..c9c04e696d 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.wgsl index 9db31ae995..384aabe325 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.wgsl index 1095ccc7d9..b0023d5eda 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.wgsl index d47d88650f..cfb3a9c04c 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.wgsl index bd9a80c284..3b0b466533 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.wgsl index 4325da12d4..9f46aefc6c 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.wgsl index 2b3dd0d850..c1c18f99c8 100644 --- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl index 1e011b06f3..339117c748 100644 --- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl index f12b29eafc..a08ea2c622 100644 --- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl index da3a03b950..e19dbe31b4 100644 --- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : i32, } diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl index 61fbe492e0..3f0103eb5f 100644 --- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl +++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.wgsl @@ -1,8 +1,10 @@ struct SB_RW_atomic { + /* @offset(0) */ arg_0 : atomic, } struct SB_RW { + /* @offset(0) */ arg_0 : u32, } diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl index 488d5301a5..2a511a2b85 100644 --- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl +++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl @@ -4,6 +4,7 @@ struct strided_arr { } struct SSBO { + /* @offset(0) */ m : array, }