diff --git a/docs/origin-trial-changes.md b/docs/origin-trial-changes.md index a4acf8cec2..bc03ac616e 100644 --- a/docs/origin-trial-changes.md +++ b/docs/origin-trial-changes.md @@ -11,7 +11,8 @@ Obviously infinite loops (no condition, no break) are now a validation error. The following features have been deprecated and will be removed in M102: * The `[[block]]` attribute has been deprecated. [tint:1324](https://crbug.com/tint/1324) -* `elseif` has been replaced with `else if` [tint:1289](https://crbug.com/tint/1289) +* Attributes now use the `@decoration` syntax instead of the `[[decoration]]` syntax. [tint:1382](https://crbug.com/tint/1382) +* `elseif` has been replaced with `else if`. [tint:1289](https://crbug.com/tint/1289) ### New Features diff --git a/docs/spirv-input-output-variables.md b/docs/spirv-input-output-variables.md index d4b2553205..0f149e072c 100644 --- a/docs/spirv-input-output-variables.md +++ b/docs/spirv-input-output-variables.md @@ -85,8 +85,8 @@ through the copying and optimize the result. Current translation, through SPIR-V, SPIR-V reader, WGSL writer: ```groovy - [[location(0)]] var frag_colour : vec4; - [[location(0)]] var the_colour : vec4; + @location(0) var frag_colour : vec4; + @location(0) var the_colour : vec4; fn bar_() -> void { const x_14 : vec4 = the_colour; @@ -94,7 +94,7 @@ Current translation, through SPIR-V, SPIR-V reader, WGSL writer: return; } - [[stage(fragment)]] + @stage(fragment) fn main() -> void { bar_(); return; @@ -123,14 +123,14 @@ Proposed translation, through SPIR-V, SPIR-V reader, WGSL writer: // Declare a structure type to collect the return values. struct main_result_type { - [[location(0)]] frag_color : vec4; + @location(0) frag_color : vec4; }; - [[stage(fragment)]] + @stage(fragment) fn main( // 'in' variables are entry point parameters - [[location(0)]] the_color_arg : vec4 + @location(0) the_color_arg : vec4 ) -> main_result_type { diff --git a/docs/translations.md b/docs/translations.md index d7b27132fc..b22ed208b5 100644 --- a/docs/translations.md +++ b/docs/translations.md @@ -188,4 +188,4 @@ static const = WGSL_SPEC_CONSTANT_ ``` ## MSL -`[[function_constant()]]` +`@function_constant()` diff --git a/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc b/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc index afc4cedd47..707b15a898 100644 --- a/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc +++ b/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc @@ -287,13 +287,12 @@ TEST(ReplaceIdentifierTest, NotApplicable5) { // Can't replace `a` with `b` since the latter has a wrong access mode // (`read` for uniform storage class). std::string shader = R"( -[[block]] struct S { a: i32; }; var a: S; -[[group(1), binding(1)]] var b: S; +@group(1) @binding(1) var b: S; fn f() { *&a = S(4); } @@ -323,13 +322,12 @@ fn f() { TEST(ReplaceIdentifierTest, NotApplicable6) { // Can't replace `ptr_b` with `a` since the latter is not a pointer. std::string shader = R"( -[[block]] struct S { a: i32; }; var a: S; -[[group(1), binding(1)]] var b: S; +@group(1) @binding(1) var b: S; fn f() { let ptr_b = &b; *&a = *ptr_b; @@ -360,14 +358,13 @@ TEST(ReplaceIdentifierTest, NotApplicable8) { // Can't replace `ptr_b` with `c` since the latter has a wrong access mode and // storage class. std::string shader = R"( -[[block]] struct S { a: i32; }; var a: S; -[[group(1), binding(1)]] var b: S; -[[group(1), binding(2)]] var c: S; +@group(1) @binding(1) var b: S; +@group(1) @binding(2) var c: S; fn f() { let ptr_b = &b; *&a = *ptr_b; @@ -397,14 +394,13 @@ fn f() { TEST(ReplaceIdentifierTest, NotApplicable9) { // Can't replace `b` with `e` since the latter is not a reference. std::string shader = R"( -[[block]] struct S { a: i32; }; var a: S; let e = 3; -[[group(1), binding(1)]] var b: S; +@group(1) @binding(1) var b: S; fn f() { *&a = *&b; } @@ -434,14 +430,13 @@ fn f() { TEST(ReplaceIdentifierTest, NotApplicable10) { // Can't replace `b` with `e` since the latter has a wrong access mode. std::string shader = R"( -[[block]] struct S { a: i32; }; var a: S; -[[group(0), binding(0)]] var e: S; -[[group(1), binding(1)]] var b: S; +@group(0) @binding(0) var e: S; +@group(1) @binding(1) var b: S; fn f() { *&a = *&b; } diff --git a/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc b/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc index bd56e0fe3e..e5f175b321 100644 --- a/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc +++ b/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc @@ -198,16 +198,16 @@ TEST(GetIdentifierTest, GetIdentifierTest1) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f();" return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() {" var foo: f32 = 0.0; clamp_0acf8f(); @@ -219,13 +219,13 @@ TEST(GetIdentifierTest, GetIdentifierTest1) { std::vector> ground_truth = { std::make_pair(3, 12), std::make_pair(28, 3), std::make_pair(37, 4), std::make_pair(49, 5), std::make_pair(60, 3), std::make_pair(68, 4), - std::make_pair(81, 4), std::make_pair(111, 5), std::make_pair(133, 2), - std::make_pair(143, 4), std::make_pair(155, 7), std::make_pair(175, 4), - std::make_pair(196, 12), std::make_pair(222, 6), std::make_pair(234, 3), - std::make_pair(258, 5), std::make_pair(282, 2), std::make_pair(294, 4), - std::make_pair(311, 12), std::make_pair(343, 5), std::make_pair(359, 14), - std::make_pair(385, 2), std::make_pair(396, 4), std::make_pair(414, 3), - std::make_pair(427, 3), std::make_pair(432, 3), std::make_pair(451, 12)}; + std::make_pair(81, 4), std::make_pair(110, 5), std::make_pair(130, 2), + std::make_pair(140, 4), std::make_pair(151, 7), std::make_pair(169, 4), + std::make_pair(190, 12), std::make_pair(216, 6), std::make_pair(228, 3), + std::make_pair(251, 5), std::make_pair(273, 2), std::make_pair(285, 4), + std::make_pair(302, 12), std::make_pair(333, 5), std::make_pair(349, 14), + std::make_pair(373, 2), std::make_pair(384, 4), std::make_pair(402, 3), + std::make_pair(415, 3), std::make_pair(420, 3), std::make_pair(439, 12)}; ASSERT_EQ(ground_truth, identifiers_pos); } @@ -234,18 +234,18 @@ TEST(TestGetLiteralsValues, TestGetLiteralsValues1) { std::string wgsl_code = R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()); - } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + } + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; @@ -277,17 +277,17 @@ TEST(InsertReturnTest, FindClosingBrace) { var res: vec2 = clamp(vec2(), vec2(), vec2()); } } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; @@ -323,17 +323,17 @@ TEST(InsertReturnTest, FindClosingBraceFailing) { var res: vec2 = clamp(vec2(), vec2(), vec2()); } } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; @@ -362,17 +362,17 @@ TEST(TestInsertReturn, TestInsertReturn1) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; @@ -395,17 +395,17 @@ TEST(TestInsertReturn, TestInsertReturn1) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2());return true; } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; @@ -422,23 +422,23 @@ TEST(TestInsertReturn, TestFunctionPositions) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; clamp_0acf8f(); } - fn vert_main() -> [[builtin(position)]] vec4 { + fn vert_main() -> @builtin(position) vec4 { clamp_0acf8f(); var foo_1: i32 = 3; return vec4(); @@ -447,7 +447,7 @@ TEST(TestInsertReturn, TestFunctionPositions) { var foo_3 : i32 = -20;)"; std::vector function_positions = GetFunctionBodyPositions(wgsl_code); - std::vector expected_positions = {193, 622}; + std::vector expected_positions = {187, 607}; ASSERT_EQ(expected_positions, function_positions); } @@ -456,23 +456,23 @@ TEST(TestInsertReturn, TestMissingSemicolon) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()) } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f() var foo_1: i32 = 3 return vec4() } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; clamp_0acf8f(); } - fn vert_main() -> [[builtin(position)]] vec4 { + fn vert_main() -> @builtin(position) vec4 { clamp_0acf8f() var foo_1: i32 = 3 return vec4() @@ -489,23 +489,23 @@ TEST(TestInsertReturn, TestMissingSemicolon) { R"(fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()) } - [[stage(vertex)]] - fn vertex_main() -> [[builtin(position)]] vec4 { + @stage(vertex) + fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f() var foo_1: i32 = 3 return vec4() } - [[stage(fragment)]] + @stage(fragment) fn fragment_main() { clamp_0acf8f(); } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn compute_main() { var foo: f32 = 0.0; var foo_2: i32 = 10; clamp_0acf8f(); } - fn vert_main() -> [[builtin(position)]] vec4 { + fn vert_main() -> @builtin(position) vec4 { clamp_0acf8f() var foo_1: i32 = 3 return vec4() diff --git a/src/ast/array.cc b/src/ast/array.cc index e8339f848b..a620dd0662 100644 --- a/src/ast/array.cc +++ b/src/ast/array.cc @@ -54,7 +54,7 @@ std::string Array::FriendlyName(const SymbolTable& symbols) const { std::ostringstream out; for (auto* deco : decorations) { if (auto* stride = deco->As()) { - out << "[[stride(" << stride->stride << ")]] "; + out << "@stride(" << stride->stride << ") "; } } out << "array<" << type->FriendlyName(symbols); diff --git a/src/ast/array_test.cc b/src/ast/array_test.cc index 3ada2c79a1..5a7f02c535 100644 --- a/src/ast/array_test.cc +++ b/src/ast/array_test.cc @@ -63,7 +63,7 @@ TEST_F(AstArrayTest, FriendlyName_WithStride) { auto* i32 = create(); auto* arr = create(i32, Expr(5), DecorationList{create(32)}); - EXPECT_EQ(arr->FriendlyName(Symbols()), "[[stride(32)]] array"); + EXPECT_EQ(arr->FriendlyName(Symbols()), "@stride(32) array"); } } // namespace diff --git a/src/ast/disable_validation_decoration.h b/src/ast/disable_validation_decoration.h index 099a669cfe..5eea9bfe2a 100644 --- a/src/ast/disable_validation_decoration.h +++ b/src/ast/disable_validation_decoration.h @@ -65,7 +65,7 @@ class DisableValidationDecoration ~DisableValidationDecoration() override; /// @return a short description of the internal decoration which will be - /// displayed in WGSL as `[[internal()]]` (but is not parsable). + /// displayed in WGSL as `@internal()` (but is not parsable). std::string InternalName() const override; /// Performs a deep clone of this object using the CloneContext `ctx`. diff --git a/src/ast/internal_decoration.h b/src/ast/internal_decoration.h index eb0b814423..50f920c98b 100644 --- a/src/ast/internal_decoration.h +++ b/src/ast/internal_decoration.h @@ -35,7 +35,7 @@ class InternalDecoration : public Castable { ~InternalDecoration() override; /// @return a short description of the internal decoration which will be - /// displayed in WGSL as `[[internal()]]` (but is not parsable). + /// displayed in WGSL as `@internal()` (but is not parsable). virtual std::string InternalName() const = 0; /// @returns the WGSL name for the decoration diff --git a/src/ast/module_clone_test.cc b/src/ast/module_clone_test.cc index b2415dc183..29e98916e4 100644 --- a/src/ast/module_clone_test.cc +++ b/src/ast/module_clone_test.cc @@ -28,13 +28,13 @@ TEST(ModuleCloneTest, Clone) { // See also fuzzers/tint_ast_clone_fuzzer.cc for further coverage of cloning. Source::File file("test.wgsl", R"([[block]] struct S0 { - [[size(4)]] + @size(4) m0 : u32; m1 : array; }; [[block]] struct S1 { - [[size(4)]] + @size(4) m0 : u32; m1 : array; }; @@ -42,21 +42,21 @@ struct S0 { let c0 : i32 = 10; let c1 : bool = true; -type t0 = [[stride(16)]] array>; +type t0 = @stride(16) array>; type t1 = array>; var g0 : u32 = 20u; var g1 : f32 = 123.0; -[[group(0), binding(0)]] var g2 : texture_2d; -[[group(1), binding(0)]] var g3 : texture_depth_2d; -[[group(2), binding(0)]] var g4 : texture_storage_2d; -[[group(3), binding(0)]] var g5 : texture_depth_cube_array; -[[group(4), binding(0)]] var g6 : texture_external; +@group(0) @binding(0) var g2 : texture_2d; +@group(1) @binding(0) var g3 : texture_depth_2d; +@group(2) @binding(0) var g4 : texture_storage_2d; +@group(3) @binding(0) var g5 : texture_depth_cube_array; +@group(4) @binding(0) var g6 : texture_external; var g7 : vec3; -[[group(0), binding(1)]] var g8 : S0; -[[group(1), binding(1)]] var g9 : S0; -[[group(2), binding(1)]] var g10 : S0; +@group(0) @binding(1) var g8 : S0; +@group(1) @binding(1) var g9 : S0; +@group(2) @binding(1) var g10 : S0; fn f0(p0 : bool) -> f32 { if (p0) { @@ -101,7 +101,7 @@ fn f1(p0 : f32, p1 : i32) -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn main() { f1(1.0, 2); } diff --git a/src/ast/struct_member_offset_decoration.h b/src/ast/struct_member_offset_decoration.h index 8c6f3ac695..da1a661024 100644 --- a/src/ast/struct_member_offset_decoration.h +++ b/src/ast/struct_member_offset_decoration.h @@ -23,14 +23,14 @@ namespace tint { namespace ast { /// A struct member offset decoration -/// @note The WGSL spec removed the `[[offset(n)]]` decoration for `[[size(n)]]` -/// and `[[align(n)]]` in https://github.com/gpuweb/gpuweb/pull/1447. However +/// @note The WGSL spec removed the `@offset(n)` decoration for `@size(n)` +/// and `@align(n)` in https://github.com/gpuweb/gpuweb/pull/1447. However /// this decoration is kept because the SPIR-V reader has to deal with absolute /// offsets, and transforming these to size / align is complex and can be done /// in a number of ways. The Resolver is responsible for consuming the size and /// align decorations and transforming these into absolute offsets. It is -/// trivial for the Resolver to handle `[[offset(n)]]` or `[[size(n)]]` / -/// `[[align(n)]]` decorations, so this is what we do, keeping all the layout +/// trivial for the Resolver to handle `@offset(n)` or `@size(n)` / +/// `@align(n)` decorations, so this is what we do, keeping all the layout /// logic in one place. class StructMemberOffsetDecoration : public Castable { diff --git a/src/inspector/inspector_test.cc b/src/inspector/inspector_test.cc index 1d237f80a0..713887b00d 100644 --- a/src/inspector/inspector_test.cc +++ b/src/inspector/inspector_test.cc @@ -2726,7 +2726,7 @@ TEST_F(InspectorGetExternalTextureResourceBindingsTest, Simple) { TEST_F(InspectorGetSamplerTextureUsesTest, None) { std::string shader = R"( -[[stage(fragment)]] +@stage(fragment) fn main() { })"; @@ -2739,12 +2739,12 @@ fn main() { TEST_F(InspectorGetSamplerTextureUsesTest, Simple) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return textureSample(myTexture, mySampler, fragUV) * fragPosition; })"; @@ -2762,12 +2762,12 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, UnknownEntryPoint) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return textureSample(myTexture, mySampler, fragUV) * fragPosition; })"; @@ -2778,12 +2778,12 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, MultipleCalls) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return textureSample(myTexture, mySampler, fragUV) * fragPosition; })"; @@ -2799,16 +2799,16 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, BothIndirect) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(t: texture_2d, s: sampler, uv: vec2) -> vec4 { return textureSample(t, s, uv); } -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return doSample(myTexture, mySampler, fragUV) * fragPosition; })"; @@ -2826,16 +2826,16 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, SamplerIndirect) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(s: sampler, uv: vec2) -> vec4 { return textureSample(myTexture, s, uv); } -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return doSample(mySampler, fragUV) * fragPosition; })"; @@ -2853,16 +2853,16 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, TextureIndirect) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(t: texture_2d, uv: vec2) -> vec4 { return textureSample(t, mySampler, uv); } -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return doSample(myTexture, fragUV) * fragPosition; })"; @@ -2880,16 +2880,16 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, NeitherIndirect) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(uv: vec2) -> vec4 { return textureSample(myTexture, mySampler, uv); } -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return doSample(fragUV) * fragPosition; })"; @@ -2907,8 +2907,8 @@ fn main([[location(0)]] fragUV: vec2, TEST_F(InspectorGetSamplerTextureUsesTest, Complex) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(t: texture_2d, s: sampler, uv: vec2) -> vec4 { @@ -2927,21 +2927,21 @@ fn Z(t: texture_2d, s: sampler, uv: vec2) -> vec4 { return X(t, s, uv) + Y(t, s, uv); } -[[stage(fragment)]] -fn via_call([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn via_call(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return Z(myTexture, mySampler, fragUV) * fragPosition; } -[[stage(fragment)]] -fn via_ptr([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn via_ptr(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return textureSample(myTexture, mySampler, fragUV) + fragPosition; } -[[stage(fragment)]] -fn direct([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn direct(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return textureSample(myTexture, mySampler, fragUV) + fragPosition; })"; @@ -3075,16 +3075,16 @@ TEST_F(InspectorGetWorkgroupStorageSizeTest, StructAlignment) { // ::GetSamplerTextureUses was called. TEST_F(InspectorRegressionTest, tint967) { std::string shader = R"( -[[group(0), binding(1)]] var mySampler: sampler; -[[group(0), binding(2)]] var myTexture: texture_2d; +@group(0) @binding(1) var mySampler: sampler; +@group(0) @binding(2) var myTexture: texture_2d; fn doSample(t: texture_2d, s: sampler, uv: vec2) -> vec4 { return textureSample(t, s, uv); } -[[stage(fragment)]] -fn main([[location(0)]] fragUV: vec2, - [[location(1)]] fragPosition: vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) fragUV: vec2, + @location(1) fragPosition: vec4) -> @location(0) vec4 { return doSample(myTexture, mySampler, fragUV) * fragPosition; })"; diff --git a/src/reader/spirv/function_call_test.cc b/src/reader/spirv/function_call_test.cc index c3efe3f71b..1626fc89ed 100644 --- a/src/reader/spirv/function_call_test.cc +++ b/src/reader/spirv/function_call_test.cc @@ -61,7 +61,7 @@ fn x_100_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn x_100() { x_100_1(); } @@ -188,7 +188,7 @@ fn x_100_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn x_100() { x_100_1(); } diff --git a/src/reader/spirv/function_memory_test.cc b/src/reader/spirv/function_memory_test.cc index 189fdbe15c..95265869f8 100644 --- a/src/reader/spirv/function_memory_test.cc +++ b/src/reader/spirv/function_memory_test.cc @@ -858,7 +858,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } @@ -899,7 +899,7 @@ OpExecutionMode %main OriginUpperLeft return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } @@ -950,14 +950,14 @@ TEST_F(SpvParserMemoryTest, RemapStorageBuffer_TypesAndVarDeclarations) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly << p->error(); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr(R"(type RTArr = [[stride(4)]] array; + EXPECT_THAT(module_str, HasSubstr(R"(type RTArr = @stride(4) array; struct S { field0 : u32; field1 : RTArr; } -[[group(0), binding(0)]] var myvar : S; +@group(0) @binding(0) var myvar : S; )")); } diff --git a/src/reader/spirv/function_var_test.cc b/src/reader/spirv/function_var_test.cc index 9e09f66a3a..eb1d179187 100644 --- a/src/reader/spirv/function_var_test.cc +++ b/src/reader/spirv/function_var_test.cc @@ -338,9 +338,8 @@ TEST_F(SpvParserFunctionVarTest, EmitFunctionVariables_ArrayInitializer_Null) { EXPECT_TRUE(fe.EmitFunctionVariables()); auto ast_body = fe.ast_body(); - EXPECT_THAT( - test::ToString(p->program(), ast_body), - HasSubstr("var x_200 : array = array();")); + EXPECT_THAT(test::ToString(p->program(), ast_body), + HasSubstr("var x_200 : array = array();")); } TEST_F(SpvParserFunctionVarTest, @@ -368,7 +367,7 @@ TEST_F(SpvParserFunctionVarTest, auto ast_body = fe.ast_body(); EXPECT_THAT(test::ToString(p->program(), ast_body), - HasSubstr("var x_200 : Arr = [[stride(16)]] array();")); + HasSubstr("var x_200 : Arr = @stride(16) array();")); } TEST_F(SpvParserFunctionVarTest, EmitFunctionVariables_StructInitializer) { diff --git a/src/reader/spirv/parser_impl_function_decl_test.cc b/src/reader/spirv/parser_impl_function_decl_test.cc index b3eecc1690..925883d2a2 100644 --- a/src/reader/spirv/parser_impl_function_decl_test.cc +++ b/src/reader/spirv/parser_impl_function_decl_test.cc @@ -124,13 +124,13 @@ OpFunctionEnd)"; const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } )")) << program_ast; EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { )")); } @@ -148,7 +148,7 @@ TEST_F(SpvParserTest, EmitFunctions_Function_EntryPoint_Fragment) { Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(fragment)]] +@stage(fragment) fn main() { )")); } @@ -166,7 +166,7 @@ TEST_F(SpvParserTest, EmitFunctions_Function_EntryPoint_GLCompute) { Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { )")); } @@ -186,11 +186,11 @@ OpExecutionMode %main OriginUpperLeft Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(fragment)]] +@stage(fragment) fn first_shader() { )")); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(fragment)]] +@stage(fragment) fn second_shader() { )")); } @@ -213,7 +213,7 @@ OpFunctionEnd)"; Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(2, 4, 8)]] +@stage(compute) @workgroup_size(2, 4, 8) fn comp_main() { )")) << program_ast; } @@ -239,7 +239,7 @@ OpFunctionEnd)"; Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(3, 5, 7)]] +@stage(compute) @workgroup_size(3, 5, 7) fn comp_main() { )")) << program_ast; } @@ -270,7 +270,7 @@ OpFunctionEnd)"; Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(3, 5, 7)]] +@stage(compute) @workgroup_size(3, 5, 7) fn comp_main() { )")) << program_ast; } @@ -300,7 +300,7 @@ OpFunctionEnd)"; Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(3, 5, 7)]] +@stage(compute) @workgroup_size(3, 5, 7) fn comp_main() { )")) << program_ast; } @@ -334,7 +334,7 @@ OpFunctionEnd)"; Program program = p->program(); const auto program_ast = test::ToString(program); EXPECT_THAT(program_ast, HasSubstr(R"( -[[stage(compute), workgroup_size(3, 5, 7)]] +@stage(compute) @workgroup_size(3, 5, 7) fn comp_main() { )")) << program_ast; } diff --git a/src/reader/spirv/parser_impl_handle_test.cc b/src/reader/spirv/parser_impl_handle_test.cc index a5f0cba78a..2e08b303a1 100644 --- a/src/reader/spirv/parser_impl_handle_test.cc +++ b/src/reader/spirv/parser_impl_handle_test.cc @@ -1254,7 +1254,7 @@ INSTANTIATE_TEST_SUITE_P( %ptr = OpTypePointer UniformConstant %sampler %10 = OpVariable %ptr UniformConstant )", - R"([[group(0), binding(0)]] var x_10 : sampler;)"})); + R"(@group(0) @binding(0) var x_10 : sampler;)"})); INSTANTIATE_TEST_SUITE_P( Images, @@ -1265,7 +1265,7 @@ INSTANTIATE_TEST_SUITE_P( "", R"( %10 = OpVariable %ptr_f_texture_1d UniformConstant )", - R"([[group(0), binding(0)]] var x_10 : texture_1d;)"}, + R"(@group(0) @binding(0) var x_10 : texture_1d;)"}, DeclUnderspecifiedHandleCase{ R"( OpDecorate %10 NonWritable @@ -1273,7 +1273,7 @@ INSTANTIATE_TEST_SUITE_P( R"( %10 = OpVariable %ptr_f_storage_1d UniformConstant )", - R"([[group(0), binding(0)]] var x_10 : texture_1d;)"}, + R"(@group(0) @binding(0) var x_10 : texture_1d;)"}, DeclUnderspecifiedHandleCase{ R"( OpDecorate %10 NonReadable @@ -1281,7 +1281,7 @@ INSTANTIATE_TEST_SUITE_P( R"( %10 = OpVariable %ptr_f_storage_1d UniformConstant )", - R"([[group(0), binding(0)]] var x_10 : texture_storage_1d;)"})); + R"(@group(0) @binding(0) var x_10 : texture_storage_1d;)"})); // Test handle declaration or error, when there is an image access. @@ -1405,8 +1405,7 @@ INSTANTIATE_TEST_SUITE_P( {"%float 1D 0 1 1 1 Unknown", "%result = OpImageQuerySamples %uint %im", "WGSL arrayed textures must be 2d_array or cube_array: ", ""}, {"%float 2D 0 0 1 1 Unknown", "%result = OpImageQuerySamples %uint %im", - "", - "[[group(2), binding(1)]] var x_20 : texture_multisampled_2d;"}, + "", "@group(2) @binding(1) var x_20 : texture_multisampled_2d;"}, {"%float 2D 0 1 1 1 Unknown", "%result = OpImageQuerySamples %uint %im", "WGSL multisampled textures must be 2d and non-arrayed: ", ""}, {"%float 3D 0 0 1 1 Unknown", "%result = OpImageQuerySamples %uint %im", @@ -1560,36 +1559,36 @@ INSTANTIATE_TEST_SUITE_P( ImageAccessCase{"%float 2D 0 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureGather(1, x_20, x_10, coords12)"}, // OpImageGather 2D ConstOffset signed ImageAccessCase{ "%float 2D 0 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureGather(1, x_20, x_10, coords12, vec2(3, 4))"}, // OpImageGather 2D ConstOffset unsigned ImageAccessCase{"%float 2D 0 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1 ConstOffset " "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureGather(1, x_20, x_10, coords12, " "vec2(vec2(3u, 4u)))"}, // OpImageGather 2D Array ImageAccessCase{"%float 2D 0 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", "textureGather(1, x_20, x_10, coords123.xy, " "i32(round(coords123.z)))"}, // OpImageGather 2D Array ConstOffset signed @@ -1597,9 +1596,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", "textureGather(1, x_20, x_10, coords123.xy, " "i32(round(coords123.z)), vec2(3, 4))"}, // OpImageGather 2D Array ConstOffset unsigned @@ -1607,9 +1606,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1 ConstOffset " "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", "textureGather(1, x_20, x_10, coords123.xy, " "i32(round(coords123.z)), " "vec2(vec2(3u, 4u)))"}, @@ -1617,53 +1616,53 @@ INSTANTIATE_TEST_SUITE_P( ImageAccessCase{"%float Cube 0 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_cube;)", +@group(2) @binding(1) var x_20 : texture_cube;)", "textureGather(1, x_20, x_10, coords123)"}, // OpImageGather Cube Array ImageAccessCase{"%float Cube 0 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords1234 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_cube_array;)", +@group(2) @binding(1) var x_20 : texture_cube_array;)", "textureGather(1, x_20, x_10, coords1234.xyz, " "i32(round(coords1234.w)))"}, // OpImageGather 2DDepth ImageAccessCase{"%float 2D 1 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGather(x_20, x_10, coords12)"}, // OpImageGather 2DDepth ConstOffset signed ImageAccessCase{ "%float 2D 1 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGather(x_20, x_10, coords12, vec2(3, 4))"}, // OpImageGather 2DDepth ConstOffset unsigned ImageAccessCase{"%float 2D 1 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords12 %int_1 ConstOffset " "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGather(x_20, x_10, coords12, " "vec2(vec2(3u, 4u)))"}, // OpImageGather 2DDepth Array ImageAccessCase{"%float 2D 1 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", "textureGather(x_20, x_10, coords123.xy, " "i32(round(coords123.z)))"}, // OpImageGather 2DDepth Array ConstOffset signed @@ -1671,9 +1670,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", "textureGather(x_20, x_10, coords123.xy, " "i32(round(coords123.z)), vec2(3, 4))"}, // OpImageGather 2DDepth Array ConstOffset unsigned @@ -1681,9 +1680,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1 ConstOffset " "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", "textureGather(x_20, x_10, coords123.xy, " "i32(round(coords123.z)), " "vec2(vec2(3u, 4u)))"}, @@ -1691,17 +1690,17 @@ INSTANTIATE_TEST_SUITE_P( ImageAccessCase{"%float Cube 1 0 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords123 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_cube;)", +@group(2) @binding(1) var x_20 : texture_depth_cube;)", "textureGather(x_20, x_10, coords123)"}, // OpImageGather DepthCube Array ImageAccessCase{"%float Cube 1 1 0 1 Unknown", "%result = OpImageGather " "%v4float %sampled_image %coords1234 %int_1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_cube_array;)", +@group(2) @binding(1) var x_20 : texture_depth_cube_array;)", "textureGather(x_20, x_10, coords1234.xyz, " "i32(round(coords1234.w)))"}})); @@ -1714,18 +1713,18 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageDrefGather " "%v4float %sampled_image %coords12 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGatherCompare(x_20, x_10, coords12, 0.200000003)"}, // OpImageDrefGather 2DDepth ConstOffset signed ImageAccessCase{ "%float 2D 1 0 0 1 Unknown", "%result = OpImageDrefGather " "%v4float %sampled_image %coords12 %depth ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGatherCompare(x_20, x_10, coords12, 0.200000003, " "vec2(3, 4))"}, // OpImageDrefGather 2DDepth ConstOffset unsigned @@ -1734,62 +1733,59 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageDrefGather " "%v4float %sampled_image %coords12 %depth ConstOffset " "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d;)", +@group(2) @binding(1) var x_20 : texture_depth_2d;)", "textureGatherCompare(x_20, x_10, coords12, 0.200000003, " "vec2(vec2(3u, 4u)))"}, // OpImageDrefGather 2DDepth Array - ImageAccessCase{ - "%float 2D 1 1 0 1 Unknown", - "%result = OpImageDrefGather " - "%v4float %sampled_image %coords123 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + ImageAccessCase{"%float 2D 1 1 0 1 Unknown", + "%result = OpImageDrefGather " + "%v4float %sampled_image %coords123 %depth", + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", - "textureGatherCompare(x_20, x_10, coords123.xy, " - "i32(round(coords123.z)), 0.200000003)"}, +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", + "textureGatherCompare(x_20, x_10, coords123.xy, " + "i32(round(coords123.z)), 0.200000003)"}, // OpImageDrefGather 2DDepth Array ConstOffset signed ImageAccessCase{ "%float 2D 1 1 0 1 Unknown", "%result = OpImageDrefGather " "%v4float %sampled_image %coords123 %depth ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", "textureGatherCompare(x_20, x_10, coords123.xy, " "i32(round(coords123.z)), 0.200000003, vec2(3, 4))"}, // OpImageDrefGather 2DDepth Array ConstOffset unsigned - ImageAccessCase{ - "%float 2D 1 1 0 1 Unknown", - "%result = OpImageDrefGather " - "%v4float %sampled_image %coords123 %depth ConstOffset " - "%u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + ImageAccessCase{"%float 2D 1 1 0 1 Unknown", + "%result = OpImageDrefGather " + "%v4float %sampled_image %coords123 %depth ConstOffset " + "%u_offsets2d", + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", - "textureGatherCompare(x_20, x_10, coords123.xy, " - "i32(round(coords123.z)), 0.200000003, " - "vec2(vec2(3u, 4u)))"}, +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", + "textureGatherCompare(x_20, x_10, coords123.xy, " + "i32(round(coords123.z)), 0.200000003, " + "vec2(vec2(3u, 4u)))"}, // OpImageDrefGather DepthCube ImageAccessCase{ "%float Cube 1 0 0 1 Unknown", "%result = OpImageDrefGather " "%v4float %sampled_image %coords123 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_cube;)", +@group(2) @binding(1) var x_20 : texture_depth_cube;)", "textureGatherCompare(x_20, x_10, coords123, 0.200000003)"}, // OpImageDrefGather DepthCube Array - ImageAccessCase{ - "%float Cube 1 1 0 1 Unknown", - "%result = OpImageDrefGather " - "%v4float %sampled_image %coords1234 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + ImageAccessCase{"%float Cube 1 1 0 1 Unknown", + "%result = OpImageDrefGather " + "%v4float %sampled_image %coords1234 %depth", + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_cube_array;)", - "textureGatherCompare(x_20, x_10, coords1234.xyz, " - "i32(round(coords1234.w)), 0.200000003)"}})); +@group(2) @binding(1) var x_20 : texture_depth_cube_array;)", + "textureGatherCompare(x_20, x_10, coords1234.xyz, " + "i32(round(coords1234.w)), 0.200000003)"}})); INSTANTIATE_TEST_SUITE_P( ImageSampleImplicitLod, @@ -1800,9 +1796,9 @@ INSTANTIATE_TEST_SUITE_P( ImageAccessCase{"%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords12", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureSample(x_20, x_10, coords12)"}, // OpImageSampleImplicitLod arrayed @@ -1810,9 +1806,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords123", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", "textureSample(x_20, x_10, coords123.xy, i32(round(coords123.z)))"}, // OpImageSampleImplicitLod with ConstOffset @@ -1820,9 +1816,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords12 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureSample(x_20, x_10, coords12, vec2(3, 4))"}, // OpImageSampleImplicitLod arrayed with ConstOffset @@ -1830,18 +1826,18 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords123 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSample(x_20, x_10, coords123.xy, i32(round(coords123.z)), vec2(3, 4)))"}, // OpImageSampleImplicitLod with Bias ImageAccessCase{"%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords12 Bias %float_7", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", "textureSampleBias(x_20, x_10, coords12, 7.0)"}, // OpImageSampleImplicitLod arrayed with Bias @@ -1849,9 +1845,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords123 Bias %float_7", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleBias(x_20, x_10, coords123.xy, i32(round(coords123.z)), 7.0))"}, // OpImageSampleImplicitLod with Bias and signed ConstOffset @@ -1860,9 +1856,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords12 Bias|ConstOffset " "%float_7 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleBias(x_20, x_10, coords12, 7.0, vec2(3, 4))"}, // OpImageSampleImplicitLod with Bias and unsigned ConstOffset @@ -1872,9 +1868,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords12 Bias|ConstOffset " "%float_7 %u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleBias(x_20, x_10, coords12, 7.0, vec2(vec2(3u, 4u)))"}, // OpImageSampleImplicitLod arrayed with Bias ImageAccessCase{ @@ -1882,9 +1878,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleImplicitLod " "%v4float %sampled_image %coords123 Bias|ConstOffset " "%float_7 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleBias(x_20, x_10, coords123.xy, i32(round(coords123.z)), 7.0, vec2(3, 4))"})); INSTANTIATE_TEST_SUITE_P( @@ -1903,11 +1899,11 @@ INSTANTIATE_TEST_SUITE_P( %200 = OpImageSampleImplicitLod %v4float %sampled_image %coords12 %210 = OpImageSampleDrefImplicitLod %float %sampled_dref_image %coords12 %depth )", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; -[[group(0), binding(1)]] var x_30 : sampler_comparison; +@group(0) @binding(1) var x_30 : sampler_comparison; )", R"( let x_200 : vec4 = vec4(textureSample(x_20, x_10, coords12), 0.0, 0.0, 0.0); @@ -1923,9 +1919,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleDrefImplicitLod " "%float %sampled_image %coords12 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompare(x_20, x_10, coords12, 0.200000003))"}, // ImageSampleDrefImplicitLod - arrayed @@ -1933,18 +1929,18 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleDrefImplicitLod " "%float %sampled_image %coords123 %depth", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(textureSampleCompare(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003))"}, // ImageSampleDrefImplicitLod with ConstOffset ImageAccessCase{ "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleDrefImplicitLod %float " "%sampled_image %coords12 %depth ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompare(x_20, x_10, coords12, 0.200000003, vec2(3, 4)))"}, // ImageSampleDrefImplicitLod arrayed with ConstOffset @@ -1952,9 +1948,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleDrefImplicitLod %float " "%sampled_image %coords123 %depth ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(textureSampleCompare(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2(3, 4)))"})); INSTANTIATE_TEST_SUITE_P( @@ -1968,9 +1964,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleDrefExplicitLod " "%float %sampled_image %coords12 %depth Lod %float_0", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompareLevel(x_20, x_10, coords12, 0.200000003))"}, // 2D array @@ -1978,9 +1974,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 1 0 1 Unknown", "%result = OpImageSampleDrefExplicitLod " "%float %sampled_image %coords123 %depth Lod %float_0", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(textureSampleCompareLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003))"}, // 2D, ConstOffset ImageAccessCase{ @@ -1988,9 +1984,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleDrefExplicitLod %float " "%sampled_image %coords12 %depth Lod|ConstOffset " "%float_0 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompareLevel(x_20, x_10, coords12, 0.200000003, vec2(3, 4)))"}, // 2D array, ConstOffset @@ -1999,27 +1995,27 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleDrefExplicitLod %float " "%sampled_image %coords123 %depth Lod|ConstOffset " "%float_0 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", +@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(textureSampleCompareLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.200000003, vec2(3, 4)))"}, // Cube ImageAccessCase{ "%float Cube 1 0 0 1 Unknown", "%result = OpImageSampleDrefExplicitLod " "%float %sampled_image %coords123 %depth Lod %float_0", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_cube;)", +@group(2) @binding(1) var x_20 : texture_depth_cube;)", R"(textureSampleCompareLevel(x_20, x_10, coords123, 0.200000003))"}, // Cube array ImageAccessCase{ "%float Cube 1 1 0 1 Unknown", "%result = OpImageSampleDrefExplicitLod " "%float %sampled_image %coords1234 %depth Lod %float_0", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_cube_array;)", +@group(2) @binding(1) var x_20 : texture_depth_cube_array;)", R"(textureSampleCompareLevel(x_20, x_10, coords1234.xyz, i32(round(coords1234.w)), 0.200000003))"})); INSTANTIATE_TEST_SUITE_P( @@ -2031,9 +2027,9 @@ INSTANTIATE_TEST_SUITE_P( ImageAccessCase{"%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Lod %float_null", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, coords12, 0.0))"}, // OpImageSampleExplicitLod arrayed - using Lod @@ -2041,9 +2037,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords123 Lod %float_null", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.0))"}, // OpImageSampleExplicitLod - using Lod and ConstOffset @@ -2052,9 +2048,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Lod|ConstOffset " "%float_null %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, coords12, 0.0, vec2(3, 4)))"}, // OpImageSampleExplicitLod - using Lod and unsigned ConstOffset @@ -2064,9 +2060,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Lod|ConstOffset " "%float_null %u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, coords12, 0.0, vec2(vec2(3u, 4u)))"}, // OpImageSampleExplicitLod arrayed - using Lod and ConstOffset @@ -2075,9 +2071,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords123 Lod|ConstOffset " "%float_null %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleLevel(x_20, x_10, coords123.xy, i32(round(coords123.z)), 0.0, vec2(3, 4)))"})); INSTANTIATE_TEST_SUITE_P( @@ -2090,9 +2086,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Grad %vf12 %vf21", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleGrad(x_20, x_10, coords12, vf12, vf21))"}, // OpImageSampleExplicitLod arrayed - using Grad @@ -2100,9 +2096,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 1 0 1 Unknown", "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords123 Grad %vf12 %vf21", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21))"}, // OpImageSampleExplicitLod - using Grad and ConstOffset @@ -2111,9 +2107,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Grad|ConstOffset " "%vf12 %vf21 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleGrad(x_20, x_10, coords12, vf12, vf21, vec2(3, 4)))"}, // OpImageSampleExplicitLod - using Grad and unsigned ConstOffset @@ -2122,9 +2118,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords12 Grad|ConstOffset " "%vf12 %vf21 %u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleGrad(x_20, x_10, coords12, vf12, vf21, vec2(vec2(3u, 4u)))"}, // OpImageSampleExplicitLod arrayed - using Grad and ConstOffset @@ -2133,9 +2129,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords123 Grad|ConstOffset " "%vf12 %vf21 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21, vec2(3, 4)))"}, // OpImageSampleExplicitLod arrayed - using Grad and unsigned @@ -2145,9 +2141,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleExplicitLod " "%v4float %sampled_image %coords123 Grad|ConstOffset " "%vf12 %vf21 %u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d_array;)", +@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(textureSampleGrad(x_20, x_10, coords123.xy, i32(round(coords123.z)), vf12, vf21, vec2(vec2(3u, 4u))))"})); // Test crbug.com/378: @@ -2164,17 +2160,17 @@ INSTANTIATE_TEST_SUITE_P( {"%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleExplicitLod %v4float " "%sampled_image %vf12 Lod %f1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, vf12, f1))"}, // Test a depth case {"%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleExplicitLod %v4float " "%sampled_image %vf12 Lod %f1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(vec4(textureSampleLevel(x_20, x_10, vf12, i32(f1)), 0.0, 0.0, 0.0))"}})); @@ -2213,9 +2209,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 1D 0 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords12", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_1d;)", +@group(2) @binding(1) var x_20 : texture_1d;)", R"(textureSample(x_20, x_10, (coords12.x / coords12.y)))"}, // OpImageSampleProjImplicitLod 2D @@ -2223,9 +2219,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSample(x_20, x_10, (coords123.xy / coords123.z)))"}, // OpImageSampleProjImplicitLod 3D @@ -2233,9 +2229,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 3D 0 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords1234", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_3d;)", +@group(2) @binding(1) var x_20 : texture_3d;)", R"(textureSample(x_20, x_10, (coords1234.xyz / coords1234.w)))"}, // OpImageSampleProjImplicitLod 2D with ConstOffset @@ -2245,9 +2241,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSample(x_20, x_10, (coords123.xy / coords123.z), vec2(3, 4)))"})); INSTANTIATE_TEST_SUITE_P( @@ -2261,9 +2257,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123 Bias %float_7", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleBias(x_20, x_10, (coords123.xy / coords123.z), 7.0))"}, // OpImageSampleProjImplicitLod with Bias and signed ConstOffset @@ -2272,9 +2268,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123 Bias|ConstOffset " "%float_7 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleBias(x_20, x_10, (coords123.xy / coords123.z), 7.0, vec2(3, 4)))"}, // OpImageSampleProjImplicitLod with Bias and unsigned ConstOffset @@ -2284,9 +2280,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123 Bias|ConstOffset " "%float_7 %u_offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleBias(x_20, x_10, (coords123.xy / coords123.z), 7.0, vec2(vec2(3u, 4u))))"})); INSTANTIATE_TEST_SUITE_P( @@ -2298,9 +2294,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjExplicitLod " "%v4float %sampled_image %coords123 Lod %f1", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, (coords123.xy / coords123.z), f1))"}, // OpImageSampleProjExplicitLod 2D Lod with ConstOffset @@ -2308,9 +2304,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjExplicitLod " "%v4float %sampled_image %coords123 Lod|ConstOffset %f1 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleLevel(x_20, x_10, (coords123.xy / coords123.z), f1, vec2(3, 4)))"})); INSTANTIATE_TEST_SUITE_P( @@ -2322,9 +2318,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 0 0 0 1 Unknown", "%result = OpImageSampleProjExplicitLod " "%v4float %sampled_image %coords123 Grad %vf12 %vf21", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleGrad(x_20, x_10, (coords123.xy / coords123.z), vf12, vf21))"}, // OpImageSampleProjExplicitLod 2D Lod Grad ConstOffset @@ -2333,9 +2329,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleProjExplicitLod " "%v4float %sampled_image %coords123 Grad|ConstOffset " "%vf12 %vf21 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(textureSampleGrad(x_20, x_10, (coords123.xy / coords123.z), vf12, vf21, vec2(3, 4)))"})); INSTANTIATE_TEST_SUITE_P( @@ -2348,9 +2344,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleProjImplicitLod " "%v4float %sampled_image %coords123", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", // Sampling the depth texture yields an f32, but the // SPIR-V operation yiedls vec4, so fill out the @@ -2367,9 +2363,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleProjDrefImplicitLod " "%float %sampled_image %coords123 %f1", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompare(x_20, x_10, (coords123.xy / coords123.z), f1))"}, @@ -2378,9 +2374,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleProjDrefImplicitLod " "%float %sampled_image %coords123 %f1 ConstOffset %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompare(x_20, x_10, (coords123.xy / coords123.z), f1, vec2(3, 4)))"})); @@ -2397,9 +2393,9 @@ INSTANTIATE_TEST_SUITE_P( "%float 2D 1 0 0 1 Unknown", "%result = OpImageSampleProjDrefExplicitLod " "%float %sampled_image %coords123 %depth Lod %float_0", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompare(x_20, x_10, (coords123.xy / coords123.z), 0.200000003, 0.0))"}, @@ -2409,9 +2405,9 @@ INSTANTIATE_TEST_SUITE_P( "%result = OpImageSampleProjDrefExplicitLod " "%float %sampled_image %coords123 %depth " "Lod|ConstOffset %float_0 %offsets2d", - R"([[group(0), binding(0)]] var x_10 : sampler_comparison; + R"(@group(0) @binding(0) var x_10 : sampler_comparison; -[[group(2), binding(1)]] var x_20 : texture_depth_2d; +@group(2) @binding(1) var x_20 : texture_depth_2d; )", R"(textureSampleCompareLevel(x_20, x_10, (coords123.xy / coords123.z), 0.200000003, 0.0, vec2(3, 4)))"})); @@ -2492,7 +2488,7 @@ INSTANTIATE_TEST_SUITE_P(ImageWrite_OptionalParams, // OpImageWrite with no extra params {"%float 2D 0 0 0 2 Rgba32f", "OpImageWrite %im %vi12 %vf1234", - "[[group(2), binding(1)]] var x_20 : " + "@group(2) @binding(1) var x_20 : " "texture_storage_2d;", "textureStore(x_20, vi12, vf1234);"}})); @@ -2507,36 +2503,36 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // Source 1 component {"%float 2D 0 0 0 2 R32f", "OpImageWrite %im %vi12 %f1", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vec4(f1, 0.0, 0.0, 0.0));"}, // Source 2 component, dest 1 component {"%float 2D 0 0 0 2 R32f", "OpImageWrite %im %vi12 %vf12", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vec4(vf12, 0.0, 0.0));"}, // Source 3 component, dest 1 component {"%float 2D 0 0 0 2 R32f", "OpImageWrite %im %vi12 %vf123", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vec4(vf123, 0.0));"}, // Source 4 component, dest 1 component {"%float 2D 0 0 0 2 R32f", "OpImageWrite %im %vi12 %vf1234", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vf1234);"}, // Source 2 component, dest 2 component {"%float 2D 0 0 0 2 Rg32f", "OpImageWrite %im %vi12 %vf12", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vec4(vf12, 0.0, 0.0));"}, // Source 3 component, dest 2 component {"%float 2D 0 0 0 2 Rg32f", "OpImageWrite %im %vi12 %vf123", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vec4(vf123, 0.0));"}, // Source 4 component, dest 2 component {"%float 2D 0 0 0 2 Rg32f", "OpImageWrite %im %vi12 %vf1234", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", "textureStore(x_20, vi12, vf1234);"}, // WGSL does not support 3-component storage textures. // Source 4 component, dest 4 component {"%float 2D 0 0 0 2 Rgba32f", "OpImageWrite %im %vi12 %vf1234", - "[[group(2), binding(1)]] var x_20 : " + "@group(2) @binding(1) var x_20 : " "texture_storage_2d;", "textureStore(x_20, vi12, vf1234);"}})); @@ -2617,11 +2613,11 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // Sampled type is unsigned int, texel is unsigned int {"%uint 2D 0 0 0 2 Rgba32ui", "OpImageWrite %im %vi12 %vu1234", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", R"(textureStore(x_20, vi12, vu1234))"}, // Sampled type is signed int, texel is signed int {"%int 2D 0 0 0 2 Rgba32i", "OpImageWrite %im %vi12 %vi1234", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", R"(textureStore(x_20, vi12, vi1234))"}})); INSTANTIATE_TEST_SUITE_P( @@ -2635,25 +2631,25 @@ INSTANTIATE_TEST_SUITE_P( "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)"}, + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)"}, // Sampled type is float, texel is unsigned int {"%int 2D 0 0 0 2 Rgba32f", "OpImageWrite %im %vi12 %vu1234", "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)"}, + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)"}, // Sampled type is unsigned int, texel is float {"%uint 2D 0 0 0 2 Rgba32ui", "OpImageWrite %im %vi12 %vf1234", "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)"}, + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)"}, // Sampled type is signed int, texel is float {"%int 2D 0 0 0 2 Rgba32i", "OpImageWrite %im %vi12 %vf1234", "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d; + R"(@group(2) @binding(1) var x_20 : texture_storage_2d; })"}})); INSTANTIATE_TEST_SUITE_P( @@ -2667,13 +2663,13 @@ INSTANTIATE_TEST_SUITE_P( "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)"}, + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)"}, // Sampled type is signed int, texel is unsigned int {"%int 2D 0 0 0 2 Rgba32i", "OpImageWrite %im %vi12 %vu1234", "invalid texel type for storage texture write: component must be " "float, signed integer, or unsigned integer to match the texture " "channel type: OpImageWrite", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d; + R"(@group(2) @binding(1) var x_20 : texture_storage_2d; })"}})); INSTANTIATE_TEST_SUITE_P( @@ -2684,11 +2680,11 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // Source unsigned, dest unsigned {"%uint 2D 0 0 0 2 R32ui", "OpImageWrite %im %vi12 %vu12", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", R"(textureStore(x_20, vi12, vec4(vu12, 0u, 0u)))"}, // Source signed, dest signed {"%int 2D 0 0 0 2 R32i", "OpImageWrite %im %vi12 %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_storage_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_storage_2d;)", R"(textureStore(x_20, vi12, vec4(vi12, 0, 0)))"}})); INSTANTIATE_TEST_SUITE_P( @@ -2698,22 +2694,22 @@ INSTANTIATE_TEST_SUITE_P( // OpImageFetch with no extra params, on sampled texture // Level of detail is injected for sampled texture {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageFetch with explicit level, on sampled texture {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Lod %int_3", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 3);)"}, // OpImageFetch with no extra params, on depth texture // Level of detail is injected for depth texture {"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)", R"(let x_99 : vec4 = vec4(textureLoad(x_20, vi12, 0), 0.0, 0.0, 0.0);)"}, // OpImageFetch with extra params, on depth texture {"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Lod %int_3", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)", R"(let x_99 : vec4 = vec4(textureLoad(x_20, vi12, 3), 0.0, 0.0, 0.0);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2726,7 +2722,7 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // ImageFetch on depth image. {"%float 2D 1 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 ", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)", R"(let x_99 : vec4 = vec4(textureLoad(x_20, vi12, 0), 0.0, 0.0, 0.0);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2740,7 +2736,7 @@ INSTANTIATE_TEST_SUITE_P( // ImageFetch on multisampled depth image. {"%float 2D 1 0 1 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Sample %i1", - R"([[group(2), binding(1)]] var x_20 : texture_depth_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_multisampled_2d;)", R"(let x_99 : vec4 = vec4(textureLoad(x_20, vi12, i1), 0.0, 0.0, 0.0);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2756,7 +2752,7 @@ INSTANTIATE_TEST_SUITE_P( // ImageFetch non-arrayed {"%float 2D 0 0 1 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Sample %i1", - R"([[group(2), binding(1)]] var x_20 : texture_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, i1);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2765,7 +2761,7 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ {"%float 2D 0 0 1 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12 Sample %u1", - R"([[group(2), binding(1)]] var x_20 : texture_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, i32(u1));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2788,11 +2784,11 @@ INSTANTIATE_TEST_SUITE_P( // OpImageFetch requires no conversion, float -> v4float {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4float %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageFetch requires no conversion, uint -> v4uint {"%uint 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4uint %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageFetch requires conversion, uint -> v4int // is invalid SPIR-V: @@ -2801,7 +2797,7 @@ INSTANTIATE_TEST_SUITE_P( // OpImageFetch requires no conversion, int -> v4int {"%int 2D 0 0 0 1 Unknown", "%99 = OpImageFetch %v4int %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageFetch requires conversion, int -> v4uint // is invalid SPIR-V: @@ -2814,11 +2810,11 @@ INSTANTIATE_TEST_SUITE_P( // OpImageRead requires no conversion, float -> v4float {"%float 2D 0 0 0 2 Rgba32f", "%99 = OpImageRead %v4float %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageRead requires no conversion, uint -> v4uint {"%uint 2D 0 0 0 2 Rgba32ui", "%99 = OpImageRead %v4uint %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageRead requires conversion, uint -> v4int @@ -2828,7 +2824,7 @@ INSTANTIATE_TEST_SUITE_P( // OpImageRead requires no conversion, int -> v4int {"%int 2D 0 0 0 2 Rgba32i", "%99 = OpImageRead %v4int %im %vi12", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureLoad(x_20, vi12, 0);)"}, // OpImageRead requires conversion, int -> v4uint @@ -2845,9 +2841,9 @@ INSTANTIATE_TEST_SUITE_P( // OpImageSampleImplicitLod requires no conversion, float -> v4float {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageSampleImplicitLod %v4float %sampled_image %vf12", - R"([[group(0), binding(0)]] var x_10 : sampler; + R"(@group(0) @binding(0) var x_10 : sampler; -[[group(2), binding(1)]] var x_20 : texture_2d;)", +@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec4 = textureSample(x_20, x_10, vf12);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2862,26 +2858,26 @@ INSTANTIATE_TEST_SUITE_P( "%99 = OpImageQuerySize %int %im \n" "%98 = OpImageRead %v4float %im %i1\n", // Implicitly mark as // NonWritable - R"([[group(2), binding(1)]] var x_20 : texture_1d;)", + R"(@group(2) @binding(1) var x_20 : texture_1d;)", R"(let x_99 : i32 = i32(textureDimensions(x_20));)"}, // 2D storage image {"%float 2D 0 0 0 2 Rgba32f", "%99 = OpImageQuerySize %v2int %im \n" "%98 = OpImageRead %v4float %im %vi12\n", // Implicitly mark as // NonWritable - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20))"}, // 3D storage image {"%float 3D 0 0 0 2 Rgba32f", "%99 = OpImageQuerySize %v3int %im \n" "%98 = OpImageRead %v4float %im %vi123\n", // Implicitly mark as // NonWritable - R"([[group(2), binding(1)]] var x_20 : texture_3d;)", + R"(@group(2) @binding(1) var x_20 : texture_3d;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20));)"}, // Multisampled {"%float 2D 0 0 1 1 Unknown", "%99 = OpImageQuerySize %v2int %im \n", - R"([[group(2), binding(1)]] var x_20 : texture_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2897,7 +2893,7 @@ INSTANTIATE_TEST_SUITE_P( {"%float 2D 0 1 0 2 Rgba32f", "%99 = OpImageQuerySize %v3int %im \n" "%98 = OpImageRead %v4float %im %vi123\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d_array;)", + R"(@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20), textureNumLayers(x_20));)"} // 3D array storage image doesn't exist. @@ -2914,37 +2910,37 @@ INSTANTIATE_TEST_SUITE_P( // 1D {"%float 1D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_1d;)", + R"(@group(2) @binding(1) var x_20 : texture_1d;)", R"(let x_99 : i32 = i32(textureDimensions(x_20, i1)))"}, // 2D {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %v2int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20, i1));)"}, // 3D {"%float 3D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_3d;)", + R"(@group(2) @binding(1) var x_20 : texture_3d;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20, i1));)"}, // Cube {"%float Cube 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %v2int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_cube;)", + R"(@group(2) @binding(1) var x_20 : texture_cube;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20, i1).xy);)"}, // Depth 2D {"%float 2D 1 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %v2int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20, i1));)"}, // Depth Cube {"%float Cube 1 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %v2int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_cube;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_cube;)", R"(let x_99 : vec2 = vec2(textureDimensions(x_20, i1).xy);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -2960,7 +2956,7 @@ INSTANTIATE_TEST_SUITE_P( // 2D array {"%float 2D 0 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d_array;)", + R"(@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20, i1), textureNumLayers(x_20));)"}, // There is no 3D array @@ -2972,13 +2968,13 @@ INSTANTIATE_TEST_SUITE_P( // https://github.com/gpuweb/gpuweb/issues/1345 {"%float Cube 0 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_cube_array;)", + R"(@group(2) @binding(1) var x_20 : texture_cube_array;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20, i1).xy, textureNumLayers(x_20));)"}, // Depth 2D array {"%float 2D 1 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20, i1), textureNumLayers(x_20));)"}, // Depth Cube Array @@ -2988,7 +2984,7 @@ INSTANTIATE_TEST_SUITE_P( // https://github.com/gpuweb/gpuweb/issues/1345 {"%float Cube 1 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_cube_array;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_cube_array;)", R"(let x_99 : vec3 = vec3(textureDimensions(x_20, i1).xy, textureNumLayers(x_20));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -3001,7 +2997,7 @@ INSTANTIATE_TEST_SUITE_P( {"%float 1D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %int %im %u1\n", - R"([[group(2), binding(1)]] var x_20 : texture_1d;)", + R"(@group(2) @binding(1) var x_20 : texture_1d;)", R"(let x_99 : i32 = i32(textureDimensions(x_20, i32(u1)));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -3015,7 +3011,7 @@ INSTANTIATE_TEST_SUITE_P( {"%float 1D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %uint %im %i1\n", - R"([[group(2), binding(1)]] var x_20 : texture_1d;)", + R"(@group(2) @binding(1) var x_20 : texture_1d;)", R"(let x_99 : u32 = u32(textureDimensions(x_20, i1));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -3029,47 +3025,47 @@ INSTANTIATE_TEST_SUITE_P( // 2D {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // 2D array {"%float 2D 0 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d_array;)", + R"(@group(2) @binding(1) var x_20 : texture_2d_array;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // 3D {"%float 3D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_3d;)", + R"(@group(2) @binding(1) var x_20 : texture_3d;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // Cube {"%float Cube 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_cube;)", + R"(@group(2) @binding(1) var x_20 : texture_cube;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // Cube array {"%float Cube 0 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_cube_array;)", + R"(@group(2) @binding(1) var x_20 : texture_cube_array;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // depth 2d {"%float 2D 1 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // depth 2d array {"%float 2D 1 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_2d_array;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_2d_array;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // depth cube {"%float Cube 1 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_cube;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_cube;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}, // depth cube array {"%float Cube 1 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_depth_cube_array;)", + R"(@group(2) @binding(1) var x_20 : texture_depth_cube_array;)", R"(let x_99 : i32 = textureNumLevels(x_20);)"}})); INSTANTIATE_TEST_SUITE_P( @@ -3079,7 +3075,7 @@ INSTANTIATE_TEST_SUITE_P( SpvParserHandleTest_SampledImageAccessTest, ::testing::ValuesIn(std::vector{ {"%float 2D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %uint %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_2d;)", R"(let x_99 : u32 = u32(textureNumLevels(x_20));)"}})); INSTANTIATE_TEST_SUITE_P( @@ -3088,7 +3084,7 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // Multsample 2D {"%float 2D 0 0 1 1 Unknown", "%99 = OpImageQuerySamples %int %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d;)", R"(let x_99 : i32 = textureNumSamples(x_20);)"} // namespace // Multisample 2D array @@ -3102,7 +3098,7 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector{ // Multsample 2D {"%float 2D 0 0 1 1 Unknown", "%99 = OpImageQuerySamples %uint %im\n", - R"([[group(2), binding(1)]] var x_20 : texture_multisampled_2d;)", + R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d;)", R"(let x_99 : u32 = u32(textureNumSamples(x_20));)"} // Multisample 2D array diff --git a/src/reader/spirv/parser_impl_module_var_test.cc b/src/reader/spirv/parser_impl_module_var_test.cc index 4c7ab3ad0e..31007f3b9d 100644 --- a/src/reader/spirv/parser_impl_module_var_test.cc +++ b/src/reader/spirv/parser_impl_module_var_test.cc @@ -471,11 +471,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); @@ -531,11 +531,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); @@ -590,11 +590,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); @@ -649,11 +649,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_2); @@ -707,11 +707,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_2); @@ -765,11 +765,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_2); @@ -801,11 +801,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_2); @@ -1298,7 +1298,7 @@ TEST_F(SpvModuleScopeVarParserTest, DescriptorGroupDecoration_Valid) { const auto module_str = test::ToString(p->program()); EXPECT_THAT( module_str, - HasSubstr("[[group(3), binding(9)]] var x_1 : S;")) + HasSubstr("@group(3) @binding(9) var x_1 : S;")) << module_str; } @@ -1349,7 +1349,7 @@ TEST_F(SpvModuleScopeVarParserTest, BindingDecoration_Valid) { const auto module_str = test::ToString(p->program()); EXPECT_THAT( module_str, - HasSubstr("[[group(0), binding(3)]] var x_1 : S;")) + HasSubstr("@group(0) @binding(3) var x_1 : S;")) << module_str; } @@ -1399,7 +1399,7 @@ TEST_F(SpvModuleScopeVarParserTest, ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr(R"(type Arr = [[stride(4)]] array; + EXPECT_THAT(module_str, HasSubstr(R"(type Arr = @stride(4) array; struct S { field0 : u32; @@ -1407,7 +1407,7 @@ struct S { field2 : Arr; } -[[group(0), binding(0)]] var x_1 : S; +@group(0) @binding(0) var x_1 : S; )")) << module_str; } @@ -1437,7 +1437,7 @@ TEST_F(SpvModuleScopeVarParserTest, ColMajorDecoration_Dropped) { field0 : mat3x2; } -[[group(0), binding(0)]] var myvar : S; +@group(0) @binding(0) var myvar : S; )")) << module_str; } @@ -1466,7 +1466,7 @@ TEST_F(SpvModuleScopeVarParserTest, MatrixStrideDecoration_Natural_Dropped) { field0 : mat3x2; } -[[group(0), binding(0)]] var myvar : S; +@group(0) @binding(0) var myvar : S; )")) << module_str; } @@ -1492,11 +1492,11 @@ 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 { - [[stride(64), internal(disable_validation__ignore_stride)]] + @stride(64) @internal(disable_validation__ignore_stride) field0 : mat3x2; } -[[group(0), binding(0)]] var myvar : S; +@group(0) @binding(0) var myvar : S; )")) << module_str; } @@ -1549,7 +1549,7 @@ TEST_F(SpvModuleScopeVarParserTest, StorageBuffer_NonWritable_AllMembers) { field1 : f32; } -[[group(0), binding(0)]] var x_1 : S; +@group(0) @binding(0) var x_1 : S; )")) << module_str; } @@ -1578,7 +1578,7 @@ TEST_F(SpvModuleScopeVarParserTest, StorageBuffer_NonWritable_NotAllMembers) { field1 : f32; } -[[group(0), binding(0)]] var x_1 : S; +@group(0) @binding(0) var x_1 : S; )")) << module_str; } @@ -1610,7 +1610,7 @@ TEST_F( field1 : f32; } -[[group(0), binding(0)]] var x_1 : S; +@group(0) @binding(0) var x_1 : S; )")) << module_str; } @@ -1655,8 +1655,7 @@ TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_True) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error(); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, - HasSubstr("[[override(12)]] let myconst : bool = true;")) + EXPECT_THAT(module_str, HasSubstr("@override(12) let myconst : bool = true;")) << module_str; } @@ -1673,7 +1672,7 @@ TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_False) { EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); EXPECT_THAT(module_str, - HasSubstr("[[override(12)]] let myconst : bool = false;")) + HasSubstr("@override(12) let myconst : bool = false;")) << module_str; } @@ -1689,8 +1688,7 @@ TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_U32) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error(); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, - HasSubstr("[[override(12)]] let myconst : u32 = 42u;")) + EXPECT_THAT(module_str, HasSubstr("@override(12) let myconst : u32 = 42u;")) << module_str; } @@ -1706,7 +1704,7 @@ TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_I32) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error(); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, HasSubstr("[[override(12)]] let myconst : i32 = 42;")) + EXPECT_THAT(module_str, HasSubstr("@override(12) let myconst : i32 = 42;")) << module_str; } @@ -1722,8 +1720,7 @@ TEST_F(SpvModuleScopeVarParserTest, ScalarSpecConstant_DeclareConst_F32) { ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << p->error(); EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - EXPECT_THAT(module_str, - HasSubstr("[[override(12)]] let myconst : f32 = 2.5;")) + EXPECT_THAT(module_str, HasSubstr("@override(12) let myconst : f32 = 2.5;")) << module_str; } @@ -1810,8 +1807,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_index)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_index) x_1_param : u32) { x_1 = bitcast(x_1_param); main_1(); } @@ -1923,8 +1920,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_index)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_index) x_1_param : u32) { x_1 = bitcast(x_1_param); main_1(); } @@ -1977,8 +1974,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_index)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_index) x_1_param : u32) { x_1 = x_1_param; main_1(); } @@ -2007,8 +2004,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_index)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_index) x_1_param : u32) { x_1 = x_1_param; main_1(); } @@ -2036,8 +2033,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_index)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_index) x_1_param : u32) { x_1 = x_1_param; main_1(); } @@ -2152,8 +2149,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = x_1_param; main_1(); } @@ -2184,8 +2181,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = x_1_param; main_1(); } @@ -2216,8 +2213,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = x_1_param; main_1(); } @@ -2247,8 +2244,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = bitcast(x_1_param); main_1(); } @@ -2279,8 +2276,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = bitcast(x_1_param); main_1(); } @@ -2311,8 +2308,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = bitcast(x_1_param); main_1(); } @@ -2362,11 +2359,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1[0]); @@ -2399,11 +2396,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1[0]); @@ -2436,11 +2433,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1[0]); @@ -2472,11 +2469,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(bitcast(x_1[0])); @@ -2509,11 +2506,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(bitcast(x_1[0])); @@ -2546,11 +2543,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(bitcast(x_1[0])); @@ -2574,13 +2571,13 @@ TEST_F(SpvModuleScopeVarParserTest, SampleMask_In_WithStride) { ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error() << assembly; EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - const std::string expected = R"(type Arr = [[stride(4)]] array; + const std::string expected = R"(type Arr = @stride(4) array; -type Arr_1 = [[stride(4)]] array; +type Arr_1 = @stride(4) array; -type Arr_2 = [[stride(4)]] array; +type Arr_2 = @stride(4) array; -type Arr_3 = [[stride(4)]] array; +type Arr_3 = @stride(4) array; var x_1 : Arr; @@ -2589,8 +2586,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = x_1_param; main_1(); } @@ -2613,13 +2610,13 @@ TEST_F(SpvModuleScopeVarParserTest, SampleMask_Out_WithStride) { ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error() << assembly; EXPECT_TRUE(p->error().empty()); const auto module_str = test::ToString(p->program()); - const std::string expected = R"(type Arr = [[stride(4)]] array; + const std::string expected = R"(type Arr = @stride(4) array; -type Arr_1 = [[stride(4)]] array; +type Arr_1 = @stride(4) array; -type Arr_2 = [[stride(4)]] array; +type Arr_2 = @stride(4) array; -type Arr_3 = [[stride(4)]] array; +type Arr_3 = @stride(4) array; var x_1 : Arr; @@ -2629,11 +2626,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1[0]); @@ -2687,12 +2684,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(x_4); @@ -2725,12 +2722,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(x_4); @@ -2762,12 +2759,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(x_4); @@ -2798,12 +2795,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(x_4); @@ -2836,12 +2833,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(x_4); @@ -2873,12 +2870,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(vertex_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(x_4); @@ -2958,12 +2955,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(position); @@ -2996,12 +2993,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(position); @@ -3033,12 +3030,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(position); @@ -3093,12 +3090,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(position); @@ -3131,12 +3128,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(position); @@ -3168,12 +3165,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) position_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(position); @@ -3318,8 +3315,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(${wgsl_builtin})]] x_1_param : ${unsigned_wgsl_type}) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(${wgsl_builtin}) x_1_param : ${unsigned_wgsl_type}) { x_1 = ${assignment_value}; main_1(); } @@ -3367,8 +3364,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(${wgsl_builtin})]] x_1_param : ${unsigned_wgsl_type}) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(${wgsl_builtin}) x_1_param : ${unsigned_wgsl_type}) { x_1 = ${assignment_value}; main_1(); } @@ -3415,8 +3412,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(${wgsl_builtin})]] x_1_param : ${unsigned_wgsl_type}) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(${wgsl_builtin}) x_1_param : ${unsigned_wgsl_type}) { x_1 = ${assignment_value}; main_1(); } @@ -3730,14 +3727,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_2_1 : u32; - [[location(6)]] + @location(6) x_4_1 : u32; } -[[stage(fragment)]] -fn main([[location(0)]] x_1_param : u32, [[location(30)]] x_3_param : u32) -> main_out { +@stage(fragment) +fn main(@location(0) x_1_param : u32, @location(30) x_3_param : u32) -> main_out { x_1 = x_1_param; x_3 = x_3_param; main_1(); @@ -3784,12 +3781,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = x_1_param; main_1(); return main_out(x_4); @@ -3834,12 +3831,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_4_1 : vec4; } -[[stage(vertex)]] -fn main([[builtin(instance_index)]] x_1_param : u32) -> main_out { +@stage(vertex) +fn main(@builtin(instance_index) x_1_param : u32) -> main_out { x_1 = bitcast(x_1_param); main_1(); return main_out(x_4); @@ -3879,8 +3876,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = x_1_param; main_1(); } @@ -3918,8 +3915,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[builtin(sample_mask)]] x_1_param : u32) { +@stage(fragment) +fn main(@builtin(sample_mask) x_1_param : u32) { x_1[0] = bitcast(x_1_param); main_1(); } @@ -3960,11 +3957,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1[0]); @@ -4006,11 +4003,11 @@ fn main_1() { } struct main_out { - [[builtin(sample_mask)]] + @builtin(sample_mask) x_1_1 : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(bitcast(x_1[0])); @@ -4050,11 +4047,11 @@ fn main_1() { } struct main_out { - [[builtin(frag_depth)]] + @builtin(frag_depth) x_1_1 : f32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1); @@ -4084,11 +4081,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); @@ -4154,11 +4151,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); @@ -4211,12 +4208,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] -fn main([[location(4)]] x_1_param : f32, [[location(5)]] x_1_param_1 : f32, [[location(6)]] x_1_param_2 : f32) -> main_out { +@stage(vertex) +fn main(@location(4) x_1_param : f32, @location(5) x_1_param_1 : f32, @location(6) x_1_param_2 : f32) -> main_out { x_1[0] = x_1_param; x_1[1] = x_1_param_1; x_1[2] = x_1_param_2; @@ -4269,12 +4266,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] -fn main([[location(9)]] x_1_param : vec4, [[location(10)]] x_1_param_1 : vec4) -> main_out { +@stage(vertex) +fn main(@location(9) x_1_param : vec4, @location(10) x_1_param_1 : vec4) -> main_out { x_1[0] = x_1_param; x_1[1] = x_1_param_1; main_1(); @@ -4336,12 +4333,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] -fn main([[location(9)]] x_1_param : f32, [[location(10)]] x_1_param_1 : vec4) -> main_out { +@stage(vertex) +fn main(@location(9) x_1_param : f32, @location(10) x_1_param_1 : vec4) -> main_out { x_1.alice = x_1_param; x_1.bob = x_1_param_1; main_1(); @@ -4395,12 +4392,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] -fn main([[location(7)]] x_1_param : vec4, [[location(8)]] x_1_param_1 : vec4, [[location(9)]] x_1_param_2 : vec4, [[location(10)]] x_1_param_3 : vec4) -> main_out { +@stage(vertex) +fn main(@location(7) x_1_param : vec4, @location(8) x_1_param_1 : vec4, @location(9) x_1_param_2 : vec4, @location(10) x_1_param_3 : vec4) -> main_out { x_1[0][0] = x_1_param; x_1[0][1] = x_1_param_1; x_1[1][0] = x_1_param_2; @@ -4456,17 +4453,17 @@ fn main_1() { } struct main_out { - [[location(4)]] + @location(4) x_1_1 : f32; - [[location(5)]] + @location(5) x_1_2 : f32; - [[location(6)]] + @location(6) x_1_3 : f32; - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_1[0], x_1[1], x_1[2], x_2); @@ -4517,15 +4514,15 @@ fn main_1() { } struct main_out { - [[location(9)]] + @location(9) x_1_1 : vec4; - [[location(10)]] + @location(10) x_1_2 : vec4; - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_1[0], x_1[1], x_2); @@ -4586,15 +4583,15 @@ fn main_1() { } struct main_out { - [[location(9)]] + @location(9) x_1_1 : f32; - [[location(10)]] + @location(10) x_1_2 : vec4; - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_1.alice, x_1.bob, x_2); @@ -4661,16 +4658,16 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_2_1 : vec4; - [[location(9)]] + @location(9) x_3_1 : f32; - [[location(11)]] + @location(11) x_3_2 : vec4; } -[[stage(vertex)]] -fn main([[location(9)]] x_1_param : f32, [[location(11)]] x_1_param_1 : vec4) -> main_out { +@stage(vertex) +fn main(@location(9) x_1_param : f32, @location(11) x_1_param_1 : vec4) -> main_out { x_1.alice = x_1_param; x_1.bob = x_1_param_1; main_1(); @@ -4746,12 +4743,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) x_10_1 : vec4; } -[[stage(vertex)]] -fn main([[location(1), interpolate(flat)]] x_1_param : u32, [[location(2), interpolate(flat)]] x_2_param : vec2, [[location(3), interpolate(flat)]] x_3_param : i32, [[location(4), interpolate(flat)]] x_4_param : vec2, [[location(5), interpolate(flat)]] x_5_param : f32, [[location(6), interpolate(flat)]] x_6_param : vec2) -> main_out { +@stage(vertex) +fn main(@location(1) @interpolate(flat) x_1_param : u32, @location(2) @interpolate(flat) x_2_param : vec2, @location(3) @interpolate(flat) x_3_param : i32, @location(4) @interpolate(flat) x_4_param : vec2, @location(5) @interpolate(flat) x_5_param : f32, @location(6) @interpolate(flat) x_6_param : vec2) -> main_out { x_1 = x_1_param; x_2 = x_2_param; x_3 = x_3_param; @@ -4831,23 +4828,23 @@ fn main_1() { } struct main_out { - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) x_1_1 : u32; - [[location(2), interpolate(flat)]] + @location(2) @interpolate(flat) x_2_1 : vec2; - [[location(3), interpolate(flat)]] + @location(3) @interpolate(flat) x_3_1 : i32; - [[location(4), interpolate(flat)]] + @location(4) @interpolate(flat) x_4_1 : vec2; - [[location(5), interpolate(flat)]] + @location(5) @interpolate(flat) x_5_1 : f32; - [[location(6), interpolate(flat)]] + @location(6) @interpolate(flat) x_6_1 : vec2; - [[builtin(position)]] + @builtin(position) x_10_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(x_1, x_2, x_3, x_4, x_5, x_6, x_10); @@ -4899,8 +4896,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[location(1), interpolate(flat)]] x_1_param : f32, [[location(2), interpolate(flat)]] x_1_param_1 : f32, [[location(5), interpolate(flat)]] x_2_param : f32, [[location(6), interpolate(flat)]] x_2_param_1 : f32) { +@stage(fragment) +fn main(@location(1) @interpolate(flat) x_1_param : f32, @location(2) @interpolate(flat) x_1_param_1 : f32, @location(5) @interpolate(flat) x_2_param : f32, @location(6) @interpolate(flat) x_2_param_1 : f32) { x_1[0] = x_1_param; x_1[1] = x_1_param_1; x_2.field0 = x_2_param; @@ -4975,8 +4972,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[location(1)]] x_1_param : f32, [[location(2), interpolate(perspective, centroid)]] x_2_param : f32, [[location(3), interpolate(perspective, sample)]] x_3_param : f32, [[location(4), interpolate(linear)]] x_4_param : f32, [[location(5), interpolate(linear, centroid)]] x_5_param : f32, [[location(6), interpolate(linear, sample)]] x_6_param : f32) { +@stage(fragment) +fn main(@location(1) x_1_param : f32, @location(2) @interpolate(perspective, centroid) x_2_param : f32, @location(3) @interpolate(perspective, sample) x_3_param : f32, @location(4) @interpolate(linear) x_4_param : f32, @location(5) @interpolate(linear, centroid) x_5_param : f32, @location(6) @interpolate(linear, sample) x_6_param : f32) { x_1 = x_1_param; x_2 = x_2_param; x_3 = x_3_param; @@ -5043,8 +5040,8 @@ fn main_1() { return; } -[[stage(fragment)]] -fn main([[location(1)]] x_1_param : f32, [[location(2), interpolate(perspective, centroid)]] x_1_param_1 : f32, [[location(3), interpolate(perspective, sample)]] x_1_param_2 : f32, [[location(4), interpolate(linear)]] x_1_param_3 : f32, [[location(5), interpolate(linear, centroid)]] x_1_param_4 : f32, [[location(6), interpolate(linear, sample)]] x_1_param_5 : f32) { +@stage(fragment) +fn main(@location(1) x_1_param : f32, @location(2) @interpolate(perspective, centroid) x_1_param_1 : f32, @location(3) @interpolate(perspective, sample) x_1_param_2 : f32, @location(4) @interpolate(linear) x_1_param_3 : f32, @location(5) @interpolate(linear, centroid) x_1_param_4 : f32, @location(6) @interpolate(linear, sample) x_1_param_5 : f32) { x_1.field0 = x_1_param; x_1.field1 = x_1_param_1; x_1.field2 = x_1_param_2; @@ -5122,21 +5119,21 @@ fn main_1() { } struct main_out { - [[location(1)]] + @location(1) x_1_1 : f32; - [[location(2), interpolate(perspective, centroid)]] + @location(2) @interpolate(perspective, centroid) x_2_1 : f32; - [[location(3), interpolate(perspective, sample)]] + @location(3) @interpolate(perspective, sample) x_3_1 : f32; - [[location(4), interpolate(linear)]] + @location(4) @interpolate(linear) x_4_1 : f32; - [[location(5), interpolate(linear, centroid)]] + @location(5) @interpolate(linear, centroid) x_5_1 : f32; - [[location(6), interpolate(linear, sample)]] + @location(6) @interpolate(linear, sample) x_6_1 : f32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1, x_2, x_3, x_4, x_5, x_6); @@ -5201,21 +5198,21 @@ fn main_1() { } struct main_out { - [[location(1)]] + @location(1) x_1_1 : f32; - [[location(2), interpolate(perspective, centroid)]] + @location(2) @interpolate(perspective, centroid) x_1_2 : f32; - [[location(3), interpolate(perspective, sample)]] + @location(3) @interpolate(perspective, sample) x_1_3 : f32; - [[location(4), interpolate(linear)]] + @location(4) @interpolate(linear) x_1_4 : f32; - [[location(5), interpolate(linear, centroid)]] + @location(5) @interpolate(linear, centroid) x_1_5 : f32; - [[location(6), interpolate(linear, sample)]] + @location(6) @interpolate(linear, sample) x_1_6 : f32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_1.field0, x_1.field1, x_1.field2, x_1.field3, x_1.field4, x_1.field5); diff --git a/src/reader/spirv/parser_impl_named_types_test.cc b/src/reader/spirv/parser_impl_named_types_test.cc index f59322242a..8da9c73d86 100644 --- a/src/reader/spirv/parser_impl_named_types_test.cc +++ b/src/reader/spirv/parser_impl_named_types_test.cc @@ -78,7 +78,7 @@ TEST_F(SpvParserTest, NamedTypes_AnonRTArrayWithDecoration) { )")); EXPECT_TRUE(p->BuildAndParseInternalModule()); EXPECT_THAT(test::ToString(p->program()), - HasSubstr("RTArr = [[stride(8)]] array;\n")); + HasSubstr("RTArr = @stride(8) array;\n")); p->DeliberatelyInvalidSpirv(); } @@ -93,9 +93,9 @@ TEST_F(SpvParserTest, NamedTypes_AnonRTArray_Dup_EmitBoth) { )")); EXPECT_TRUE(p->BuildAndParseInternalModule()); EXPECT_THAT(test::ToString(p->program()), - HasSubstr(R"(type RTArr = [[stride(8)]] array; + HasSubstr(R"(type RTArr = @stride(8) array; -type RTArr_1 = [[stride(8)]] array; +type RTArr_1 = @stride(8) array; )")); p->DeliberatelyInvalidSpirv(); @@ -110,7 +110,7 @@ TEST_F(SpvParserTest, NamedTypes_NamedRTArray) { )")); EXPECT_TRUE(p->BuildAndParseInternalModule()); EXPECT_THAT(test::ToString(p->program()), - HasSubstr("myrtarr = [[stride(8)]] array;\n")); + HasSubstr("myrtarr = @stride(8) array;\n")); p->DeliberatelyInvalidSpirv(); } @@ -126,7 +126,7 @@ TEST_F(SpvParserTest, NamedTypes_NamedArray) { )")); EXPECT_TRUE(p->BuildAndParseInternalModule()); EXPECT_THAT(test::ToString(p->program()), - HasSubstr("myarr = [[stride(8)]] array;")); + HasSubstr("myarr = @stride(8) array;")); p->DeliberatelyInvalidSpirv(); } @@ -142,9 +142,9 @@ TEST_F(SpvParserTest, NamedTypes_AnonArray_Dup_EmitBoth) { )")); EXPECT_TRUE(p->BuildAndParseInternalModule()); EXPECT_THAT(test::ToString(p->program()), - HasSubstr(R"(type Arr = [[stride(8)]] array; + HasSubstr(R"(type Arr = @stride(8) array; -type Arr_1 = [[stride(8)]] array; +type Arr_1 = @stride(8) array; )")); p->DeliberatelyInvalidSpirv(); diff --git a/src/reader/wgsl/lexer.cc b/src/reader/wgsl/lexer.cc index f8c8bfa5bd..31d2546527 100644 --- a/src/reader/wgsl/lexer.cc +++ b/src/reader/wgsl/lexer.cc @@ -777,7 +777,11 @@ Token Lexer::try_punctuation() { auto source = begin_source(); auto type = Token::Type::kUninitialized; - if (matches(pos_, "[[")) { + if (matches(pos_, "@")) { + type = Token::Type::kAttr; + pos_ += 1; + location_.column += 1; + } else if (matches(pos_, "[[")) { type = Token::Type::kAttrLeft; pos_ += 2; location_.column += 2; diff --git a/src/reader/wgsl/lexer_test.cc b/src/reader/wgsl/lexer_test.cc index 20b3f18daa..0ea9b9acd7 100644 --- a/src/reader/wgsl/lexer_test.cc +++ b/src/reader/wgsl/lexer_test.cc @@ -662,6 +662,7 @@ INSTANTIATE_TEST_SUITE_P( testing::Values(TokenData{"&", Token::Type::kAnd}, TokenData{"&&", Token::Type::kAndAnd}, TokenData{"->", Token::Type::kArrow}, + TokenData{"@", Token::Type::kAttr}, TokenData{"[[", Token::Type::kAttrLeft}, TokenData{"]]", Token::Type::kAttrRight}, TokenData{"/", Token::Type::kForwardSlash}, diff --git a/src/reader/wgsl/parser_impl.cc b/src/reader/wgsl/parser_impl.cc index cdc9b8727c..9f543090af 100644 --- a/src/reader/wgsl/parser_impl.cc +++ b/src/reader/wgsl/parser_impl.cc @@ -161,9 +161,9 @@ struct BlockCounters { /// @return the current enter-exit depth for the given block token type. If /// `t` is not a block token type, then 0 is always returned. int consume(const Token& t) { - if (t.Is(Token::Type::kAttrLeft)) + if (t.Is(Token::Type::kAttrLeft)) // [DEPRECATED] return attrs++; - if (t.Is(Token::Type::kAttrRight)) + if (t.Is(Token::Type::kAttrRight)) // [DEPRECATED] return attrs--; if (t.Is(Token::Type::kBraceLeft)) return brace++; @@ -1383,7 +1383,8 @@ Expect ParserImpl::expect_param_list() { while (continue_parsing()) { // Check for the end of the list. auto t = peek(); - if (!t.IsIdentifier() && !t.Is(Token::Type::kAttrLeft)) { + if (!t.IsIdentifier() && !t.Is(Token::Type::kAttr) && + !t.Is(Token::Type::kAttrLeft)) { break; } @@ -2834,11 +2835,21 @@ Maybe ParserImpl::decoration_list() { ast::DecorationList decos; while (continue_parsing()) { - auto list = decoration_bracketed_list(decos); - if (list.errored) - errored = true; - if (!list.matched) - break; + if (match(Token::Type::kAttr)) { + if (auto deco = expect_decoration(); deco.errored) { + errored = true; + } else { + decos.emplace_back(deco.value); + } + } else { // [DEPRECATED] - old [[decoration]] style + auto list = decoration_bracketed_list(decos); + if (list.errored) { + errored = true; + } + if (!list.matched) { + break; + } + } matched = true; } @@ -2855,11 +2866,15 @@ Maybe ParserImpl::decoration_list() { Maybe ParserImpl::decoration_bracketed_list(ast::DecorationList& decos) { const char* use = "decoration list"; - if (!match(Token::Type::kAttrLeft)) { + Source source; + if (!match(Token::Type::kAttrLeft, &source)) { return Failure::kNoMatch; } - Source source; + deprecated(source, + "[[decoration]] style decorations have been replaced with " + "@decoration style"); + if (match(Token::Type::kAttrRight, &source)) return add_error(source, "empty decoration list"); @@ -2879,7 +2894,7 @@ Maybe ParserImpl::decoration_bracketed_list(ast::DecorationList& decos) { if (is_decoration(peek())) { // We have two decorations in a bracket without a separating comma. - // e.g. [[location(1) group(2)]] + // e.g. @location(1) group(2) // ^^^ expected comma expect(use, Token::Type::kComma); return Failure::kErrored; @@ -3092,7 +3107,7 @@ Maybe ParserImpl::decoration() { const char* use = "override decoration"; if (peek_is(Token::Type::kParenLeft)) { - // [[override(x)]] + // @override(x) return expect_paren_block(use, [&]() -> Result { auto val = expect_positive_sint(use); if (val.errored) diff --git a/src/reader/wgsl/parser_impl.h b/src/reader/wgsl/parser_impl.h index 77c97e266b..6c202a77e7 100644 --- a/src/reader/wgsl/parser_impl.h +++ b/src/reader/wgsl/parser_impl.h @@ -669,7 +669,7 @@ class ParserImpl { /// Parses a `assignment_stmt` grammar element /// @returns the parsed assignment or nullptr Maybe assignment_stmt(); - /// Parses one or more bracketed decoration lists. + /// Parses one or more decoration lists. /// @return the parsed decoration list, or an empty list on error. Maybe decoration_list(); /// Parses a list of decorations between `ATTR_LEFT` and `ATTR_RIGHT` diff --git a/src/reader/wgsl/parser_impl_error_msg_test.cc b/src/reader/wgsl/parser_impl_error_msg_test.cc index 29f5a7ea93..417c1ebc5c 100644 --- a/src/reader/wgsl/parser_impl_error_msg_test.cc +++ b/src/reader/wgsl/parser_impl_error_msg_test.cc @@ -39,387 +39,491 @@ class ParserImplErrorTest : public ParserImplTest {}; TEST_F(ParserImplErrorTest, AdditiveInvalidExpr) { EXPECT("fn f() { return 1.0 + <; }", - "test.wgsl:1:23 error: unable to parse right side of + expression\n" - "fn f() { return 1.0 + <; }\n" - " ^\n"); + R"(test.wgsl:1:23 error: unable to parse right side of + expression +fn f() { return 1.0 + <; } + ^ +)"); } TEST_F(ParserImplErrorTest, AndInvalidExpr) { EXPECT("fn f() { return 1 & >; }", - "test.wgsl:1:21 error: unable to parse right side of & expression\n" - "fn f() { return 1 & >; }\n" - " ^\n"); + R"(test.wgsl:1:21 error: unable to parse right side of & expression +fn f() { return 1 & >; } + ^ +)"); } TEST_F(ParserImplErrorTest, AliasDeclInvalidDeco) { - EXPECT("[[override]]type e=u32;", - "test.wgsl:1:3 error: unexpected decorations\n" - "[[override]]type e=u32;\n" - " ^^^^^^^^\n"); + EXPECT( + "@override type e=u32;", + R"(test.wgsl:1:2 error: unexpected decorations +@override type e=u32; + ^^^^^^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_AliasDeclInvalidDeco) { + EXPECT( + "[[override]]type e=u32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[override]]type e=u32; +^^ + +test.wgsl:1:3 error: unexpected decorations +[[override]]type e=u32; + ^^^^^^^^ +)"); } TEST_F(ParserImplErrorTest, IndexExprInvalidExpr) { EXPECT("fn f() { x = y[^]; }", - "test.wgsl:1:16 error: unable to parse expression inside []\n" - "fn f() { x = y[^]; }\n" - " ^\n"); + R"(test.wgsl:1:16 error: unable to parse expression inside [] +fn f() { x = y[^]; } + ^ +)"); } TEST_F(ParserImplErrorTest, IndexExprMissingRBracket) { EXPECT("fn f() { x = y[1; }", - "test.wgsl:1:17 error: expected ']' for index accessor\n" - "fn f() { x = y[1; }\n" - " ^\n"); + R"(test.wgsl:1:17 error: expected ']' for index accessor +fn f() { x = y[1; } + ^ +)"); } TEST_F(ParserImplErrorTest, AssignmentStmtMissingAssignment) { - EXPECT("fn f() { a; }", - "test.wgsl:1:11 error: expected '=' for assignment\n" - "fn f() { a; }\n" - " ^\n"); + EXPECT("fn f() { a; }", R"(test.wgsl:1:11 error: expected '=' for assignment +fn f() { a; } + ^ +)"); } TEST_F(ParserImplErrorTest, AssignmentStmtMissingAssignment2) { EXPECT("fn f() { a : i32; }", - "test.wgsl:1:10 error: expected 'var' for variable declaration\n" - "fn f() { a : i32; }\n" - " ^\n"); + R"(test.wgsl:1:10 error: expected 'var' for variable declaration +fn f() { a : i32; } + ^ +)"); } TEST_F(ParserImplErrorTest, AssignmentStmtMissingSemicolon) { EXPECT("fn f() { a = 1 }", - "test.wgsl:1:16 error: expected ';' for assignment statement\n" - "fn f() { a = 1 }\n" - " ^\n"); + R"(test.wgsl:1:16 error: expected ';' for assignment statement +fn f() { a = 1 } + ^ +)"); } TEST_F(ParserImplErrorTest, AssignmentStmtInvalidLHS_IntrinsicFunctionName) { EXPECT("normalize = 5;", - "test.wgsl:1:1 error: statement found outside of function body\n" - "normalize = 5;\n" - "^^^^^^^^^\n"); + R"(test.wgsl:1:1 error: statement found outside of function body +normalize = 5; +^^^^^^^^^ +)"); } TEST_F(ParserImplErrorTest, AssignmentStmtInvalidRHS) { EXPECT("fn f() { a = >; }", - "test.wgsl:1:14 error: unable to parse right side of assignment\n" - "fn f() { a = >; }\n" - " ^\n"); + R"(test.wgsl:1:14 error: unable to parse right side of assignment +fn f() { a = >; } + ^ +)"); } TEST_F(ParserImplErrorTest, BitcastExprMissingLessThan) { EXPECT("fn f() { x = bitcast(y); }", - "test.wgsl:1:21 error: expected '<' for bitcast expression\n" - "fn f() { x = bitcast(y); }\n" - " ^\n"); + R"(test.wgsl:1:21 error: expected '<' for bitcast expression +fn f() { x = bitcast(y); } + ^ +)"); } TEST_F(ParserImplErrorTest, BitcastExprMissingGreaterThan) { EXPECT("fn f() { x = bitcast' for bitcast expression\n" - "fn f() { x = bitcast' for bitcast expression +fn f() { x = bitcast(y); }", - "test.wgsl:1:22 error: invalid type for bitcast expression\n" - "fn f() { x = bitcast<>(y); }\n" - " ^\n"); + R"(test.wgsl:1:22 error: invalid type for bitcast expression +fn f() { x = bitcast<>(y); } + ^ +)"); } TEST_F(ParserImplErrorTest, BreakStmtMissingSemicolon) { EXPECT("fn f() { loop { break } }", - "test.wgsl:1:23 error: expected ';' for break statement\n" - "fn f() { loop { break } }\n" - " ^\n"); + R"(test.wgsl:1:23 error: expected ';' for break statement +fn f() { loop { break } } + ^ +)"); } TEST_F(ParserImplErrorTest, CallExprMissingRParen) { EXPECT("fn f() { x = f(1.; }", - "test.wgsl:1:18 error: expected ')' for function call\n" - "fn f() { x = f(1.; }\n" - " ^\n"); + R"(test.wgsl:1:18 error: expected ')' for function call +fn f() { x = f(1.; } + ^ +)"); } TEST_F(ParserImplErrorTest, CallStmtMissingRParen) { EXPECT("fn f() { f(1.; }", - "test.wgsl:1:14 error: expected ')' for function call\n" - "fn f() { f(1.; }\n" - " ^\n"); + R"(test.wgsl:1:14 error: expected ')' for function call +fn f() { f(1.; } + ^ +)"); } TEST_F(ParserImplErrorTest, CallStmtInvalidArgument0) { EXPECT("fn f() { f(<); }", - "test.wgsl:1:12 error: expected ')' for function call\n" - "fn f() { f(<); }\n" - " ^\n"); + R"(test.wgsl:1:12 error: expected ')' for function call +fn f() { f(<); } + ^ +)"); } TEST_F(ParserImplErrorTest, CallStmtInvalidArgument1) { EXPECT("fn f() { f(1.0, <); }", - "test.wgsl:1:17 error: expected ')' for function call\n" - "fn f() { f(1.0, <); }\n" - " ^\n"); + R"(test.wgsl:1:17 error: expected ')' for function call +fn f() { f(1.0, <); } + ^ +)"); } TEST_F(ParserImplErrorTest, CallStmtMissingSemicolon) { EXPECT("fn f() { f() }", - "test.wgsl:1:14 error: expected ';' for function call\n" - "fn f() { f() }\n" - " ^\n"); + R"(test.wgsl:1:14 error: expected ';' for function call +fn f() { f() } + ^ +)"); } TEST_F(ParserImplErrorTest, ConstructorExprMissingLParen) { EXPECT("fn f() { x = vec21,2); }", - "test.wgsl:1:23 error: expected '(' for type constructor\n" - "fn f() { x = vec21,2); }\n" - " ^\n"); + R"(test.wgsl:1:23 error: expected '(' for type constructor +fn f() { x = vec21,2); } + ^ +)"); } TEST_F(ParserImplErrorTest, ConstructorExprMissingRParen) { EXPECT("fn f() { x = vec2(1,2; }", - "test.wgsl:1:27 error: expected ')' for type constructor\n" - "fn f() { x = vec2(1,2; }\n" - " ^\n"); + R"(test.wgsl:1:27 error: expected ')' for type constructor +fn f() { x = vec2(1,2; } + ^ +)"); } TEST_F(ParserImplErrorTest, ConstVarStmtInvalid) { EXPECT("fn f() { let >; }", - "test.wgsl:1:14 error: expected identifier for let declaration\n" - "fn f() { let >; }\n" - " ^\n"); + R"(test.wgsl:1:14 error: expected identifier for let declaration +fn f() { let >; } + ^ +)"); } TEST_F(ParserImplErrorTest, ConstVarStmtMissingAssignment) { EXPECT("fn f() { let a : i32; }", - "test.wgsl:1:21 error: expected '=' for let declaration\n" - "fn f() { let a : i32; }\n" - " ^\n"); + R"(test.wgsl:1:21 error: expected '=' for let declaration +fn f() { let a : i32; } + ^ +)"); } TEST_F(ParserImplErrorTest, ConstVarStmtMissingConstructor) { EXPECT("fn f() { let a : i32 = >; }", - "test.wgsl:1:24 error: missing constructor for let declaration\n" - "fn f() { let a : i32 = >; }\n" - " ^\n"); + R"(test.wgsl:1:24 error: missing constructor for let declaration +fn f() { let a : i32 = >; } + ^ +)"); } TEST_F(ParserImplErrorTest, ContinueStmtMissingSemicolon) { EXPECT("fn f() { loop { continue } }", - "test.wgsl:1:26 error: expected ';' for continue statement\n" - "fn f() { loop { continue } }\n" - " ^\n"); + R"(test.wgsl:1:26 error: expected ';' for continue statement +fn f() { loop { continue } } + ^ +)"); } TEST_F(ParserImplErrorTest, DiscardStmtMissingSemicolon) { EXPECT("fn f() { discard }", - "test.wgsl:1:18 error: expected ';' for discard statement\n" - "fn f() { discard }\n" - " ^\n"); + R"(test.wgsl:1:18 error: expected ';' for discard statement +fn f() { discard } + ^ +)"); } TEST_F(ParserImplErrorTest, EqualityInvalidExpr) { EXPECT("fn f() { return 1 == >; }", - "test.wgsl:1:22 error: unable to parse right side of == expression\n" - "fn f() { return 1 == >; }\n" - " ^\n"); + R"(test.wgsl:1:22 error: unable to parse right side of == expression +fn f() { return 1 == >; } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopInitializerMissingSemicolon) { EXPECT("fn f() { for (var i : i32 = 0 i < 8; i=i+1) {} }", - "test.wgsl:1:31 error: expected ';' for initializer in for loop\n" - "fn f() { for (var i : i32 = 0 i < 8; i=i+1) {} }\n" - " ^\n"); + R"(test.wgsl:1:31 error: expected ';' for initializer in for loop +fn f() { for (var i : i32 = 0 i < 8; i=i+1) {} } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopInitializerMissingVar) { EXPECT("fn f() { for (i : i32 = 0; i < 8; i=i+1) {} }", - "test.wgsl:1:15 error: expected 'var' for variable declaration\n" - "fn f() { for (i : i32 = 0; i < 8; i=i+1) {} }\n" - " ^\n"); + R"(test.wgsl:1:15 error: expected 'var' for variable declaration +fn f() { for (i : i32 = 0; i < 8; i=i+1) {} } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopConditionMissingSemicolon) { EXPECT("fn f() { for (var i : i32 = 0; i < 8 i=i+1) {} }", - "test.wgsl:1:38 error: expected ';' for condition in for loop\n" - "fn f() { for (var i : i32 = 0; i < 8 i=i+1) {} }\n" - " ^\n"); + R"(test.wgsl:1:38 error: expected ';' for condition in for loop +fn f() { for (var i : i32 = 0; i < 8 i=i+1) {} } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopMissingLParen) { EXPECT("fn f() { for var i : i32 = 0; i < 8; i=i+1) {} }", - "test.wgsl:1:14 error: expected '(' for for loop\n" - "fn f() { for var i : i32 = 0; i < 8; i=i+1) {} }\n" - " ^^^\n"); + R"(test.wgsl:1:14 error: expected '(' for for loop +fn f() { for var i : i32 = 0; i < 8; i=i+1) {} } + ^^^ +)"); } TEST_F(ParserImplErrorTest, ForLoopMissingRParen) { EXPECT("fn f() { for (var i : i32 = 0; i < 8; i=i+1 {} }", - "test.wgsl:1:45 error: expected ')' for for loop\n" - "fn f() { for (var i : i32 = 0; i < 8; i=i+1 {} }\n" - " ^\n"); + R"(test.wgsl:1:45 error: expected ')' for for loop +fn f() { for (var i : i32 = 0; i < 8; i=i+1 {} } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopMissingLBrace) { EXPECT("fn f() { for (var i : i32 = 0; i < 8; i=i+1) }", - "test.wgsl:1:46 error: expected '{' for for loop\n" - "fn f() { for (var i : i32 = 0; i < 8; i=i+1) }\n" - " ^\n"); + R"(test.wgsl:1:46 error: expected '{' for for loop +fn f() { for (var i : i32 = 0; i < 8; i=i+1) } + ^ +)"); } TEST_F(ParserImplErrorTest, ForLoopMissingRBrace) { EXPECT("fn f() { for (var i : i32 = 0; i < 8; i=i+1) {", - "test.wgsl:1:47 error: expected '}' for for loop\n" - "fn f() { for (var i : i32 = 0; i < 8; i=i+1) {\n" - " ^\n"); -} - -TEST_F(ParserImplErrorTest, FunctionDeclDecoMissingEnd) { - EXPECT("[[stage(vertex) fn f() {}", - "test.wgsl:1:17 error: expected ']]' for decoration list\n" - "[[stage(vertex) fn f() {}\n" - " ^^\n"); + R"(test.wgsl:1:47 error: expected '}' for for loop +fn f() { for (var i : i32 = 0; i < 8; i=i+1) { + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoStageMissingLParen) { - EXPECT("[[stage vertex]] fn f() {}", - "test.wgsl:1:9 error: expected '(' for stage decoration\n" - "[[stage vertex]] fn f() {}\n" - " ^^^^^^\n"); + EXPECT( + "@stage vertex) fn f() {}", + R"(test.wgsl:1:8 error: expected '(' for stage decoration +@stage vertex) fn f() {} + ^^^^^^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoStageMissingRParen) { - EXPECT("[[stage(vertex]] fn f() {}", - "test.wgsl:1:15 error: expected ')' for stage decoration\n" - "[[stage(vertex]] fn f() {}\n" - " ^^\n"); + EXPECT( + "@stage(vertex fn f() {}", + R"(test.wgsl:1:15 error: expected ')' for stage decoration +@stage(vertex fn f() {} + ^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_FunctionDeclDecoStageMissingLParen) { + EXPECT( + "[[stage vertex]] fn f() {}", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[stage vertex]] fn f() {} +^^ + +test.wgsl:1:9 error: expected '(' for stage decoration +[[stage vertex]] fn f() {} + ^^^^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_FunctionDeclDecoStageMissingRParen) { + EXPECT( + "[[stage(vertex]] fn f() {}", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[stage(vertex]] fn f() {} +^^ + +test.wgsl:1:15 error: expected ')' for stage decoration +[[stage(vertex]] fn f() {} + ^^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoStageInvalid) { - EXPECT("[[stage(x)]] fn f() {}", - "test.wgsl:1:9 error: invalid value for stage decoration\n" - "[[stage(x)]] fn f() {}\n" - " ^\n"); + EXPECT("@stage(x) fn f() {}", + R"(test.wgsl:1:8 error: invalid value for stage decoration +@stage(x) fn f() {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoStageTypeInvalid) { - EXPECT("[[shader(vertex)]] fn main() {}", - "test.wgsl:1:3 error: expected decoration\n" - "[[shader(vertex)]] fn main() {}\n" - " ^^^^^^\n"); + EXPECT("@shader(vertex) fn main() {}", + R"(test.wgsl:1:2 error: expected decoration +@shader(vertex) fn main() {} + ^^^^^^ + +test.wgsl:1:8 error: unexpected token +@shader(vertex) fn main() {} + ^ +)"); } -TEST_F(ParserImplErrorTest, FunctionDeclDecoWorkgroupSizeMissingLParen) { - EXPECT("[[workgroup_size 1]] fn f() {}", - "test.wgsl:1:18 error: expected '(' for workgroup_size decoration\n" - "[[workgroup_size 1]] fn f() {}\n" - " ^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_FunctionDeclDecoWorkgroupSizeMissingLParen) { + EXPECT( + "[[workgroup_size 1]] fn f() {}", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[workgroup_size 1]] fn f() {} +^^ + +test.wgsl:1:18 error: expected '(' for workgroup_size decoration +[[workgroup_size 1]] fn f() {} + ^ +)"); } -TEST_F(ParserImplErrorTest, FunctionDeclDecoWorkgroupSizeMissingRParen) { - EXPECT("[[workgroup_size(1]] fn f() {}", - "test.wgsl:1:19 error: expected ')' for workgroup_size decoration\n" - "[[workgroup_size(1]] fn f() {}\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_FunctionDeclDecoWorkgroupSizeMissingRParen) { + EXPECT( + "[[workgroup_size(1]] fn f() {}", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[workgroup_size(1]] fn f() {} +^^ + +test.wgsl:1:19 error: expected ')' for workgroup_size decoration +[[workgroup_size(1]] fn f() {} + ^^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoWorkgroupSizeXInvalid) { - EXPECT("[[workgroup_size()]] fn f() {}", - "test.wgsl:1:18 error: expected workgroup_size x parameter\n" - "[[workgroup_size()]] fn f() {}\n" - " ^\n"); + EXPECT("@workgroup_size() fn f() {}", + R"(test.wgsl:1:17 error: expected workgroup_size x parameter +@workgroup_size() fn f() {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoWorkgroupSizeYInvalid) { - EXPECT("[[workgroup_size(1, )]] fn f() {}", - "test.wgsl:1:21 error: expected workgroup_size y parameter\n" - "[[workgroup_size(1, )]] fn f() {}\n" - " ^\n"); + EXPECT("@workgroup_size(1, ) fn f() {}", + R"(test.wgsl:1:20 error: expected workgroup_size y parameter +@workgroup_size(1, ) fn f() {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclDecoWorkgroupSizeZInvalid) { - EXPECT("[[workgroup_size(1, 2, )]] fn f() {}", - "test.wgsl:1:24 error: expected workgroup_size z parameter\n" - "[[workgroup_size(1, 2, )]] fn f() {}\n" - " ^\n"); + EXPECT("@workgroup_size(1, 2, ) fn f() {}", + R"(test.wgsl:1:23 error: expected workgroup_size z parameter +@workgroup_size(1, 2, ) fn f() {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingIdentifier) { EXPECT("fn () {}", - "test.wgsl:1:4 error: expected identifier for function declaration\n" - "fn () {}\n" - " ^\n"); + R"(test.wgsl:1:4 error: expected identifier for function declaration +fn () {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingLParen) { EXPECT("fn f) {}", - "test.wgsl:1:5 error: expected '(' for function declaration\n" - "fn f) {}\n" - " ^\n"); + R"(test.wgsl:1:5 error: expected '(' for function declaration +fn f) {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingRParen) { EXPECT("fn f( {}", - "test.wgsl:1:7 error: expected ')' for function declaration\n" - "fn f( {}\n" - " ^\n"); + R"(test.wgsl:1:7 error: expected ')' for function declaration +fn f( {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingArrow) { - EXPECT("fn f() f32 {}", - "test.wgsl:1:8 error: expected '{'\n" - "fn f() f32 {}\n" - " ^^^\n"); + EXPECT("fn f() f32 {}", R"(test.wgsl:1:8 error: expected '{' +fn f() f32 {} + ^^^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclInvalidReturnType) { EXPECT("fn f() -> 1 {}", - "test.wgsl:1:11 error: unable to determine function return type\n" - "fn f() -> 1 {}\n" - " ^\n"); + R"(test.wgsl:1:11 error: unable to determine function return type +fn f() -> 1 {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclParamMissingColon) { - EXPECT("fn f(x) {}", - "test.wgsl:1:7 error: expected ':' for parameter\n" - "fn f(x) {}\n" - " ^\n"); + EXPECT("fn f(x) {}", R"(test.wgsl:1:7 error: expected ':' for parameter +fn f(x) {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclParamInvalidType) { - EXPECT("fn f(x : 1) {}", - "test.wgsl:1:10 error: invalid type for parameter\n" - "fn f(x : 1) {}\n" - " ^\n"); + EXPECT("fn f(x : 1) {}", R"(test.wgsl:1:10 error: invalid type for parameter +fn f(x : 1) {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclParamMissing) { EXPECT("fn f(x : i32, ,) {}", - "test.wgsl:1:15 error: expected ')' for function declaration\n" - "fn f(x : i32, ,) {}\n" - " ^\n"); + R"(test.wgsl:1:15 error: expected ')' for function declaration +fn f(x : i32, ,) {} + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingLBrace) { - EXPECT("fn f() }", - "test.wgsl:1:8 error: expected '{'\n" - "fn f() }\n" - " ^\n"); + EXPECT("fn f() }", R"(test.wgsl:1:8 error: expected '{' +fn f() } + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionDeclMissingRBrace) { - EXPECT("fn f() {", - "test.wgsl:1:9 error: expected '}'\n" - "fn f() {\n" - " ^\n"); + EXPECT("fn f() {", R"(test.wgsl:1:9 error: expected '}' +fn f() { + ^ +)"); } TEST_F(ParserImplErrorTest, FunctionScopeUnusedDecl) { - EXPECT("fn f(a:i32)->i32{return a;[[size(1)]]}", - "test.wgsl:1:29 error: unexpected decorations\n" - "fn f(a:i32)->i32{return a;[[size(1)]]}\n" - " ^^^^\n"); + EXPECT("fn f(a:i32)->i32{return a;@size(1)}", + R"(test.wgsl:1:28 error: unexpected decorations +fn f(a:i32)->i32{return a;@size(1)} + ^^^^ +)"); } TEST_F(ParserImplErrorTest, FunctionMissingOpenLine) { @@ -427,64 +531,72 @@ TEST_F(ParserImplErrorTest, FunctionMissingOpenLine) { var a : f32 = bar[0]; return; })", - "test.wgsl:2:17 error: unable to parse const_expr\n" - " var a : f32 = bar[0];\n" - " ^^^\n" - "\n" - "test.wgsl:3:3 error: statement found outside of function body\n" - " return;\n" - " ^^^^^^\n"); + R"(test.wgsl:2:17 error: unable to parse const_expr + var a : f32 = bar[0]; + ^^^ + +test.wgsl:3:3 error: statement found outside of function body + return; + ^^^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstInvalidIdentifier) { EXPECT("let ^ : i32 = 1;", - "test.wgsl:1:5 error: expected identifier for let declaration\n" - "let ^ : i32 = 1;\n" - " ^\n"); + R"(test.wgsl:1:5 error: expected identifier for let declaration +let ^ : i32 = 1; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstMissingSemicolon) { EXPECT("let i : i32 = 1", - "test.wgsl:1:16 error: expected ';' for let declaration\n" - "let i : i32 = 1\n" - " ^\n"); + R"(test.wgsl:1:16 error: expected ';' for let declaration +let i : i32 = 1 + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstMissingLParen) { EXPECT("let i : vec2 = vec2;", - "test.wgsl:1:30 error: expected '(' for type constructor\n" - "let i : vec2 = vec2;\n" - " ^\n"); + R"(test.wgsl:1:30 error: expected '(' for type constructor +let i : vec2 = vec2; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstMissingRParen) { EXPECT("let i : vec2 = vec2(1., 2.;", - "test.wgsl:1:37 error: expected ')' for type constructor\n" - "let i : vec2 = vec2(1., 2.;\n" - " ^\n"); + R"(test.wgsl:1:37 error: expected ')' for type constructor +let i : vec2 = vec2(1., 2.; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstBadConstLiteral) { EXPECT("let i : vec2 = vec2(!);", - "test.wgsl:1:31 error: unable to parse const_expr\n" - "let i : vec2 = vec2(!);\n" - " ^\n"); + R"(test.wgsl:1:31 error: unable to parse const_expr +let i : vec2 = vec2(!); + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstBadConstLiteralSpaceLessThan) { EXPECT("let i = 1 < 2;", - "test.wgsl:1:11 error: expected \';\' for let declaration\n" - "let i = 1 < 2;\n" - " ^\n"); + R"(test.wgsl:1:11 error: expected ';' for let declaration +let i = 1 < 2; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstNotConstExpr) { EXPECT( "let a = 1;\n" "let b = a;", - "test.wgsl:2:9 error: unable to parse const_expr\n" - "let b = a;\n" - " ^\n"); + R"(test.wgsl:2:9 error: unable to parse const_expr +let b = a; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstExprMaxDepth) { @@ -516,767 +628,1080 @@ TEST_F(ParserImplErrorTest, GlobalDeclConstExprMaxDepth) { TEST_F(ParserImplErrorTest, GlobalDeclConstExprMissingLParen) { EXPECT("let i : vec2 = vec2 1, 2);", - "test.wgsl:1:31 error: expected '(' for type constructor\n" - "let i : vec2 = vec2 1, 2);\n" - " ^\n"); + R"(test.wgsl:1:31 error: expected '(' for type constructor +let i : vec2 = vec2 1, 2); + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclConstExprMissingRParen) { EXPECT("let i : vec2 = vec2(1, 2;", - "test.wgsl:1:35 error: expected ')' for type constructor\n" - "let i : vec2 = vec2(1, 2;\n" - " ^\n"); + R"(test.wgsl:1:35 error: expected ')' for type constructor +let i : vec2 = vec2(1, 2; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclInvalidDeco) { - EXPECT("[[stage(vertex)]] x;", - "test.wgsl:1:19 error: expected declaration after decorations\n" - "[[stage(vertex)]] x;\n" - " ^\n"); + EXPECT("@stage(vertex) x;", + R"(test.wgsl:1:16 error: expected declaration after decorations +@stage(vertex) x; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclSampledTextureMissingLessThan) { EXPECT("var x : texture_1d;", - "test.wgsl:1:19 error: expected '<' for sampled texture type\n" - "var x : texture_1d;\n" - " ^\n"); + R"(test.wgsl:1:19 error: expected '<' for sampled texture type +var x : texture_1d; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclSampledTextureMissingGreaterThan) { EXPECT("var x : texture_1d' for sampled texture type\n" - "var x : texture_1d' for sampled texture type +var x : texture_1d;", - "test.wgsl:1:20 error: invalid type for sampled texture type\n" - "var x : texture_1d<1>;\n" - " ^\n"); + R"(test.wgsl:1:20 error: invalid type for sampled texture type +var x : texture_1d<1>; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclMultisampledTextureMissingLessThan) { EXPECT("var x : texture_multisampled_2d;", - "test.wgsl:1:32 error: expected '<' for multisampled texture type\n" - "var x : texture_multisampled_2d;\n" - " ^\n"); + R"(test.wgsl:1:32 error: expected '<' for multisampled texture type +var x : texture_multisampled_2d; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclMultisampledTextureMissingGreaterThan) { EXPECT("var x : texture_multisampled_2d' for multisampled texture type\n" - "var x : texture_multisampled_2d' for multisampled texture type +var x : texture_multisampled_2d;", - "test.wgsl:1:33 error: invalid type for multisampled texture type\n" - "var x : texture_multisampled_2d<1>;\n" - " ^\n"); + R"(test.wgsl:1:33 error: invalid type for multisampled texture type +var x : texture_multisampled_2d<1>; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStorageTextureMissingLessThan) { EXPECT("var x : texture_storage_2d;", - "test.wgsl:1:27 error: expected '<' for storage texture type\n" - "var x : texture_storage_2d;\n" - " ^\n"); + R"(test.wgsl:1:27 error: expected '<' for storage texture type +var x : texture_storage_2d; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStorageTextureMissingGreaterThan) { EXPECT("var x : texture_storage_2d' for storage texture type\n" - "var x : texture_storage_2d' for storage texture type +var x : texture_storage_2d;", - "test.wgsl:1:28 error: invalid format for storage texture type\n" - "var x : texture_storage_2d<>;\n" - " ^\n"); + R"(test.wgsl:1:28 error: invalid format for storage texture type +var x : texture_storage_2d<>; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStorageTextureMissingInvalidSubtype) { EXPECT("var x : texture_storage_2d<1>;", - "test.wgsl:1:28 error: invalid format for storage texture type\n" - "var x : texture_storage_2d<1>;\n" - " ^\n"); + R"(test.wgsl:1:28 error: invalid format for storage texture type +var x : texture_storage_2d<1>; + ^ +)"); } // TODO(crbug.com/tint/1324): DEPRECATED: Remove when [[block]] is removed. -TEST_F(ParserImplErrorTest, GlobalDeclStructDecoMissingStruct) { - EXPECT("[[block]];", - "test.wgsl:1:3 warning: use of deprecated language feature: [[block]] " - "attributes have been removed from WGSL\n" - "[[block]];\n" - " ^^^^^\n\n" - "test.wgsl:1:10 error: expected declaration after decorations\n" - "[[block]];\n" - " ^\n"); +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclStructDecoMissingStruct) { + EXPECT( + "[[block]];", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[block]]; +^^ + +test.wgsl:1:3 warning: use of deprecated language feature: [[block]] attributes have been removed from WGSL +[[block]]; + ^^^^^ + +test.wgsl:1:10 error: expected declaration after decorations +[[block]]; + ^ +)"); } // TODO(crbug.com/tint/1324): DEPRECATED: Remove when [[block]] is removed. -TEST_F(ParserImplErrorTest, GlobalDeclStructDecoMissingEnd) { - EXPECT("[[block struct {};", - "test.wgsl:1:3 warning: use of deprecated language feature: [[block]] " - "attributes have been removed from WGSL\n" - "[[block struct {};\n" - " ^^^^^\n\n" - "test.wgsl:1:9 error: expected ']]' for decoration list\n" - "[[block struct {};\n" - " ^^^^^^\n"); +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclStructDecoMissingEnd) { + EXPECT( + "[[block struct {};", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[block struct {}; +^^ + +test.wgsl:1:3 warning: use of deprecated language feature: [[block]] attributes have been removed from WGSL +[[block struct {}; + ^^^^^ + +test.wgsl:1:9 error: expected ']]' for decoration list +[[block struct {}; + ^^^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructDeclMissingIdentifier) { EXPECT("struct {};", - "test.wgsl:1:8 error: expected identifier for struct declaration\n" - "struct {};\n" - " ^\n"); + R"(test.wgsl:1:8 error: expected identifier for struct declaration +struct {}; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructDeclMissingLBrace) { EXPECT("struct S };", - "test.wgsl:1:10 error: expected '{' for struct declaration\n" - "struct S };\n" - " ^\n"); + R"(test.wgsl:1:10 error: expected '{' for struct declaration +struct S }; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructDeclMissingRBrace) { EXPECT("struct S { i : i32;", - "test.wgsl:1:20 error: expected '}' for struct declaration\n" - "struct S { i : i32;\n" - " ^\n"); + R"(test.wgsl:1:20 error: expected '}' for struct declaration +struct S { i : i32; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberDecoEmpty) { - EXPECT("struct S { [[]] i : i32; };", - "test.wgsl:1:14 error: empty decoration list\n" - "struct S { [[]] i : i32; };\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclStructMemberDecoEmpty) { + EXPECT( + "struct S { [[]] i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[]] i : i32; }; + ^^ + +test.wgsl:1:14 error: empty decoration list +struct S { [[]] i : i32; }; + ^^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberDecoMissingEnd) { - EXPECT("struct S { [[ i : i32; };", - "test.wgsl:1:15 error: expected decoration\n" - "struct S { [[ i : i32; };\n" - " ^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclStructMemberDecoMissingEnd) { + EXPECT( + "struct S { [[ i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[ i : i32; }; + ^^ + +test.wgsl:1:15 error: expected decoration +struct S { [[ i : i32; }; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberInvalidIdentifier) { EXPECT("struct S { 1 : i32; };", - "test.wgsl:1:12 error: expected identifier for struct member\n" - "struct S { 1 : i32; };\n" - " ^\n"); + R"(test.wgsl:1:12 error: expected identifier for struct member +struct S { 1 : i32; }; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberMissingSemicolon) { EXPECT("struct S { i : i32 };", - "test.wgsl:1:20 error: expected ';' for struct member\n" - "struct S { i : i32 };\n" - " ^\n"); + R"(test.wgsl:1:20 error: expected ';' for struct member +struct S { i : i32 }; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberAlignMissingLParen) { - EXPECT("struct S { [[align 1)]] i : i32; };", - "test.wgsl:1:20 error: expected '(' for align decoration\n" - "struct S { [[align 1)]] i : i32; };\n" - " ^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclStructMemberAlignMissingLParen) { + EXPECT( + "struct S { [[align 1)]] i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[align 1)]] i : i32; }; + ^^ + +test.wgsl:1:20 error: expected '(' for align decoration +struct S { [[align 1)]] i : i32; }; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberAlignMissingRParen) { - EXPECT("struct S { [[align(1]] i : i32; };", - "test.wgsl:1:21 error: expected ')' for align decoration\n" - "struct S { [[align(1]] i : i32; };\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclStructMemberAlignMissingRParen) { + EXPECT( + "struct S { [[align(1]] i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[align(1]] i : i32; }; + ^^ + +test.wgsl:1:21 error: expected ')' for align decoration +struct S { [[align(1]] i : i32; }; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberAlignInvaldValue) { - EXPECT("struct S { [[align(x)]] i : i32; };", - "test.wgsl:1:20 error: expected signed integer literal for align " - "decoration\n" - "struct S { [[align(x)]] i : i32; };\n" - " ^\n"); + EXPECT( + "struct S { @align(x) i : i32; };", + R"(test.wgsl:1:19 error: expected signed integer literal for align decoration +struct S { @align(x) i : i32; }; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberAlignNegativeValue) { - EXPECT("struct S { [[align(-2)]] i : i32; };", - "test.wgsl:1:20 error: align decoration must be positive\n" - "struct S { [[align(-2)]] i : i32; };\n" - " ^^\n"); + EXPECT("struct S { @align(-2) i : i32; };", + R"(test.wgsl:1:19 error: align decoration must be positive +struct S { @align(-2) i : i32; }; + ^^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberSizeMissingLParen) { - EXPECT("struct S { [[size 1)]] i : i32; };", - "test.wgsl:1:19 error: expected '(' for size decoration\n" - "struct S { [[size 1)]] i : i32; };\n" - " ^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclStructMemberSizeMissingLParen) { + EXPECT( + "struct S { [[size 1)]] i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[size 1)]] i : i32; }; + ^^ + +test.wgsl:1:19 error: expected '(' for size decoration +struct S { [[size 1)]] i : i32; }; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclStructMemberSizeMissingRParen) { - EXPECT("struct S { [[size(1]] i : i32; };", - "test.wgsl:1:20 error: expected ')' for size decoration\n" - "struct S { [[size(1]] i : i32; };\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclStructMemberSizeMissingRParen) { + EXPECT( + "struct S { [[size(1]] i : i32; };", + R"(test.wgsl:1:12 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +struct S { [[size(1]] i : i32; }; + ^^ + +test.wgsl:1:20 error: expected ')' for size decoration +struct S { [[size(1]] i : i32; }; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberSizeInvaldValue) { - EXPECT("struct S { [[size(x)]] i : i32; };", - "test.wgsl:1:19 error: expected signed integer literal for size " - "decoration\n" - "struct S { [[size(x)]] i : i32; };\n" - " ^\n"); + EXPECT( + "struct S { @size(x) i : i32; };", + R"(test.wgsl:1:18 error: expected signed integer literal for size decoration +struct S { @size(x) i : i32; }; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclStructMemberSizeNegativeValue) { - EXPECT("struct S { [[size(-2)]] i : i32; };", - "test.wgsl:1:19 error: size decoration must be positive\n" - "struct S { [[size(-2)]] i : i32; };\n" - " ^^\n"); + EXPECT("struct S { @size(-2) i : i32; };", + R"(test.wgsl:1:18 error: size decoration must be positive +struct S { @size(-2) i : i32; }; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclTypeAliasMissingIdentifier) { EXPECT("type 1 = f32;", - "test.wgsl:1:6 error: expected identifier for type alias\n" - "type 1 = f32;\n" - " ^\n"); + R"(test.wgsl:1:6 error: expected identifier for type alias +type 1 = f32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclTypeAliasInvalidType) { - EXPECT("type meow = 1;", - "test.wgsl:1:13 error: invalid type alias\n" - "type meow = 1;\n" - " ^\n"); + EXPECT("type meow = 1;", R"(test.wgsl:1:13 error: invalid type alias +type meow = 1; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclTypeAliasMissingAssignment) { - EXPECT("type meow f32", - "test.wgsl:1:11 error: expected '=' for type alias\n" - "type meow f32\n" - " ^^^\n"); + EXPECT("type meow f32", R"(test.wgsl:1:11 error: expected '=' for type alias +type meow f32 + ^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclTypeAliasMissingSemicolon) { - EXPECT("type meow = f32", - "test.wgsl:1:16 error: expected ';' for type alias\n" - "type meow = f32\n" - " ^\n"); + EXPECT("type meow = f32", R"(test.wgsl:1:16 error: expected ';' for type alias +type meow = f32 + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclTypeDecoInvalid) { - EXPECT("var x : [[]] i32;", - "test.wgsl:1:11 error: empty decoration list\n" - "var x : [[]] i32;\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclTypeDecoInvalid) { + EXPECT( + "var x : [[]] i32;", + R"(test.wgsl:1:9 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +var x : [[]] i32; + ^^ + +test.wgsl:1:11 error: empty decoration list +var x : [[]] i32; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayMissingLessThan) { EXPECT("var i : array;", - "test.wgsl:1:14 error: expected '<' for array declaration\n" - "var i : array;\n" - " ^\n"); + R"(test.wgsl:1:14 error: expected '<' for array declaration +var i : array; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayMissingGreaterThan) { EXPECT("var i : array' for array declaration\n" - "var i : array' for array declaration +var i : array;", - "test.wgsl:1:21 error: expected ']]' for decoration list\n" - "var i : [[stride(1) array;\n" - " ^^^^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarArrayDecoMissingEnd) { + EXPECT( + "var i : [[stride(1) array;", + R"(test.wgsl:1:9 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +var i : [[stride(1) array; + ^^ + +test.wgsl:1:21 error: expected ']]' for decoration list +var i : [[stride(1) array; + ^^^^^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclVarArrayDecoStrideMissingLParen) { - EXPECT("var i : [[stride 1)]] array;", - "test.wgsl:1:18 error: expected '(' for stride decoration\n" - "var i : [[stride 1)]] array;\n" - " ^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclVarArrayDecoStrideMissingLParen) { + EXPECT( + "var i : [[stride 1)]] array;", + R"(test.wgsl:1:9 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +var i : [[stride 1)]] array; + ^^ + +test.wgsl:1:18 error: expected '(' for stride decoration +var i : [[stride 1)]] array; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclVarArrayDecoStrideMissingRParen) { - EXPECT("var i : [[stride(1]] array;", - "test.wgsl:1:19 error: expected ')' for stride decoration\n" - "var i : [[stride(1]] array;\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, + DEPRECATED_GlobalDeclVarArrayDecoStrideMissingRParen) { + EXPECT( + "var i : [[stride(1]] array;", + R"(test.wgsl:1:9 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +var i : [[stride(1]] array; + ^^ + +test.wgsl:1:19 error: expected ')' for stride decoration +var i : [[stride(1]] array; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayDecoStrideInvalid) { - EXPECT("var i : [[stride(x)]] array;", - "test.wgsl:1:18 error: expected signed integer literal for stride " - "decoration\n" - "var i : [[stride(x)]] array;\n" - " ^\n"); + EXPECT( + "var i : @stride(x) array;", + R"(test.wgsl:1:17 error: expected signed integer literal for stride decoration +var i : @stride(x) array; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayDecoStrideNegative) { - EXPECT("var i : [[stride(-1)]] array;", - "test.wgsl:1:18 error: stride decoration must be greater than 0\n" - "var i : [[stride(-1)]] array;\n" - " ^^\n"); + EXPECT("var i : @stride(-1) array;", + R"(test.wgsl:1:17 error: stride decoration must be greater than 0 +var i : @stride(-1) array; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayMissingType) { EXPECT("var i : array<1, 3>;", - "test.wgsl:1:15 error: invalid type for array declaration\n" - "var i : array<1, 3>;\n" - " ^\n"); + R"(test.wgsl:1:15 error: invalid type for array declaration +var i : array<1, 3>; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayMissingSize) { EXPECT("var i : array;", - "test.wgsl:1:20 error: expected array size expression\n" - "var i : array;\n" - " ^\n"); + R"(test.wgsl:1:20 error: expected array size expression +var i : array; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarArrayInvalidSize) { EXPECT("var i : array;", - "test.wgsl:1:20 error: expected array size expression\n" - "var i : array;\n" - " ^\n"); + R"(test.wgsl:1:20 error: expected array size expression +var i : array; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclVarDecoListEmpty) { - EXPECT("[[]] var i : i32;", - "test.wgsl:1:3 error: empty decoration list\n" - "[[]] var i : i32;\n" - " ^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoListEmpty) { + EXPECT( + "[[]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[]] var i : i32; +^^ + +test.wgsl:1:3 error: empty decoration list +[[]] var i : i32; + ^^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclVarDecoListInvalid) { - EXPECT("[[location(1), meow]] var i : i32;", - "test.wgsl:1:16 error: expected decoration\n" - "[[location(1), meow]] var i : i32;\n" - " ^^^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoListInvalid) { + EXPECT( + "[[location(1), meow]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[location(1), meow]] var i : i32; +^^ + +test.wgsl:1:16 error: expected decoration +[[location(1), meow]] var i : i32; + ^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoListMissingComma) { - EXPECT("[[location(1) group(2)]] var i : i32;", - "test.wgsl:1:15 error: expected ',' for decoration list\n" - "[[location(1) group(2)]] var i : i32;\n" - " ^^^^^\n"); + EXPECT("@location(1) group(2) var i : i32;", + R"(test.wgsl:1:14 error: expected declaration after decorations +@location(1) group(2) var i : i32; + ^^^^^ + +test.wgsl:1:19 error: unexpected token +@location(1) group(2) var i : i32; + ^ +)"); } -TEST_F(ParserImplErrorTest, GlobalDeclVarDecoListMissingEnd) { - EXPECT("[[location(1) meow]] var i : i32;", - "test.wgsl:1:15 error: expected ']]' for decoration list\n" - "[[location(1) meow]] var i : i32;\n" - " ^^^^\n"); +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoListMissingEnd) { + EXPECT( + "[[location(1) meow]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[location(1) meow]] var i : i32; +^^ + +test.wgsl:1:15 error: expected ']]' for decoration list +[[location(1) meow]] var i : i32; + ^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationMissingLParen) { - EXPECT("[[location 1]] var i : i32;", - "test.wgsl:1:12 error: expected '(' for location decoration\n" - "[[location 1]] var i : i32;\n" - " ^\n"); + EXPECT( + "@location 1) var i : i32;", + R"(test.wgsl:1:11 error: expected '(' for location decoration +@location 1) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationMissingRParen) { - EXPECT("[[location (1]] var i : i32;", - "test.wgsl:1:14 error: expected ')' for location decoration\n" - "[[location (1]] var i : i32;\n" - " ^^\n"); + EXPECT( + "@location (1 var i : i32;", + R"(test.wgsl:1:14 error: expected ')' for location decoration +@location (1 var i : i32; + ^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoLocationMissingLParen) { + EXPECT( + "[[location 1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[location 1]] var i : i32; +^^ + +test.wgsl:1:12 error: expected '(' for location decoration +[[location 1]] var i : i32; + ^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoLocationMissingRParen) { + EXPECT( + "[[location (1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[location (1]] var i : i32; +^^ + +test.wgsl:1:14 error: expected ')' for location decoration +[[location (1]] var i : i32; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationInvalidValue) { - EXPECT("[[location(x)]] var i : i32;", - "test.wgsl:1:12 error: expected signed integer literal for location " - "decoration\n" - "[[location(x)]] var i : i32;\n" - " ^\n"); + EXPECT( + "@location(x) var i : i32;", + R"(test.wgsl:1:11 error: expected signed integer literal for location decoration +@location(x) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinMissingLParen) { - EXPECT("[[builtin position]] var i : i32;", - "test.wgsl:1:11 error: expected '(' for builtin decoration\n" - "[[builtin position]] var i : i32;\n" - " ^^^^^^^^\n"); + EXPECT( + "@builtin position) var i : i32;", + R"(test.wgsl:1:10 error: expected '(' for builtin decoration +@builtin position) var i : i32; + ^^^^^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinMissingRParen) { - EXPECT("[[builtin(position]] var i : i32;", - "test.wgsl:1:19 error: expected ')' for builtin decoration\n" - "[[builtin(position]] var i : i32;\n" - " ^^\n"); + EXPECT( + "@builtin(position var i : i32;", + R"(test.wgsl:1:19 error: expected ')' for builtin decoration +@builtin(position var i : i32; + ^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoBuiltinMissingLParen) { + EXPECT( + "[[builtin position]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[builtin position]] var i : i32; +^^ + +test.wgsl:1:11 error: expected '(' for builtin decoration +[[builtin position]] var i : i32; + ^^^^^^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoBuiltinMissingRParen) { + EXPECT( + "[[builtin(position]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[builtin(position]] var i : i32; +^^ + +test.wgsl:1:19 error: expected ')' for builtin decoration +[[builtin(position]] var i : i32; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinInvalidIdentifer) { - EXPECT("[[builtin(1)]] var i : i32;", - "test.wgsl:1:11 error: expected identifier for builtin\n" - "[[builtin(1)]] var i : i32;\n" - " ^\n"); + EXPECT("@builtin(1) var i : i32;", + R"(test.wgsl:1:10 error: expected identifier for builtin +@builtin(1) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinInvalidValue) { - EXPECT("[[builtin(x)]] var i : i32;", - "test.wgsl:1:11 error: invalid value for builtin decoration\n" - "[[builtin(x)]] var i : i32;\n" - " ^\n"); + EXPECT("@builtin(x) var i : i32;", + R"(test.wgsl:1:10 error: invalid value for builtin decoration +@builtin(x) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingMissingLParen) { - EXPECT("[[binding 1]] var i : i32;", - "test.wgsl:1:11 error: expected '(' for binding decoration\n" - "[[binding 1]] var i : i32;\n" - " ^\n"); + EXPECT( + "@binding 1) var i : i32;", + R"(test.wgsl:1:10 error: expected '(' for binding decoration +@binding 1) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingMissingRParen) { - EXPECT("[[binding(1]] var i : i32;", - "test.wgsl:1:12 error: expected ')' for binding decoration\n" - "[[binding(1]] var i : i32;\n" - " ^^\n"); + EXPECT( + "@binding(1 var i : i32;", + R"(test.wgsl:1:12 error: expected ')' for binding decoration +@binding(1 var i : i32; + ^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoBindingMissingLParen) { + EXPECT( + "[[binding 1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[binding 1]] var i : i32; +^^ + +test.wgsl:1:11 error: expected '(' for binding decoration +[[binding 1]] var i : i32; + ^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoBindingMissingRParen) { + EXPECT( + "[[binding(1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[binding(1]] var i : i32; +^^ + +test.wgsl:1:12 error: expected ')' for binding decoration +[[binding(1]] var i : i32; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingInvalidValue) { - EXPECT("[[binding(x)]] var i : i32;", - "test.wgsl:1:11 error: expected signed integer literal for binding " - "decoration\n" - "[[binding(x)]] var i : i32;\n" - " ^\n"); + EXPECT( + "@binding(x) var i : i32;", + R"(test.wgsl:1:10 error: expected signed integer literal for binding decoration +@binding(x) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoGroupMissingLParen) { - EXPECT("[[group 1]] var i : i32;", - "test.wgsl:1:9 error: expected '(' for group decoration\n" - "[[group 1]] var i : i32;\n" - " ^\n"); + EXPECT( + "@group 1) var i : i32;", + R"(test.wgsl:1:8 error: expected '(' for group decoration +@group 1) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoGroupMissingRParen) { - EXPECT("[[group(1]] var i : i32;", - "test.wgsl:1:10 error: expected ')' for group decoration\n" - "[[group(1]] var i : i32;\n" - " ^^\n"); + EXPECT( + "@group(1 var i : i32;", + R"(test.wgsl:1:10 error: expected ')' for group decoration +@group(1 var i : i32; + ^^^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoGroupMissingLParen) { + EXPECT( + "[[group 1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[group 1]] var i : i32; +^^ + +test.wgsl:1:9 error: expected '(' for group decoration +[[group 1]] var i : i32; + ^ +)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplErrorTest, DEPRECATED_GlobalDeclVarDecoGroupMissingRParen) { + EXPECT( + "[[group(1]] var i : i32;", + R"(test.wgsl:1:1 warning: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +[[group(1]] var i : i32; +^^ + +test.wgsl:1:10 error: expected ')' for group decoration +[[group(1]] var i : i32; + ^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingGroupValue) { - EXPECT("[[group(x)]] var i : i32;", - "test.wgsl:1:9 error: expected signed integer literal for group " - "decoration\n" - "[[group(x)]] var i : i32;\n" - " ^\n"); + EXPECT( + "@group(x) var i : i32;", + R"(test.wgsl:1:8 error: expected signed integer literal for group decoration +@group(x) var i : i32; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarInvalidIdentifier) { EXPECT("var ^ : mat4x4;", - "test.wgsl:1:5 error: expected identifier for variable declaration\n" - "var ^ : mat4x4;\n" - " ^\n"); + R"(test.wgsl:1:5 error: expected identifier for variable declaration +var ^ : mat4x4; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarMatrixMissingGreaterThan) { - EXPECT("var i : mat4x4' for matrix\n" - "var i : mat4x4' for matrix +var i : mat4x4;", - "test.wgsl:1:16 error: invalid type for matrix\n" - "var i : mat4x4<1>;\n" - " ^\n"); + EXPECT("var i : mat4x4<1>;", R"(test.wgsl:1:16 error: invalid type for matrix +var i : mat4x4<1>; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarMissingSemicolon) { EXPECT("var i : i32", - "test.wgsl:1:12 error: expected ';' for variable declaration\n" - "var i : i32\n" - " ^\n"); + R"(test.wgsl:1:12 error: expected ';' for variable declaration +var i : i32 + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarPtrMissingLessThan) { EXPECT("var i : ptr;", - "test.wgsl:1:12 error: expected '<' for ptr declaration\n" - "var i : ptr;\n" - " ^\n"); + R"(test.wgsl:1:12 error: expected '<' for ptr declaration +var i : ptr; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarPtrMissingGreaterThan) { EXPECT("var i : ptr' for ptr declaration\n" - "var i : ptr' for ptr declaration +var i : ptr;", - "test.wgsl:1:21 error: expected ',' for ptr declaration\n" - "var i : ptr;\n" - " ^^^\n"); + R"(test.wgsl:1:21 error: expected ',' for ptr declaration +var i : ptr; + ^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarPtrMissingStorageClass) { EXPECT("var i : ptr;", - "test.wgsl:1:13 error: invalid storage class for ptr declaration\n" - "var i : ptr;\n" - " ^^^^\n"); + R"(test.wgsl:1:13 error: invalid storage class for ptr declaration +var i : ptr; + ^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarPtrMissingType) { EXPECT("var i : ptr;", - "test.wgsl:1:22 error: invalid type for ptr declaration\n" - "var i : ptr;\n" - " ^\n"); + R"(test.wgsl:1:22 error: invalid type for ptr declaration +var i : ptr; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarAtomicMissingLessThan) { EXPECT("var i : atomic;", - "test.wgsl:1:15 error: expected '<' for atomic declaration\n" - "var i : atomic;\n" - " ^\n"); + R"(test.wgsl:1:15 error: expected '<' for atomic declaration +var i : atomic; + ^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarAtomicMissingGreaterThan) { EXPECT("var i : atomic' for atomic declaration\n" - "var i : atomic' for atomic declaration +var i : atomic i : i32", - "test.wgsl:1:5 error: invalid storage class for variable declaration\n" - "var i : i32\n" - " ^^^^\n"); + R"(test.wgsl:1:5 error: invalid storage class for variable declaration +var i : i32 + ^^^^ +)"); } TEST_F(ParserImplErrorTest, GlobalDeclVarStorageDeclMissingGThan) { EXPECT("var' for variable declaration\n" - "var' for variable declaration +var' for vector\n" - "var i : vec3' for vector +var i : vec3;", - "test.wgsl:1:14 error: invalid type for vector\n" - "var i : vec3<1>;\n" - " ^\n"); + EXPECT("var i : vec3<1>;", R"(test.wgsl:1:14 error: invalid type for vector +var i : vec3<1>; + ^ +)"); } TEST_F(ParserImplErrorTest, IfStmtMissingLParen) { - EXPECT("fn f() { if true) {} }", - "test.wgsl:1:13 error: expected '('\n" - "fn f() { if true) {} }\n" - " ^^^^\n"); + EXPECT("fn f() { if true) {} }", R"(test.wgsl:1:13 error: expected '(' +fn f() { if true) {} } + ^^^^ +)"); } TEST_F(ParserImplErrorTest, IfStmtMissingRParen) { - EXPECT("fn f() { if (true {} }", - "test.wgsl:1:19 error: expected ')'\n" - "fn f() { if (true {} }\n" - " ^\n"); + EXPECT("fn f() { if (true {} }", R"(test.wgsl:1:19 error: expected ')' +fn f() { if (true {} } + ^ +)"); } TEST_F(ParserImplErrorTest, IfStmtInvalidCond) { EXPECT("fn f() { if (>) {} }", - "test.wgsl:1:14 error: unable to parse expression\n" - "fn f() { if (>) {} }\n" - " ^\n"); + R"(test.wgsl:1:14 error: unable to parse expression +fn f() { if (>) {} } + ^ +)"); } TEST_F(ParserImplErrorTest, LogicalAndInvalidExpr) { EXPECT("fn f() { return 1 && >; }", - "test.wgsl:1:22 error: unable to parse right side of && expression\n" - "fn f() { return 1 && >; }\n" - " ^\n"); + R"(test.wgsl:1:22 error: unable to parse right side of && expression +fn f() { return 1 && >; } + ^ +)"); } TEST_F(ParserImplErrorTest, LogicalOrInvalidExpr) { EXPECT("fn f() { return 1 || >; }", - "test.wgsl:1:22 error: unable to parse right side of || expression\n" - "fn f() { return 1 || >; }\n" - " ^\n"); + R"(test.wgsl:1:22 error: unable to parse right side of || expression +fn f() { return 1 || >; } + ^ +)"); } TEST_F(ParserImplErrorTest, LoopMissingLBrace) { - EXPECT("fn f() { loop }", - "test.wgsl:1:15 error: expected '{' for loop\n" - "fn f() { loop }\n" - " ^\n"); + EXPECT("fn f() { loop }", R"(test.wgsl:1:15 error: expected '{' for loop +fn f() { loop } + ^ +)"); } TEST_F(ParserImplErrorTest, LoopMissingRBrace) { - EXPECT("fn f() { loop {", - "test.wgsl:1:16 error: expected '}' for loop\n" - "fn f() { loop {\n" - " ^\n"); + EXPECT("fn f() { loop {", R"(test.wgsl:1:16 error: expected '}' for loop +fn f() { loop { + ^ +)"); } TEST_F(ParserImplErrorTest, MaxErrorsReached) { - EXPECT("x; x; x; x; x; x; x; x;", - "test.wgsl:1:1 error: unexpected token\n" - "x; x; x; x; x; x; x; x;\n" - "^\n\n" - "test.wgsl:1:4 error: unexpected token\n" - "x; x; x; x; x; x; x; x;\n" - " ^\n\n" - "test.wgsl:1:7 error: unexpected token\n" - "x; x; x; x; x; x; x; x;\n" - " ^\n\n" - "test.wgsl:1:10 error: unexpected token\n" - "x; x; x; x; x; x; x; x;\n" - " ^\n\n" - "test.wgsl:1:13 error: unexpected token\n" - "x; x; x; x; x; x; x; x;\n" - " ^\n\n" - "test.wgsl error: stopping after 5 errors"); + EXPECT("x; x; x; x; x; x; x; x;", R"(test.wgsl:1:1 error: unexpected token +x; x; x; x; x; x; x; x; +^ + +test.wgsl:1:4 error: unexpected token +x; x; x; x; x; x; x; x; + ^ + +test.wgsl:1:7 error: unexpected token +x; x; x; x; x; x; x; x; + ^ + +test.wgsl:1:10 error: unexpected token +x; x; x; x; x; x; x; x; + ^ + +test.wgsl:1:13 error: unexpected token +x; x; x; x; x; x; x; x; + ^ + +test.wgsl error: stopping after 5 errors)"); } TEST_F(ParserImplErrorTest, MemberExprMissingIdentifier) { EXPECT("fn f() { x = a.; }", - "test.wgsl:1:16 error: expected identifier for member accessor\n" - "fn f() { x = a.; }\n" - " ^\n"); + R"(test.wgsl:1:16 error: expected identifier for member accessor +fn f() { x = a.; } + ^ +)"); } TEST_F(ParserImplErrorTest, MultiplicativeInvalidExpr) { EXPECT("fn f() { return 1.0 * <; }", - "test.wgsl:1:23 error: unable to parse right side of * expression\n" - "fn f() { return 1.0 * <; }\n" - " ^\n"); + R"(test.wgsl:1:23 error: unable to parse right side of * expression +fn f() { return 1.0 * <; } + ^ +)"); } TEST_F(ParserImplErrorTest, OrInvalidExpr) { EXPECT("fn f() { return 1 | >; }", - "test.wgsl:1:21 error: unable to parse right side of | expression\n" - "fn f() { return 1 | >; }\n" - " ^\n"); + R"(test.wgsl:1:21 error: unable to parse right side of | expression +fn f() { return 1 | >; } + ^ +)"); } TEST_F(ParserImplErrorTest, RelationalInvalidExpr) { EXPECT("fn f() { return 1 < >; }", - "test.wgsl:1:21 error: unable to parse right side of < expression\n" - "fn f() { return 1 < >; }\n" - " ^\n"); + R"(test.wgsl:1:21 error: unable to parse right side of < expression +fn f() { return 1 < >; } + ^ +)"); } TEST_F(ParserImplErrorTest, ReturnStmtMissingSemicolon) { EXPECT("fn f() { return }", - "test.wgsl:1:17 error: expected ';' for return statement\n" - "fn f() { return }\n" - " ^\n"); + R"(test.wgsl:1:17 error: expected ';' for return statement +fn f() { return } + ^ +)"); } TEST_F(ParserImplErrorTest, ShiftInvalidExpr) { EXPECT("fn f() { return 1 << >; }", - "test.wgsl:1:22 error: unable to parse right side of << expression\n" - "fn f() { return 1 << >; }\n" - " ^\n"); + R"(test.wgsl:1:22 error: unable to parse right side of << expression +fn f() { return 1 << >; } + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtMissingLBrace) { EXPECT("fn f() { switch(1) }", - "test.wgsl:1:20 error: expected '{' for switch statement\n" - "fn f() { switch(1) }\n" - " ^\n"); + R"(test.wgsl:1:20 error: expected '{' for switch statement +fn f() { switch(1) } + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtMissingRBrace) { EXPECT("fn f() { switch(1) {", - "test.wgsl:1:21 error: expected '}' for switch statement\n" - "fn f() { switch(1) {\n" - " ^\n"); + R"(test.wgsl:1:21 error: expected '}' for switch statement +fn f() { switch(1) { + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtInvalidCase) { EXPECT("fn f() { switch(1) { case ^: } }", - "test.wgsl:1:27 error: unable to parse case selectors\n" - "fn f() { switch(1) { case ^: } }\n" - " ^\n"); + R"(test.wgsl:1:27 error: unable to parse case selectors +fn f() { switch(1) { case ^: } } + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtInvalidCase2) { - EXPECT( - "fn f() { switch(1) { case false: } }", - "test.wgsl:1:27 error: invalid case selector must be an integer value\n" - "fn f() { switch(1) { case false: } }\n" - " ^^^^^\n"); + EXPECT("fn f() { switch(1) { case false: } }", + R"(test.wgsl:1:27 error: invalid case selector must be an integer value +fn f() { switch(1) { case false: } } + ^^^^^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtCaseMissingColon) { EXPECT("fn f() { switch(1) { case 1 {} } }", - "test.wgsl:1:29 error: expected ':' for case statement\n" - "fn f() { switch(1) { case 1 {} } }\n" - " ^\n"); + R"(test.wgsl:1:29 error: expected ':' for case statement +fn f() { switch(1) { case 1 {} } } + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtCaseMissingLBrace) { EXPECT("fn f() { switch(1) { case 1: } }", - "test.wgsl:1:30 error: expected '{' for case statement\n" - "fn f() { switch(1) { case 1: } }\n" - " ^\n"); + R"(test.wgsl:1:30 error: expected '{' for case statement +fn f() { switch(1) { case 1: } } + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtCaseMissingRBrace) { EXPECT("fn f() { switch(1) { case 1: {", - "test.wgsl:1:31 error: expected '}' for case statement\n" - "fn f() { switch(1) { case 1: {\n" - " ^\n"); + R"(test.wgsl:1:31 error: expected '}' for case statement +fn f() { switch(1) { case 1: { + ^ +)"); } TEST_F(ParserImplErrorTest, SwitchStmtCaseFallthroughMissingSemicolon) { EXPECT("fn f() { switch(1) { case 1: { fallthrough } case 2: {} } }", - "test.wgsl:1:44 error: expected ';' for fallthrough statement\n" - "fn f() { switch(1) { case 1: { fallthrough } case 2: {} } }\n" - " ^\n"); + R"(test.wgsl:1:44 error: expected ';' for fallthrough statement +fn f() { switch(1) { case 1: { fallthrough } case 2: {} } } + ^ +)"); } TEST_F(ParserImplErrorTest, VarStmtMissingSemicolon) { EXPECT("fn f() { var a : u32 }", - "test.wgsl:1:22 error: expected ';' for variable declaration\n" - "fn f() { var a : u32 }\n" - " ^\n"); + R"(test.wgsl:1:22 error: expected ';' for variable declaration +fn f() { var a : u32 } + ^ +)"); } TEST_F(ParserImplErrorTest, VarStmtInvalidAssignment) { EXPECT("fn f() { var a : u32 = >; }", - "test.wgsl:1:24 error: missing constructor for variable declaration\n" - "fn f() { var a : u32 = >; }\n" - " ^\n"); + R"(test.wgsl:1:24 error: missing constructor for variable declaration +fn f() { var a : u32 = >; } + ^ +)"); } TEST_F(ParserImplErrorTest, UnaryInvalidExpr) { EXPECT("fn f() { return !<; }", - "test.wgsl:1:18 error: unable to parse right side of ! expression\n" - "fn f() { return !<; }\n" - " ^\n"); + R"(test.wgsl:1:18 error: unable to parse right side of ! expression +fn f() { return !<; } + ^ +)"); } TEST_F(ParserImplErrorTest, UnexpectedToken) { - EXPECT("unexpected", - "test.wgsl:1:1 error: unexpected token\n" - "unexpected\n" - "^^^^^^^^^^\n"); + EXPECT("unexpected", R"(test.wgsl:1:1 error: unexpected token +unexpected +^^^^^^^^^^ +)"); } TEST_F(ParserImplErrorTest, XorInvalidExpr) { EXPECT("fn f() { return 1 ^ >; }", - "test.wgsl:1:21 error: unable to parse right side of ^ expression\n" - "fn f() { return 1 ^ >; }\n" - " ^\n"); + R"(test.wgsl:1:21 error: unable to parse right side of ^ expression +fn f() { return 1 ^ >; } + ^ +)"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_error_resync_test.cc b/src/reader/wgsl/parser_impl_error_resync_test.cc index db31ce32ab..04ae887949 100644 --- a/src/reader/wgsl/parser_impl_error_resync_test.cc +++ b/src/reader/wgsl/parser_impl_error_resync_test.cc @@ -40,32 +40,29 @@ TEST_F(ParserImplErrorResyncTest, BadFunctionDecls) { EXPECT(R"( fn .() -> . {} fn x(.) {} -[[.,.]] fn -> {} +@_ fn -> {} fn good() {} )", - "test.wgsl:2:4 error: expected identifier for function declaration\n" - "fn .() -> . {}\n" - " ^\n" - "\n" - "test.wgsl:2:11 error: unable to determine function return type\n" - "fn .() -> . {}\n" - " ^\n" - "\n" - "test.wgsl:3:6 error: expected ')' for function declaration\n" - "fn x(.) {}\n" - " ^\n" - "\n" - "test.wgsl:4:3 error: expected decoration\n" - "[[.,.]] fn -> {}\n" - " ^\n" - "\n" - "test.wgsl:4:5 error: expected decoration\n" - "[[.,.]] fn -> {}\n" - " ^\n" - "\n" - "test.wgsl:4:12 error: expected identifier for function declaration\n" - "[[.,.]] fn -> {}\n" - " ^^\n"); + R"(test.wgsl:2:4 error: expected identifier for function declaration +fn .() -> . {} + ^ + +test.wgsl:2:11 error: unable to determine function return type +fn .() -> . {} + ^ + +test.wgsl:3:6 error: expected ')' for function declaration +fn x(.) {} + ^ + +test.wgsl:4:2 error: expected decoration +@_ fn -> {} + ^ + +test.wgsl:4:7 error: expected identifier for function declaration +@_ fn -> {} + ^^ +)"); } TEST_F(ParserImplErrorResyncTest, AssignmentStatement) { @@ -78,17 +75,18 @@ fn f() { good = 1; } )", - "test.wgsl:3:8 error: expected '=' for assignment\n" - " blah blah blah blah;\n" - " ^^^^\n" - "\n" - "test.wgsl:5:8 error: expected '=' for assignment\n" - " blah blah blah blah;\n" - " ^^^^\n" - "\n" - "test.wgsl:6:7 error: unable to parse right side of assignment\n" - " x = .;\n" - " ^\n"); + R"(test.wgsl:3:8 error: expected '=' for assignment + blah blah blah blah; + ^^^^ + +test.wgsl:5:8 error: expected '=' for assignment + blah blah blah blah; + ^^^^ + +test.wgsl:6:7 error: unable to parse right side of assignment + x = .; + ^ +)"); } TEST_F(ParserImplErrorResyncTest, DiscardStatement) { @@ -99,13 +97,14 @@ fn f() { discard blah blah blah; } )", - "test.wgsl:3:11 error: expected ';' for discard statement\n" - " discard blah blah blah;\n" - " ^^^^\n" - "\n" - "test.wgsl:5:11 error: expected ';' for discard statement\n" - " discard blah blah blah;\n" - " ^^^^\n"); + R"(test.wgsl:3:11 error: expected ';' for discard statement + discard blah blah blah; + ^^^^ + +test.wgsl:5:11 error: expected ';' for discard statement + discard blah blah blah; + ^^^^ +)"); } TEST_F(ParserImplErrorResyncTest, StructMembers) { @@ -115,21 +114,22 @@ struct S { a : i32; blah blah blah; b : i32; - [[]] x : i32; + @- x : i32; c : i32; } )", - "test.wgsl:3:10 error: expected ':' for struct member\n" - " blah blah blah;\n" - " ^^^^\n" - "\n" - "test.wgsl:5:10 error: expected ':' for struct member\n" - " blah blah blah;\n" - " ^^^^\n" - "\n" - "test.wgsl:7:7 error: empty decoration list\n" - " [[]] x : i32;\n" - " ^^\n"); + R"(test.wgsl:3:10 error: expected ':' for struct member + blah blah blah; + ^^^^ + +test.wgsl:5:10 error: expected ':' for struct member + blah blah blah; + ^^^^ + +test.wgsl:7:6 error: expected decoration + @- x : i32; + ^ +)"); } // Check that the forward scan in resynchronize() stop at nested sync points. @@ -144,38 +144,36 @@ fn f() { } struct S { blah }; )", - "test.wgsl:5:1 error: expected ';' for discard statement\n" - "}\n" - "^\n" - "\n" - "test.wgsl:6:17 error: expected ':' for struct member\n" - "struct S { blah };\n" - " ^\n"); + R"(test.wgsl:5:1 error: expected ';' for discard statement +} +^ + +test.wgsl:6:17 error: expected ':' for struct member +struct S { blah }; + ^ +)"); } TEST_F(ParserImplErrorResyncTest, BracketCounting) { - EXPECT(R"( -[[woof[[[[]]]]]] + EXPECT( + R"( fn f(x(((())))) { meow = {{{}}} } struct S { blah }; )", - "test.wgsl:2:3 error: expected decoration\n" - "[[woof[[[[]]]]]]\n" - " ^^^^\n" - "\n" - "test.wgsl:3:7 error: expected ':' for parameter\n" - "fn f(x(((())))) {\n" - " ^\n" - "\n" - "test.wgsl:4:10 error: unable to parse right side of assignment\n" - " meow = {{{}}}\n" - " ^\n" - "\n" - "test.wgsl:6:17 error: expected ':' for struct member\n" - "struct S { blah };\n" - " ^\n"); + R"(test.wgsl:2:7 error: expected ':' for parameter +fn f(x(((())))) { + ^ + +test.wgsl:3:10 error: unable to parse right side of assignment + meow = {{{}}} + ^ + +test.wgsl:5:17 error: expected ':' for struct member +struct S { blah }; + ^ +)"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_function_decl_test.cc b/src/reader/wgsl/parser_impl_function_decl_test.cc index d593c22c19..5a59562488 100644 --- a/src/reader/wgsl/parser_impl_function_decl_test.cc +++ b/src/reader/wgsl/parser_impl_function_decl_test.cc @@ -49,7 +49,7 @@ TEST_F(ParserImplTest, FunctionDecl) { } TEST_F(ParserImplTest, FunctionDecl_DecorationList) { - auto p = parser("[[workgroup_size(2, 3, 4)]] fn main() { return; }"); + auto p = parser("@workgroup_size(2, 3, 4) fn main() { return; }"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()) << p->error(); ASSERT_FALSE(decos.errored); @@ -87,7 +87,7 @@ TEST_F(ParserImplTest, FunctionDecl_DecorationList) { TEST_F(ParserImplTest, FunctionDecl_DecorationList_MultipleEntries) { auto p = parser(R"( -[[workgroup_size(2, 3, 4), stage(compute)]] +@workgroup_size(2, 3, 4) @stage(compute) fn main() { return; })"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()) << p->error(); @@ -130,8 +130,8 @@ fn main() { return; })"); TEST_F(ParserImplTest, FunctionDecl_DecorationList_MultipleLists) { auto p = parser(R"( -[[workgroup_size(2, 3, 4)]] -[[stage(compute)]] +@workgroup_size(2, 3, 4) +@stage(compute) fn main() { return; })"); auto decorations = p->decoration_list(); EXPECT_FALSE(p->has_error()) << p->error(); @@ -173,7 +173,7 @@ fn main() { return; })"); } TEST_F(ParserImplTest, FunctionDecl_ReturnTypeDecorationList) { - auto p = parser("fn main() -> [[location(1)]] f32 { return 1.0; }"); + auto p = parser("fn main() -> @location(1) f32 { return 1.0; }"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()) << p->error(); ASSERT_FALSE(decos.errored); diff --git a/src/reader/wgsl/parser_impl_function_decoration_list_test.cc b/src/reader/wgsl/parser_impl_function_decoration_list_test.cc index 9f5b0b6ac2..8fd67600a4 100644 --- a/src/reader/wgsl/parser_impl_function_decoration_list_test.cc +++ b/src/reader/wgsl/parser_impl_function_decoration_list_test.cc @@ -21,7 +21,7 @@ namespace wgsl { namespace { TEST_F(ParserImplTest, DecorationList_Parses) { - auto p = parser("[[workgroup_size(2), stage(compute)]]"); + auto p = parser("@workgroup_size(2) @stage(compute)"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()) << p->error(); EXPECT_FALSE(decos.errored); @@ -46,23 +46,14 @@ TEST_F(ParserImplTest, DecorationList_Parses) { ast::PipelineStage::kCompute); } -TEST_F(ParserImplTest, DecorationList_Empty) { - auto p = parser("[[]]"); - auto decos = p->decoration_list(); - EXPECT_TRUE(p->has_error()); - EXPECT_TRUE(decos.errored); - EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:3: empty decoration list"); -} - TEST_F(ParserImplTest, DecorationList_Invalid) { - auto p = parser("[[invalid]]"); + auto p = parser("@invalid"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:3: expected decoration"); + EXPECT_EQ(p->error(), "1:2: expected decoration"); } TEST_F(ParserImplTest, DecorationList_ExtraComma) { @@ -71,34 +62,98 @@ TEST_F(ParserImplTest, DecorationList_ExtraComma) { EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:22: expected decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:22: expected decoration)"); } -TEST_F(ParserImplTest, DecorationList_MissingComma) { +TEST_F(ParserImplTest, DecorationList_BadDecoration) { + auto p = parser("@stage()"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_EQ(p->error(), "1:8: invalid value for stage decoration"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_Empty) { + auto p = parser("[[]]"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: empty decoration list)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_Invalid) { + auto p = parser("[[invalid]]"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: expected decoration)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_ExtraComma) { + auto p = parser("[[workgroup_size(2), ]]"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:22: expected decoration)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_MissingComma) { auto p = parser("[[workgroup_size(2) workgroup_size(2)]]"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:21: expected ',' for decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:21: expected ',' for decoration list)"); } -TEST_F(ParserImplTest, DecorationList_BadDecoration) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_BadDecoration) { auto p = parser("[[stage()]]"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:9: invalid value for stage decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:9: invalid value for stage decoration)"); } -TEST_F(ParserImplTest, DecorationList_MissingRightAttr) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_MissingRightAttr) { auto p = parser("[[workgroup_size(2), workgroup_size(3, 4, 5)"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:45: expected ']]' for decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:45: expected ']]' for decoration list)"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_function_header_test.cc b/src/reader/wgsl/parser_impl_function_header_test.cc index 369e8d052f..00d3136db9 100644 --- a/src/reader/wgsl/parser_impl_function_header_test.cc +++ b/src/reader/wgsl/parser_impl_function_header_test.cc @@ -46,7 +46,7 @@ TEST_F(ParserImplTest, FunctionHeader_TrailingComma) { } TEST_F(ParserImplTest, FunctionHeader_DecoratedReturnType) { - auto p = parser("fn main() -> [[location(1)]] f32"); + auto p = parser("fn main() -> @location(1) f32"); auto f = p->function_header(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(f.matched); @@ -76,7 +76,7 @@ TEST_F(ParserImplTest, FunctionHeader_InvariantReturnType) { } TEST_F(ParserImplTest, FunctionHeader_DecoratedReturnType_WithArrayStride) { - auto p = parser("fn main() -> [[location(1), stride(16)]] array"); + auto p = parser("fn main() -> @location(1) @stride(16) array"); auto f = p->function_header(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(f.matched); diff --git a/src/reader/wgsl/parser_impl_global_constant_decl_test.cc b/src/reader/wgsl/parser_impl_global_constant_decl_test.cc index 2c4cd544be..74c2557f1e 100644 --- a/src/reader/wgsl/parser_impl_global_constant_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_constant_decl_test.cc @@ -102,7 +102,7 @@ TEST_F(ParserImplTest, GlobalConstantDecl_MissingExpression) { } TEST_F(ParserImplTest, GlobalConstantDec_Override_WithId) { - auto p = parser("[[override(7)]] let a : f32 = 1."); + auto p = parser("@override(7) let a : f32 = 1."); auto decos = p->decoration_list(); EXPECT_FALSE(decos.errored); EXPECT_TRUE(decos.matched); @@ -119,9 +119,9 @@ TEST_F(ParserImplTest, GlobalConstantDec_Override_WithId) { EXPECT_TRUE(e->type->Is()); EXPECT_EQ(e->source.range.begin.line, 1u); - EXPECT_EQ(e->source.range.begin.column, 21u); + EXPECT_EQ(e->source.range.begin.column, 18u); EXPECT_EQ(e->source.range.end.line, 1u); - EXPECT_EQ(e->source.range.end.column, 22u); + EXPECT_EQ(e->source.range.end.column, 19u); ASSERT_NE(e->constructor, nullptr); EXPECT_TRUE(e->constructor->Is()); @@ -165,7 +165,7 @@ TEST_F(ParserImplTest, GlobalConstantDec_Override_WithoutId) { } TEST_F(ParserImplTest, GlobalConstantDec_Override_MissingId) { - auto p = parser("[[override()]] let a : f32 = 1."); + auto p = parser("@override() let a : f32 = 1."); auto decos = p->decoration_list(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); @@ -177,11 +177,11 @@ TEST_F(ParserImplTest, GlobalConstantDec_Override_MissingId) { EXPECT_TRUE(p->has_error()); EXPECT_EQ(p->error(), - "1:12: expected signed integer literal for override decoration"); + "1:11: expected signed integer literal for override decoration"); } TEST_F(ParserImplTest, GlobalConstantDec_Override_InvalidId) { - auto p = parser("[[override(-7)]] let a : f32 = 1."); + auto p = parser("@override(-7) let a : f32 = 1."); auto decos = p->decoration_list(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); @@ -192,7 +192,7 @@ TEST_F(ParserImplTest, GlobalConstantDec_Override_InvalidId) { ASSERT_NE(e.value, nullptr); EXPECT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:12: override decoration must be positive"); + EXPECT_EQ(p->error(), "1:11: override decoration must be positive"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_global_decl_test.cc b/src/reader/wgsl/parser_impl_global_decl_test.cc index d880e4aeba..fe8b24d7ed 100644 --- a/src/reader/wgsl/parser_impl_global_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_decl_test.cc @@ -132,7 +132,7 @@ TEST_F(ParserImplTest, GlobalDecl_Function) { } TEST_F(ParserImplTest, GlobalDecl_Function_WithDecoration) { - auto p = parser("[[workgroup_size(2)]] fn main() { return; }"); + auto p = parser("@workgroup_size(2) fn main() { return; }"); p->expect_global_decl(); ASSERT_FALSE(p->has_error()) << p->error(); @@ -167,7 +167,7 @@ TEST_F(ParserImplTest, GlobalDecl_ParsesStruct) { } TEST_F(ParserImplTest, GlobalDecl_Struct_WithStride) { - auto p = parser("struct A { data: [[stride(4)]] array; }"); + auto p = parser("struct A { data: @stride(4) array; }"); p->expect_global_decl(); ASSERT_FALSE(p->has_error()) << p->error(); diff --git a/src/reader/wgsl/parser_impl_global_variable_decl_test.cc b/src/reader/wgsl/parser_impl_global_variable_decl_test.cc index d79a8aeee0..52cc75b7e5 100644 --- a/src/reader/wgsl/parser_impl_global_variable_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_variable_decl_test.cc @@ -67,7 +67,7 @@ TEST_F(ParserImplTest, GlobalVariableDecl_WithConstructor) { } TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration) { - auto p = parser("[[binding(2), group(1)]] var a : f32"); + auto p = parser("@binding(2) @group(1) var a : f32"); auto decos = p->decoration_list(); EXPECT_FALSE(decos.errored); EXPECT_TRUE(decos.matched); @@ -83,9 +83,9 @@ TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration) { EXPECT_EQ(e->declared_storage_class, ast::StorageClass::kUniform); EXPECT_EQ(e->source.range.begin.line, 1u); - EXPECT_EQ(e->source.range.begin.column, 39u); + EXPECT_EQ(e->source.range.begin.column, 36u); EXPECT_EQ(e->source.range.end.line, 1u); - EXPECT_EQ(e->source.range.end.column, 40u); + EXPECT_EQ(e->source.range.end.column, 37u); ASSERT_EQ(e->constructor, nullptr); @@ -96,7 +96,7 @@ TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration) { } TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration_MulitpleGroups) { - auto p = parser("[[binding(2)]] [[group(1)]] var a : f32"); + auto p = parser("@binding(2) @group(1) var a : f32"); auto decos = p->decoration_list(); EXPECT_FALSE(decos.errored); EXPECT_TRUE(decos.matched); @@ -113,9 +113,9 @@ TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration_MulitpleGroups) { EXPECT_EQ(e->declared_storage_class, ast::StorageClass::kUniform); EXPECT_EQ(e->source.range.begin.line, 1u); - EXPECT_EQ(e->source.range.begin.column, 42u); + EXPECT_EQ(e->source.range.begin.column, 36u); EXPECT_EQ(e->source.range.end.line, 1u); - EXPECT_EQ(e->source.range.end.column, 43u); + EXPECT_EQ(e->source.range.end.column, 37u); ASSERT_EQ(e->constructor, nullptr); @@ -126,7 +126,7 @@ TEST_F(ParserImplTest, GlobalVariableDecl_WithDecoration_MulitpleGroups) { } TEST_F(ParserImplTest, GlobalVariableDecl_InvalidDecoration) { - auto p = parser("[[binding()]] var a : f32"); + auto p = parser("@binding() var a : f32"); auto decos = p->decoration_list(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); @@ -138,7 +138,7 @@ TEST_F(ParserImplTest, GlobalVariableDecl_InvalidDecoration) { EXPECT_TRUE(p->has_error()); EXPECT_EQ(p->error(), - "1:11: expected signed integer literal for binding decoration"); + "1:10: expected signed integer literal for binding decoration"); } TEST_F(ParserImplTest, GlobalVariableDecl_InvalidConstExpr) { diff --git a/src/reader/wgsl/parser_impl_param_list_test.cc b/src/reader/wgsl/parser_impl_param_list_test.cc index e29725fcb2..d8e9b3151b 100644 --- a/src/reader/wgsl/parser_impl_param_list_test.cc +++ b/src/reader/wgsl/parser_impl_param_list_test.cc @@ -92,9 +92,8 @@ TEST_F(ParserImplTest, ParamList_TrailingComma) { } TEST_F(ParserImplTest, ParamList_Decorations) { - auto p = parser( - "[[builtin(position)]] coord : vec4, " - "[[location(1)]] loc1 : f32"); + auto p = + parser("@builtin(position) coord : vec4, @location(1) loc1 : f32"); auto e = p->expect_param_list(); ASSERT_FALSE(p->has_error()) << p->error(); @@ -113,9 +112,9 @@ TEST_F(ParserImplTest, ParamList_Decorations) { ast::Builtin::kPosition); ASSERT_EQ(e.value[0]->source.range.begin.line, 1u); - ASSERT_EQ(e.value[0]->source.range.begin.column, 23u); + ASSERT_EQ(e.value[0]->source.range.begin.column, 20u); ASSERT_EQ(e.value[0]->source.range.end.line, 1u); - ASSERT_EQ(e.value[0]->source.range.end.column, 28u); + ASSERT_EQ(e.value[0]->source.range.end.column, 25u); EXPECT_EQ(e.value[1]->symbol, p->builder().Symbols().Get("loc1")); EXPECT_TRUE(e.value[1]->type->Is()); @@ -125,10 +124,10 @@ TEST_F(ParserImplTest, ParamList_Decorations) { EXPECT_TRUE(decos1[0]->Is()); EXPECT_EQ(decos1[0]->As()->value, 1u); - ASSERT_EQ(e.value[1]->source.range.begin.line, 1u); - ASSERT_EQ(e.value[1]->source.range.begin.column, 58u); - ASSERT_EQ(e.value[1]->source.range.end.line, 1u); - ASSERT_EQ(e.value[1]->source.range.end.column, 62u); + EXPECT_EQ(e.value[1]->source.range.begin.line, 1u); + EXPECT_EQ(e.value[1]->source.range.begin.column, 52u); + EXPECT_EQ(e.value[1]->source.range.end.line, 1u); + EXPECT_EQ(e.value[1]->source.range.end.column, 56u); } } // namespace diff --git a/src/reader/wgsl/parser_impl_struct_body_decl_test.cc b/src/reader/wgsl/parser_impl_struct_body_decl_test.cc index 729fac475e..86c2954d2c 100644 --- a/src/reader/wgsl/parser_impl_struct_body_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_body_decl_test.cc @@ -46,25 +46,25 @@ TEST_F(ParserImplTest, StructBodyDecl_ParsesEmpty) { TEST_F(ParserImplTest, StructBodyDecl_InvalidAlign) { auto p = parser(R"( { - [[align(nan)]] a : i32; + @align(nan) a : i32; })"); auto m = p->expect_struct_body_decl(); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(m.errored); EXPECT_EQ(p->error(), - "3:11: expected signed integer literal for align decoration"); + "3:10: expected signed integer literal for align decoration"); } TEST_F(ParserImplTest, StructBodyDecl_InvalidSize) { auto p = parser(R"( { - [[size(nan)]] a : i32; + @size(nan) a : i32; })"); auto m = p->expect_struct_body_decl(); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(m.errored); EXPECT_EQ(p->error(), - "3:10: expected signed integer literal for size decoration"); + "3:9: expected signed integer literal for size decoration"); } TEST_F(ParserImplTest, StructBodyDecl_MissingClosingBracket) { diff --git a/src/reader/wgsl/parser_impl_struct_decl_test.cc b/src/reader/wgsl/parser_impl_struct_decl_test.cc index 8d411ffe92..aa930d3e79 100644 --- a/src/reader/wgsl/parser_impl_struct_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_decl_test.cc @@ -154,7 +154,8 @@ TEST_F(ParserImplTest, StructDecl_InvalidDecorationDecl) { EXPECT_TRUE(p->has_error()); EXPECT_EQ( p->error(), - R"(1:3: use of deprecated language feature: [[block]] attributes have been removed from WGSL + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: use of deprecated language feature: [[block]] attributes have been removed from WGSL 1:9: expected ']]' for decoration list)"); } diff --git a/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc b/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc index 655bb19689..b4acaed2ae 100644 --- a/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc @@ -21,6 +21,60 @@ namespace wgsl { namespace { TEST_F(ParserImplTest, DecorationDecl_Parses) { + auto p = parser("@override"); + auto decos = p->decoration_list(); + EXPECT_FALSE(p->has_error()); + EXPECT_FALSE(decos.errored); + EXPECT_TRUE(decos.matched); + ASSERT_EQ(decos.value.size(), 1u); + auto* override_deco = decos.value[0]->As(); + EXPECT_TRUE(override_deco->Is()); +} + +TEST_F(ParserImplTest, DecorationDecl_MissingParenLeft) { + auto p = parser("@location 1)"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ(p->error(), + "1:11: expected '(' for location decoration"); +} + +TEST_F(ParserImplTest, DecorationDecl_MissingValue) { + auto p = parser("@location()"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ(p->error(), + "1:11: expected signed integer literal for location decoration"); +} + +TEST_F(ParserImplTest, DecorationDecl_MissingParenRight) { + auto p = parser("@location(1"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ(p->error(), + "1:12: expected ')' for location decoration"); +} + +TEST_F(ParserImplTest, DecorationDecl_InvalidDecoration) { + auto p = parser("@invalid"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationDecl_Parses) { auto p = parser("[[override]]"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()); @@ -31,17 +85,22 @@ TEST_F(ParserImplTest, DecorationDecl_Parses) { EXPECT_TRUE(override_deco->Is()); } -TEST_F(ParserImplTest, DecorationDecl_MissingAttrRight) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationDecl_MissingAttrRight) { auto p = parser("[[override"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:11: expected ']]' for decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:11: expected ']]' for decoration list)"); } -TEST_F(ParserImplTest, DecorationDecl_InvalidDecoration) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationDecl_InvalidDecoration) { auto p = parser("[[invalid]]"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); diff --git a/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc b/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc index 107c358d77..a7c1383555 100644 --- a/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc @@ -28,18 +28,20 @@ TEST_F(ParserImplTest, DecorationDecl_EmptyStr) { EXPECT_EQ(decos.value.size(), 0u); } -TEST_F(ParserImplTest, DecorationDecl_EmptyBlock) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationDecl_EmptyBlock) { auto p = parser("[[]]"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_EQ(decos.value.size(), 0u); - EXPECT_EQ(p->error(), "1:3: empty decoration list"); + EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: empty decoration list)"); } TEST_F(ParserImplTest, DecorationDecl_Single) { - auto p = parser("[[size(4)]]"); + auto p = parser("@size(4)"); auto decos = p->decoration_list(); EXPECT_FALSE(p->has_error()); EXPECT_FALSE(decos.errored); @@ -51,13 +53,13 @@ TEST_F(ParserImplTest, DecorationDecl_Single) { } TEST_F(ParserImplTest, DecorationDecl_InvalidDecoration) { - auto p = parser("[[size(nan)]]"); + auto p = parser("@size(nan)"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()) << p->error(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_EQ(p->error(), - "1:8: expected signed integer literal for size decoration"); + "1:7: expected signed integer literal for size decoration"); } TEST_F(ParserImplTest, DecorationDecl_MissingClose) { @@ -66,7 +68,8 @@ TEST_F(ParserImplTest, DecorationDecl_MissingClose) { EXPECT_TRUE(p->has_error()) << p->error(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:10: expected ']]' for decoration list"); + EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: expected ']]' for decoration list)"); } TEST_F(ParserImplTest, StructMemberDecorationDecl_SizeMissingClose) { @@ -75,7 +78,8 @@ TEST_F(ParserImplTest, StructMemberDecorationDecl_SizeMissingClose) { EXPECT_TRUE(p->has_error()) << p->error(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); - EXPECT_EQ(p->error(), "1:10: expected ']]' for decoration list"); + EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: expected ']]' for decoration list)"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_struct_member_test.cc b/src/reader/wgsl/parser_impl_struct_member_test.cc index 0f0f980eca..eccf07997e 100644 --- a/src/reader/wgsl/parser_impl_struct_member_test.cc +++ b/src/reader/wgsl/parser_impl_struct_member_test.cc @@ -43,7 +43,7 @@ TEST_F(ParserImplTest, StructMember_Parses) { } TEST_F(ParserImplTest, StructMember_ParsesWithAlignDecoration) { - auto p = parser("[[align(2)]] a : i32;"); + auto p = parser("@align(2) a : i32;"); auto& builder = p->builder(); @@ -64,12 +64,12 @@ TEST_F(ParserImplTest, StructMember_ParsesWithAlignDecoration) { EXPECT_EQ(m->decorations[0]->As()->align, 2u); - EXPECT_EQ(m->source.range, (Source::Range{{1u, 14u}, {1u, 15u}})); - EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 18u}, {1u, 21u}})); + EXPECT_EQ(m->source.range, (Source::Range{{1u, 11u}, {1u, 12u}})); + EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 15u}, {1u, 18u}})); } TEST_F(ParserImplTest, StructMember_ParsesWithSizeDecoration) { - auto p = parser("[[size(2)]] a : i32;"); + auto p = parser("@size(2) a : i32;"); auto& builder = p->builder(); @@ -89,12 +89,12 @@ TEST_F(ParserImplTest, StructMember_ParsesWithSizeDecoration) { EXPECT_TRUE(m->decorations[0]->Is()); EXPECT_EQ(m->decorations[0]->As()->size, 2u); - EXPECT_EQ(m->source.range, (Source::Range{{1u, 13u}, {1u, 14u}})); - EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 17u}, {1u, 20u}})); + EXPECT_EQ(m->source.range, (Source::Range{{1u, 10u}, {1u, 11u}})); + EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 14u}, {1u, 17u}})); } TEST_F(ParserImplTest, StructMember_ParsesWithDecoration) { - auto p = parser("[[size(2)]] a : i32;"); + auto p = parser("@size(2) a : i32;"); auto& builder = p->builder(); @@ -114,13 +114,13 @@ TEST_F(ParserImplTest, StructMember_ParsesWithDecoration) { EXPECT_TRUE(m->decorations[0]->Is()); EXPECT_EQ(m->decorations[0]->As()->size, 2u); - EXPECT_EQ(m->source.range, (Source::Range{{1u, 13u}, {1u, 14u}})); - EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 17u}, {1u, 20u}})); + EXPECT_EQ(m->source.range, (Source::Range{{1u, 10u}, {1u, 11u}})); + EXPECT_EQ(m->type->source.range, (Source::Range{{1u, 14u}, {1u, 17u}})); } TEST_F(ParserImplTest, StructMember_ParsesWithMultipleDecorations) { - auto p = parser(R"([[size(2)]] -[[align(4)]] a : i32;)"); + auto p = parser(R"(@size(2) +@align(4) a : i32;)"); auto& builder = p->builder(); @@ -143,12 +143,12 @@ TEST_F(ParserImplTest, StructMember_ParsesWithMultipleDecorations) { EXPECT_EQ(m->decorations[1]->As()->align, 4u); - EXPECT_EQ(m->source.range, (Source::Range{{2u, 14u}, {2u, 15u}})); - EXPECT_EQ(m->type->source.range, (Source::Range{{2u, 18u}, {2u, 21u}})); + EXPECT_EQ(m->source.range, (Source::Range{{2u, 11u}, {2u, 12u}})); + EXPECT_EQ(m->type->source.range, (Source::Range{{2u, 15u}, {2u, 18u}})); } TEST_F(ParserImplTest, StructMember_InvalidDecoration) { - auto p = parser("[[size(nan)]] a : i32;"); + auto p = parser("@size(nan) a : i32;"); auto decos = p->decoration_list(); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); @@ -159,7 +159,7 @@ TEST_F(ParserImplTest, StructMember_InvalidDecoration) { ASSERT_TRUE(p->has_error()); EXPECT_EQ(p->error(), - "1:8: expected signed integer literal for size decoration"); + "1:7: expected signed integer literal for size decoration"); } TEST_F(ParserImplTest, StructMember_MissingSemicolon) { diff --git a/src/reader/wgsl/parser_impl_test.cc b/src/reader/wgsl/parser_impl_test.cc index 269cc9b84c..09da3b55ee 100644 --- a/src/reader/wgsl/parser_impl_test.cc +++ b/src/reader/wgsl/parser_impl_test.cc @@ -26,8 +26,8 @@ TEST_F(ParserImplTest, Empty) { TEST_F(ParserImplTest, Parses) { auto p = parser(R"( -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(.4, .2, .3, 1); } )"); @@ -114,11 +114,11 @@ TEST_F(ParserImplTest, Comments_TerminatedBlockComment) { * /* I can nest /**/ comments. */ * // I can nest line comments too. **/ -[[stage(fragment)]] // This is the stage +@stage(fragment) // This is the stage fn main(/* no parameters -*/) -> [[location(0)]] vec4 { +*/) -> @location(0) vec4 { return/*block_comments_delimit_tokens*/vec4(.4, .2, .3, 1); }/* block comments are OK at EOF...*/)"); @@ -128,8 +128,8 @@ parameters TEST_F(ParserImplTest, Comments_UnterminatedBlockComment) { auto p = parser(R"( -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(.4, .2, .3, 1); } /* unterminated block comments are invalid ...)"); diff --git a/src/reader/wgsl/parser_impl_type_decl_test.cc b/src/reader/wgsl/parser_impl_type_decl_test.cc index f3cc52df0c..13e368a1b6 100644 --- a/src/reader/wgsl/parser_impl_type_decl_test.cc +++ b/src/reader/wgsl/parser_impl_type_decl_test.cc @@ -440,7 +440,7 @@ TEST_F(ParserImplTest, TypeDecl_Array_ConstantSize) { } TEST_F(ParserImplTest, TypeDecl_Array_Stride) { - auto p = parser("[[stride(16)]] array"); + auto p = parser("@stride(16) array"); auto t = p->type_decl(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -460,11 +460,11 @@ TEST_F(ParserImplTest, TypeDecl_Array_Stride) { auto* stride = a->decorations[0]; ASSERT_TRUE(stride->Is()); ASSERT_EQ(stride->As()->stride, 16u); - EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 16u}, {1u, 29u}})); + EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 13u}, {1u, 26u}})); } TEST_F(ParserImplTest, TypeDecl_Array_Runtime_Stride) { - auto p = parser("[[stride(16)]] array"); + auto p = parser("@stride(16) array"); auto t = p->type_decl(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -480,11 +480,11 @@ TEST_F(ParserImplTest, TypeDecl_Array_Runtime_Stride) { auto* stride = a->decorations[0]; ASSERT_TRUE(stride->Is()); ASSERT_EQ(stride->As()->stride, 16u); - EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 16u}, {1u, 26u}})); + EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 13u}, {1u, 23u}})); } TEST_F(ParserImplTest, TypeDecl_Array_MultipleDecorations_OneBlock) { - auto p = parser("[[stride(16), stride(32)]] array"); + auto p = parser("@stride(16) @stride(32) array"); auto t = p->type_decl(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -502,11 +502,11 @@ TEST_F(ParserImplTest, TypeDecl_Array_MultipleDecorations_OneBlock) { EXPECT_EQ(decos[0]->As()->stride, 16u); EXPECT_TRUE(decos[1]->Is()); EXPECT_EQ(decos[1]->As()->stride, 32u); - EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 28u}, {1u, 38u}})); + EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 25u}, {1u, 35u}})); } TEST_F(ParserImplTest, TypeDecl_Array_MultipleDecorations_MultipleBlocks) { - auto p = parser("[[stride(16)]] [[stride(32)]] array"); + auto p = parser("@stride(16) @stride(32) array"); auto t = p->type_decl(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -524,89 +524,163 @@ TEST_F(ParserImplTest, TypeDecl_Array_MultipleDecorations_MultipleBlocks) { EXPECT_EQ(decos[0]->As()->stride, 16u); EXPECT_TRUE(decos[1]->Is()); EXPECT_EQ(decos[1]->As()->stride, 32u); - EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 31u}, {1u, 41u}})); + EXPECT_EQ(t.value->source.range, (Source::Range{{1u, 25u}, {1u, 35u}})); } TEST_F(ParserImplTest, TypeDecl_Array_Decoration_MissingArray) { - auto p = parser("[[stride(16)]] f32"); + auto p = parser("@stride(16) f32"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:3: unexpected decorations"); + EXPECT_EQ(p->error(), "1:2: unexpected decorations"); } -TEST_F(ParserImplTest, TypeDecl_Array_Decoration_MissingClosingAttr) { +TEST_F(ParserImplTest, TypeDecl_Array_Decoration_UnknownDecoration) { + auto p = parser("@unknown(16) array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), R"(1:2: expected decoration)"); +} +TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingLeftParen) { + auto p = parser("@stride 4) array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), R"(1:9: expected '(' for stride decoration)"); +} + +TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingRightParen) { + auto p = parser("@stride(4 array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), R"(1:11: expected ')' for stride decoration)"); +} + +TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingValue) { + auto p = parser("@stride() array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), + "1:9: expected signed integer literal for stride decoration"); +} + +TEST_F(ParserImplTest, TypeDecl_Array_Stride_InvalidValue) { + auto p = parser("@stride(invalid) array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), + "1:9: expected signed integer literal for stride decoration"); +} + +TEST_F(ParserImplTest, TypeDecl_Array_Stride_InvalidValue_Negative) { + auto p = parser("@stride(-1) array"); + auto t = p->type_decl(); + EXPECT_TRUE(t.errored); + EXPECT_FALSE(t.matched); + ASSERT_EQ(t.value, nullptr); + ASSERT_TRUE(p->has_error()); + EXPECT_EQ(p->error(), "1:9: stride decoration must be greater than 0"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, + DEPRECATED_TypeDecl_Array_Decoration_MissingClosingAttr) { auto p = parser("[[stride(16) array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:14: expected ']]' for decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:14: expected ']]' for decoration list)"); } -TEST_F(ParserImplTest, TypeDecl_Array_Decoration_UnknownDecoration) { - auto p = parser("[[unknown 16]] array"); - auto t = p->type_decl(); - EXPECT_TRUE(t.errored); - EXPECT_FALSE(t.matched); - ASSERT_EQ(t.value, nullptr); - ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:3: expected decoration"); -} - -TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingLeftParen) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_TypeDecl_Array_Stride_MissingLeftParen) { auto p = parser("[[stride 4)]] array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:10: expected '(' for stride decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: expected '(' for stride decoration)"); } -TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingRightParen) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_TypeDecl_Array_Stride_MissingRightParen) { auto p = parser("[[stride(4]] array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:11: expected ')' for stride decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:11: expected ')' for stride decoration)"); } -TEST_F(ParserImplTest, TypeDecl_Array_Stride_MissingValue) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_TypeDecl_Array_Stride_MissingValue) { auto p = parser("[[stride()]] array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), - "1:10: expected signed integer literal for stride decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: expected signed integer literal for stride decoration)"); } -TEST_F(ParserImplTest, TypeDecl_Array_Stride_InvalidValue) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_TypeDecl_Array_Stride_InvalidValue) { auto p = parser("[[stride(invalid)]] array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), - "1:10: expected signed integer literal for stride decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: expected signed integer literal for stride decoration)"); } -TEST_F(ParserImplTest, TypeDecl_Array_Stride_InvalidValue_Negative) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_TypeDecl_Array_Stride_InvalidValue_Negative) { auto p = parser("[[stride(-1)]] array"); auto t = p->type_decl(); EXPECT_TRUE(t.errored); EXPECT_FALSE(t.matched); ASSERT_EQ(t.value, nullptr); ASSERT_TRUE(p->has_error()); - EXPECT_EQ(p->error(), "1:10: stride decoration must be greater than 0"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:10: stride decoration must be greater than 0)"); } TEST_F(ParserImplTest, TypeDecl_Array_Runtime) { diff --git a/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc b/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc index 54933452da..5cb3801164 100644 --- a/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc +++ b/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc @@ -20,7 +20,7 @@ namespace wgsl { namespace { TEST_F(ParserImplTest, DecorationList_Parses) { - auto p = parser(R"([[location(4), builtin(position)]])"); + auto p = parser(R"(@location(4) @builtin(position))"); auto decos = p->decoration_list(); ASSERT_FALSE(p->has_error()) << p->error(); ASSERT_FALSE(decos.errored); @@ -39,65 +39,94 @@ TEST_F(ParserImplTest, DecorationList_Parses) { ast::Builtin::kPosition); } -TEST_F(ParserImplTest, DecorationList_Empty) { +TEST_F(ParserImplTest, DecorationList_Invalid) { + auto p = parser(R"(@invalid)"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ(p->error(), R"(1:2: expected decoration)"); +} + +TEST_F(ParserImplTest, DecorationList_InvalidValue) { + auto p = parser("@builtin(invalid)"); + auto decos = p->decoration_list(); + EXPECT_TRUE(p->has_error()); + EXPECT_TRUE(decos.errored); + EXPECT_FALSE(decos.matched); + EXPECT_TRUE(decos.value.empty()); + EXPECT_EQ(p->error(), "1:10: invalid value for builtin decoration"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_Empty) { auto p = parser(R"([[]])"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:3: empty decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: empty decoration list)"); } -TEST_F(ParserImplTest, DecorationList_Invalid) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_Invalid) { auto p = parser(R"([[invalid]])"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:3: expected decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:3: expected decoration)"); } -TEST_F(ParserImplTest, DecorationList_ExtraComma) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_ExtraComma) { auto p = parser(R"([[builtin(position), ]])"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:22: expected decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:22: expected decoration)"); } -TEST_F(ParserImplTest, DecorationList_MissingComma) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_MissingComma) { auto p = parser(R"([[binding(4) location(5)]])"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:14: expected ',' for decoration list"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:14: expected ',' for decoration list)"); } -TEST_F(ParserImplTest, DecorationList_BadDecoration) { - auto p = parser(R"([[location(bad)]])"); - auto decos = p->decoration_list(); - EXPECT_TRUE(p->has_error()); - EXPECT_TRUE(decos.errored); - EXPECT_FALSE(decos.matched); - EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), - "1:12: expected signed integer literal for location decoration"); -} - -TEST_F(ParserImplTest, DecorationList_InvalidBuiltin) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_DecorationList_InvalidValue) { auto p = parser("[[builtin(invalid)]]"); auto decos = p->decoration_list(); EXPECT_TRUE(p->has_error()); EXPECT_TRUE(decos.errored); EXPECT_FALSE(decos.matched); EXPECT_TRUE(decos.value.empty()); - EXPECT_EQ(p->error(), "1:11: invalid value for builtin decoration"); + EXPECT_EQ( + p->error(), + R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:11: invalid value for builtin decoration)"); } } // namespace diff --git a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc index 489463ea77..73efe8ccd8 100644 --- a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc +++ b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc @@ -77,7 +77,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_InvalidIdent) { } TEST_F(ParserImplTest, VariableIdentDecl_NonAccessDecoFail) { - auto p = parser("my_var : [[stride(1)]] S"); + auto p = parser("my_var : @stride(1) S"); auto* mem = Member("a", ty.i32(), ast::DecorationList{}); ast::StructMemberList members; @@ -90,19 +90,11 @@ TEST_F(ParserImplTest, VariableIdentDecl_NonAccessDecoFail) { auto decl = p->expect_variable_ident_decl("test"); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(decl.errored); - ASSERT_EQ(p->error(), "1:12: unexpected decorations"); -} - -TEST_F(ParserImplTest, VariableIdentDecl_DecorationMissingRightBlock) { - auto p = parser("my_var : [[stride(4) S"); - auto decl = p->expect_variable_ident_decl("test"); - ASSERT_TRUE(p->has_error()); - ASSERT_TRUE(decl.errored); - ASSERT_EQ(p->error(), "1:22: expected ']]' for decoration list"); + ASSERT_EQ(p->error(), "1:11: unexpected decorations"); } TEST_F(ParserImplTest, VariableIdentDecl_DecorationMissingRightParen) { - auto p = parser("my_var : [[stride(4]] S"); + auto p = parser("my_var : @stride(4 S"); auto decl = p->expect_variable_ident_decl("test"); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(decl.errored); @@ -110,19 +102,62 @@ TEST_F(ParserImplTest, VariableIdentDecl_DecorationMissingRightParen) { } TEST_F(ParserImplTest, VariableIdentDecl_DecorationMissingLeftParen) { + auto p = parser("my_var : @stride 4) S"); + auto decl = p->expect_variable_ident_decl("test"); + ASSERT_TRUE(p->has_error()); + ASSERT_TRUE(decl.errored); + ASSERT_EQ(p->error(), "1:18: expected '(' for stride decoration"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, + DEPRECATED_VariableIdentDecl_DecorationMissingRightBlock) { + auto p = parser("my_var : [[stride(4) S"); + auto decl = p->expect_variable_ident_decl("test"); + ASSERT_TRUE(p->has_error()); + ASSERT_TRUE(decl.errored); + ASSERT_EQ( + p->error(), + R"(1:10: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:22: expected ']]' for decoration list)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, + DEPRECATED_VariableIdentDecl_DecorationMissingRightParen) { + auto p = parser("my_var : [[stride(4]] S"); + auto decl = p->expect_variable_ident_decl("test"); + ASSERT_TRUE(p->has_error()); + ASSERT_TRUE(decl.errored); + ASSERT_EQ( + p->error(), + R"(1:10: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:20: expected ')' for stride decoration)"); +} + +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, + DEPRECATED_VariableIdentDecl_DecorationMissingLeftParen) { auto p = parser("my_var : [[stride 4)]] S"); auto decl = p->expect_variable_ident_decl("test"); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(decl.errored); - ASSERT_EQ(p->error(), "1:19: expected '(' for stride decoration"); + ASSERT_EQ( + p->error(), + R"(1:10: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:19: expected '(' for stride decoration)"); } -TEST_F(ParserImplTest, VariableIdentDecl_DecorationEmpty) { +// TODO(crbug.com/tint/1382): Remove +TEST_F(ParserImplTest, DEPRECATED_VariableIdentDecl_DecorationEmpty) { auto p = parser("my_var : [[]] S"); auto decl = p->expect_variable_ident_decl("test"); ASSERT_TRUE(p->has_error()); ASSERT_TRUE(decl.errored); - ASSERT_EQ(p->error(), "1:12: empty decoration list"); + ASSERT_EQ( + p->error(), + R"(1:10: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style +1:12: empty decoration list)"); } } // namespace diff --git a/src/reader/wgsl/parser_test.cc b/src/reader/wgsl/parser_test.cc index b1e55668ac..f6031dddb9 100644 --- a/src/reader/wgsl/parser_test.cc +++ b/src/reader/wgsl/parser_test.cc @@ -34,8 +34,8 @@ TEST_F(ParserTest, Empty) { TEST_F(ParserTest, Parses) { Source::File file("test.wgsl", R"( -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(.4, .2, .3, 1.); } )"); diff --git a/src/reader/wgsl/token.cc b/src/reader/wgsl/token.cc index 864036c27e..8ba2cffdb3 100644 --- a/src/reader/wgsl/token.cc +++ b/src/reader/wgsl/token.cc @@ -42,6 +42,8 @@ std::string Token::TypeToName(Type type) { return "&&"; case Token::Type::kArrow: return "->"; + case Token::Type::kAttr: + return "@"; case Token::Type::kAttrLeft: return "[["; case Token::Type::kAttrRight: diff --git a/src/reader/wgsl/token.h b/src/reader/wgsl/token.h index dca21125a9..8fdc87ea4b 100644 --- a/src/reader/wgsl/token.h +++ b/src/reader/wgsl/token.h @@ -50,9 +50,11 @@ class Token { kAndAnd, /// A '->' kArrow, - /// A '[[' + /// A '@' + kAttr, + /// A '[[' - [DEPRECATED] now '@' kAttrLeft, - /// A ']]' + /// A ']]' - [DEPRECATED] now '@' kAttrRight, /// A '/' kForwardSlash, diff --git a/src/resolver/assignment_validation_test.cc b/src/resolver/assignment_validation_test.cc index f5731615a4..39cb300407 100644 --- a/src/resolver/assignment_validation_test.cc +++ b/src/resolver/assignment_validation_test.cc @@ -27,7 +27,7 @@ using ResolverAssignmentValidationTest = ResolverTest; TEST_F(ResolverAssignmentValidationTest, ReadOnlyBuffer) { // [[block]] struct S { m : i32 }; - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : S; auto* s = Structure("S", {Member("m", ty.i32())}, {create()}); @@ -251,7 +251,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_Handle) { TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_Atomic) { // [[block]] struct S { a : atomic; }; - // [[group(0), binding(0)]] var v : S; + // @group(0) @binding(0) var v : S; // v.a = v.a; auto* s = Structure("S", {Member("a", ty.atomic(ty.i32()))}, @@ -273,7 +273,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_Atomic) { TEST_F(ResolverAssignmentValidationTest, AssignNonConstructible_RuntimeArray) { // [[block]] struct S { a : array; }; - // [[group(0), binding(0)]] var v : S; + // @group(0) @binding(0) var v : S; // v.a = v.a; auto* s = Structure("S", {Member("a", ty.array(ty.f32()))}, @@ -299,7 +299,7 @@ TEST_F(ResolverAssignmentValidationTest, // struct S { // arr: array; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // fn f() { // _ = s; // } @@ -320,7 +320,7 @@ TEST_F(ResolverAssignmentValidationTest, AssignToPhony_DynamicArray_Fail) { // struct S { // arr: array; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // fn f() { // _ = s.arr; // } @@ -347,10 +347,10 @@ TEST_F(ResolverAssignmentValidationTest, AssignToPhony_Pass) { // struct U { // i: i32; // }; - // [[group(0), binding(0)]] var tex texture_2d; - // [[group(0), binding(1)]] var smp sampler; - // [[group(0), binding(2)]] var u : U; - // [[group(0), binding(3)]] var s : S; + // @group(0) @binding(0) var tex texture_2d; + // @group(0) @binding(1) var smp sampler; + // @group(0) @binding(2) var u : U; + // @group(0) @binding(3) var s : S; // var wg : array // fn f() { // _ = 1; diff --git a/src/resolver/builtins_validation_test.cc b/src/resolver/builtins_validation_test.cc index 251be8e726..8bbcf3a8c2 100644 --- a/src/resolver/builtins_validation_test.cc +++ b/src/resolver/builtins_validation_test.cc @@ -201,10 +201,10 @@ INSTANTIATE_TEST_SUITE_P(ResolverBuiltinsValidationTest, testing::ValuesIn(cases)); TEST_F(ResolverBuiltinsValidationTest, FragDepthIsInput_Fail) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(frag_depth)]] fd: f32, - // ) -> [[location(0)]] f32 { return 1.0; } + // @builtin(frag_depth) fd: f32, + // ) -> @location(0) f32 { return 1.0; } auto* fd = Param( "fd", ty.f32(), ast::DecorationList{Builtin(Source{{12, 34}}, ast::Builtin::kFragDepth)}); @@ -219,10 +219,10 @@ TEST_F(ResolverBuiltinsValidationTest, FragDepthIsInput_Fail) { TEST_F(ResolverBuiltinsValidationTest, FragDepthIsInputStruct_Fail) { // struct MyInputs { - // [[builtin(frag_depth)]] ff: f32; + // @builtin(frag_depth) ff: f32; // }; - // [[stage(fragment)]] - // fn fragShader(arg: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(arg: MyInputs) -> @location(0) f32 { return 1.0; } auto* s = Structure( "MyInputs", {Member("frag_depth", ty.f32(), @@ -240,9 +240,9 @@ TEST_F(ResolverBuiltinsValidationTest, FragDepthIsInputStruct_Fail) { TEST_F(ResolverBuiltinsValidationTest, StructBuiltinInsideEntryPoint_Ignored) { // struct S { - // [[builtin(vertex_index)]] idx: u32; + // @builtin(vertex_index) idx: u32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn fragShader() { var s : S; } Structure("S", @@ -257,10 +257,10 @@ TEST_F(ResolverBuiltinsValidationTest, StructBuiltinInsideEntryPoint_Ignored) { TEST_F(ResolverBuiltinsValidationTest, PositionNotF32_Struct_Fail) { // struct MyInputs { - // [[builtin(kPosition)]] p: vec4; + // @builtin(kPosition) p: vec4; // }; - // [[stage(fragment)]] - // fn fragShader(is_front: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(is_front: MyInputs) -> @location(0) f32 { return 1.0; } auto* m = Member( "position", ty.vec4(), @@ -275,8 +275,8 @@ TEST_F(ResolverBuiltinsValidationTest, PositionNotF32_Struct_Fail) { } TEST_F(ResolverBuiltinsValidationTest, PositionNotF32_ReturnType_Fail) { - // [[stage(vertex)]] - // fn main() -> [[builtin(position)]] f32 { return 1.0; } + // @stage(vertex) + // fn main() -> @builtin(position) f32 { return 1.0; } Func("main", {}, ty.f32(), {Return(1.0f)}, {Stage(ast::PipelineStage::kVertex)}, {Builtin(Source{{12, 34}}, ast::Builtin::kPosition)}); @@ -288,10 +288,10 @@ TEST_F(ResolverBuiltinsValidationTest, PositionNotF32_ReturnType_Fail) { TEST_F(ResolverBuiltinsValidationTest, FragDepthNotF32_Struct_Fail) { // struct MyInputs { - // [[builtin(kFragDepth)]] p: i32; + // @builtin(kFragDepth) p: i32; // }; - // [[stage(fragment)]] - // fn fragShader(is_front: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(is_front: MyInputs) -> @location(0) f32 { return 1.0; } auto* m = Member( "frag_depth", ty.i32(), @@ -307,10 +307,10 @@ TEST_F(ResolverBuiltinsValidationTest, FragDepthNotF32_Struct_Fail) { TEST_F(ResolverBuiltinsValidationTest, SampleMaskNotU32_Struct_Fail) { // struct MyInputs { - // [[builtin(sample_mask)]] m: f32; + // @builtin(sample_mask) m: f32; // }; - // [[stage(fragment)]] - // fn fragShader(is_front: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(is_front: MyInputs) -> @location(0) f32 { return 1.0; } auto* s = Structure( "MyInputs", {Member("m", ty.f32(), @@ -325,8 +325,8 @@ TEST_F(ResolverBuiltinsValidationTest, SampleMaskNotU32_Struct_Fail) { } TEST_F(ResolverBuiltinsValidationTest, SampleMaskNotU32_ReturnType_Fail) { - // [[stage(fragment)]] - // fn main() -> [[builtin(sample_mask)]] i32 { return 1; } + // @stage(fragment) + // fn main() -> @builtin(sample_mask) i32 { return 1; } Func("main", {}, ty.i32(), {Return(1)}, {Stage(ast::PipelineStage::kFragment)}, {Builtin(Source{{12, 34}}, ast::Builtin::kSampleMask)}); @@ -337,10 +337,10 @@ TEST_F(ResolverBuiltinsValidationTest, SampleMaskNotU32_ReturnType_Fail) { } TEST_F(ResolverBuiltinsValidationTest, SampleMaskIsNotU32_Fail) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(sample_mask)]] arg: bool - // ) -> [[location(0)]] f32 { return 1.0; } + // @builtin(sample_mask) arg: bool + // ) -> @location(0) f32 { return 1.0; } auto* arg = Param("arg", ty.bool_(), ast::DecorationList{ Builtin(Source{{12, 34}}, ast::Builtin::kSampleMask)}); @@ -354,10 +354,10 @@ TEST_F(ResolverBuiltinsValidationTest, SampleMaskIsNotU32_Fail) { TEST_F(ResolverBuiltinsValidationTest, SampleIndexIsNotU32_Struct_Fail) { // struct MyInputs { - // [[builtin(sample_index)]] m: f32; + // @builtin(sample_index) m: f32; // }; - // [[stage(fragment)]] - // fn fragShader(is_front: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(is_front: MyInputs) -> @location(0) f32 { return 1.0; } auto* s = Structure( "MyInputs", {Member("m", ty.f32(), @@ -372,10 +372,10 @@ TEST_F(ResolverBuiltinsValidationTest, SampleIndexIsNotU32_Struct_Fail) { } TEST_F(ResolverBuiltinsValidationTest, SampleIndexIsNotU32_Fail) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(sample_index)]] arg: bool - // ) -> [[location(0)]] f32 { return 1.0; } + // @builtin(sample_index) arg: bool + // ) -> @location(0) f32 { return 1.0; } auto* arg = Param("arg", ty.bool_(), ast::DecorationList{ Builtin(Source{{12, 34}}, ast::Builtin::kSampleIndex)}); @@ -388,10 +388,10 @@ TEST_F(ResolverBuiltinsValidationTest, SampleIndexIsNotU32_Fail) { } TEST_F(ResolverBuiltinsValidationTest, PositionIsNotF32_Fail) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(kPosition)]] p: vec3, - // ) -> [[location(0)]] f32 { return 1.0; } + // @builtin(kPosition) p: vec3, + // ) -> @location(0) f32 { return 1.0; } auto* p = Param( "p", ty.vec3(), ast::DecorationList{Builtin(Source{{12, 34}}, ast::Builtin::kPosition)}); @@ -404,8 +404,8 @@ TEST_F(ResolverBuiltinsValidationTest, PositionIsNotF32_Fail) { } TEST_F(ResolverBuiltinsValidationTest, FragDepthIsNotF32_Fail) { - // [[stage(fragment)]] - // fn fs_main() -> [[builtin(kFragDepth)]] f32 { var fd: i32; return fd; } + // @stage(fragment) + // fn fs_main() -> @builtin(kFragDepth) f32 { var fd: i32; return fd; } auto* fd = Var("fd", ty.i32()); Func( "fs_main", {}, ty.i32(), {Decl(fd), Return(fd)}, @@ -417,11 +417,11 @@ TEST_F(ResolverBuiltinsValidationTest, FragDepthIsNotF32_Fail) { } TEST_F(ResolverBuiltinsValidationTest, VertexIndexIsNotU32_Fail) { - // [[stage(vertex)]] + // @stage(vertex) // fn main( - // [[builtin(kVertexIndex)]] vi : f32, - // [[builtin(kPosition)]] p :vec4 - // ) -> [[builtin(kPosition)]] vec4 { return vec4(); } + // @builtin(kVertexIndex) vi : f32, + // @builtin(kPosition) p :vec4 + // ) -> @builtin(kPosition) vec4 { return vec4(); } auto* p = Param("p", ty.vec4(), ast::DecorationList{Builtin(ast::Builtin::kPosition)}); auto* vi = Param("vi", ty.f32(), @@ -436,11 +436,11 @@ TEST_F(ResolverBuiltinsValidationTest, VertexIndexIsNotU32_Fail) { } TEST_F(ResolverBuiltinsValidationTest, InstanceIndexIsNotU32) { - // [[stage(vertex)]] + // @stage(vertex) // fn main( - // [[builtin(kInstanceIndex)]] ii : f32, - // [[builtin(kPosition)]] p :vec4 - // ) -> [[builtin(kPosition)]] vec4 { return vec4(); } + // @builtin(kInstanceIndex) ii : f32, + // @builtin(kPosition) p :vec4 + // ) -> @builtin(kPosition) vec4 { return vec4(); } auto* p = Param("p", ty.vec4(), ast::DecorationList{Builtin(ast::Builtin::kPosition)}); auto* ii = Param("ii", ty.f32(), @@ -455,13 +455,13 @@ TEST_F(ResolverBuiltinsValidationTest, InstanceIndexIsNotU32) { } TEST_F(ResolverBuiltinsValidationTest, FragmentBuiltin_Pass) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(kPosition)]] p: vec4, - // [[builtin(front_facing)]] ff: bool, - // [[builtin(sample_index)]] si: u32, - // [[builtin(sample_mask)]] sm : u32 - // ) -> [[builtin(frag_depth)]] f32 { var fd: f32; return fd; } + // @builtin(kPosition) p: vec4, + // @builtin(front_facing) ff: bool, + // @builtin(sample_index) si: u32, + // @builtin(sample_mask) sm : u32 + // ) -> @builtin(frag_depth) f32 { var fd: f32; return fd; } auto* p = Param("p", ty.vec4(), ast::DecorationList{Builtin(ast::Builtin::kPosition)}); auto* ff = Param("ff", ty.bool_(), @@ -479,11 +479,11 @@ TEST_F(ResolverBuiltinsValidationTest, FragmentBuiltin_Pass) { } TEST_F(ResolverBuiltinsValidationTest, VertexBuiltin_Pass) { - // [[stage(vertex)]] + // @stage(vertex) // fn main( - // [[builtin(vertex_index)]] vi : u32, - // [[builtin(instance_index)]] ii : u32, - // ) -> [[builtin(position)]] vec4 { var p :vec4; return p; } + // @builtin(vertex_index) vi : u32, + // @builtin(instance_index) ii : u32, + // ) -> @builtin(position) vec4 { var p :vec4; return p; } auto* vi = Param("vi", ty.u32(), ast::DecorationList{ Builtin(Source{{12, 34}}, ast::Builtin::kVertexIndex)}); @@ -504,13 +504,13 @@ TEST_F(ResolverBuiltinsValidationTest, VertexBuiltin_Pass) { } TEST_F(ResolverBuiltinsValidationTest, ComputeBuiltin_Pass) { - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn main( - // [[builtin(local_invocationId)]] li_id: vec3, - // [[builtin(local_invocationIndex)]] li_index: u32, - // [[builtin(global_invocationId)]] gi: vec3, - // [[builtin(workgroup_id)]] wi: vec3, - // [[builtin(num_workgroups)]] nwgs: vec3, + // @builtin(local_invocationId) li_id: vec3, + // @builtin(local_invocationIndex) li_index: u32, + // @builtin(global_invocationId) gi: vec3, + // @builtin(workgroup_id) wi: vec3, + // @builtin(num_workgroups) nwgs: vec3, // ) {} auto* li_id = @@ -618,13 +618,13 @@ TEST_F(ResolverBuiltinsValidationTest, TEST_F(ResolverBuiltinsValidationTest, FragmentBuiltinStruct_Pass) { // Struct MyInputs { - // [[builtin(kPosition)]] p: vec4; - // [[builtin(frag_depth)]] fd: f32; - // [[builtin(sample_index)]] si: u32; - // [[builtin(sample_mask)]] sm : u32;; + // @builtin(kPosition) p: vec4; + // @builtin(frag_depth) fd: f32; + // @builtin(sample_index) si: u32; + // @builtin(sample_mask) sm : u32;; // }; - // [[stage(fragment)]] - // fn fragShader(arg: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(arg: MyInputs) -> @location(0) f32 { return 1.0; } auto* s = Structure( "MyInputs", @@ -642,10 +642,10 @@ TEST_F(ResolverBuiltinsValidationTest, FragmentBuiltinStruct_Pass) { } TEST_F(ResolverBuiltinsValidationTest, FrontFacingParamIsNotBool_Fail) { - // [[stage(fragment)]] + // @stage(fragment) // fn fs_main( - // [[builtin(front_facing)]] is_front: i32; - // ) -> [[location(0)]] f32 { return 1.0; } + // @builtin(front_facing) is_front: i32; + // ) -> @location(0) f32 { return 1.0; } auto* is_front = Param("is_front", ty.i32(), ast::DecorationList{Builtin( @@ -661,10 +661,10 @@ TEST_F(ResolverBuiltinsValidationTest, FrontFacingParamIsNotBool_Fail) { TEST_F(ResolverBuiltinsValidationTest, FrontFacingMemberIsNotBool_Fail) { // struct MyInputs { - // [[builtin(front_facing)]] pos: f32; + // @builtin(front_facing) pos: f32; // }; - // [[stage(fragment)]] - // fn fragShader(is_front: MyInputs) -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn fragShader(is_front: MyInputs) -> @location(0) f32 { return 1.0; } auto* s = Structure( "MyInputs", {Member("pos", ty.f32(), diff --git a/src/resolver/call_validation_test.cc b/src/resolver/call_validation_test.cc index 86e4a17579..5af0bf9fbe 100644 --- a/src/resolver/call_validation_test.cc +++ b/src/resolver/call_validation_test.cc @@ -172,7 +172,7 @@ TEST_F(ResolverCallValidationTest, PointerArgument_FunctionParamWithMain) { // fn bar(p: ptr) { // foo(p); // } - // [[stage(fragment)]] + // @stage(fragment) // fn main() { // var v: i32; // bar(&v); @@ -195,7 +195,7 @@ TEST_F(ResolverCallValidationTest, PointerArgument_FunctionParamWithMain) { TEST_F(ResolverCallValidationTest, LetPointer) { // fn x(p : ptr) -> i32 {} - // [[stage(fragment)]] + // @stage(fragment) // fn main() { // var v: i32; // let p: ptr = &v; @@ -227,7 +227,7 @@ TEST_F(ResolverCallValidationTest, LetPointerPrivate) { // let p: ptr = &v; // fn foo(p : ptr) -> i32 {} // var v: i32; - // [[stage(fragment)]] + // @stage(fragment) // fn main() { // var c: i32 = foo(p); // } diff --git a/src/resolver/decoration_validation_test.cc b/src/resolver/decoration_validation_test.cc index 8f043d6abd..592ba15fc9 100644 --- a/src/resolver/decoration_validation_test.cc +++ b/src/resolver/decoration_validation_test.cc @@ -973,9 +973,9 @@ TEST_F(ResourceDecorationTest, UniformBufferMissingBinding) { Global(Source{{12, 34}}, "G", ty.Of(s), ast::StorageClass::kUniform); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, StorageBufferMissingBinding) { @@ -985,9 +985,9 @@ TEST_F(ResourceDecorationTest, StorageBufferMissingBinding) { ast::Access::kRead); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, TextureMissingBinding) { @@ -995,9 +995,9 @@ TEST_F(ResourceDecorationTest, TextureMissingBinding) { ast::StorageClass::kNone); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, SamplerMissingBinding) { @@ -1005,9 +1005,9 @@ TEST_F(ResourceDecorationTest, SamplerMissingBinding) { ast::StorageClass::kNone); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, BindingPairMissingBinding) { @@ -1018,9 +1018,9 @@ TEST_F(ResourceDecorationTest, BindingPairMissingBinding) { }); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, BindingPairMissingGroup) { @@ -1031,9 +1031,9 @@ TEST_F(ResourceDecorationTest, BindingPairMissingGroup) { }); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: resource variables require [[group]] and [[binding]] " - "decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: resource variables require @group and @binding decorations)"); } TEST_F(ResourceDecorationTest, BindingPointUsedTwiceByEntryPoint) { @@ -1064,7 +1064,7 @@ TEST_F(ResourceDecorationTest, BindingPointUsedTwiceByEntryPoint) { EXPECT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(56:78 error: entry point 'F' references multiple variables that use the same resource binding [[group(2), binding(1)]] + R"(56:78 error: entry point 'F' references multiple variables that use the same resource binding @group(2), @binding(1) 12:34 note: first resource binding usage declared here)"); } @@ -1108,9 +1108,9 @@ TEST_F(ResourceDecorationTest, BindingPointOnNonResource) { }); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: non-resource variables must not have [[group]] or " - "[[binding]] decorations"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: non-resource variables must not have @group or @binding decorations)"); } } // namespace @@ -1368,9 +1368,9 @@ TEST_F(InterpolateTest, MissingLocationAttribute_Parameter) { ast::DecorationList{Stage(ast::PipelineStage::kFragment)}); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: interpolate attribute must only be used with " - "[[location]]"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: interpolate attribute must only be used with @location)"); } TEST_F(InterpolateTest, MissingLocationAttribute_ReturnType) { @@ -1381,9 +1381,9 @@ TEST_F(InterpolateTest, MissingLocationAttribute_ReturnType) { ast::InterpolationSampling::kNone)}); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: interpolate attribute must only be used with " - "[[location]]"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: interpolate attribute must only be used with @location)"); } TEST_F(InterpolateTest, MissingLocationAttribute_Struct) { @@ -1393,9 +1393,9 @@ TEST_F(InterpolateTest, MissingLocationAttribute_Struct) { ast::InterpolationSampling::kNone)})}); EXPECT_FALSE(r()->Resolve()); - EXPECT_EQ(r()->error(), - "12:34 error: interpolate attribute must only be used with " - "[[location]]"); + EXPECT_EQ( + r()->error(), + R"(12:34 error: interpolate attribute must only be used with @location)"); } } // namespace diff --git a/src/resolver/entry_point_validation_test.cc b/src/resolver/entry_point_validation_test.cc index 0fc620b54c..a2c0eace43 100644 --- a/src/resolver/entry_point_validation_test.cc +++ b/src/resolver/entry_point_validation_test.cc @@ -51,8 +51,8 @@ class ResolverEntryPointValidationTest : public TestHelper, public testing::Test {}; TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Location) { - // [[stage(fragment)]] - // fn main() -> [[location(0)]] f32 { return 1.0; } + // @stage(fragment) + // fn main() -> @location(0) f32 { return 1.0; } Func(Source{{12, 34}}, "main", {}, ty.f32(), {Return(1.0f)}, {Stage(ast::PipelineStage::kFragment)}, {Location(0)}); @@ -60,8 +60,8 @@ TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Location) { } TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Builtin) { - // [[stage(vertex)]] - // fn main() -> [[builtin(position)]] vec4 { return vec4(); } + // @stage(vertex) + // fn main() -> @builtin(position) vec4 { return vec4(); } Func(Source{{12, 34}}, "main", {}, ty.vec4(), {Return(Construct(ty.vec4()))}, {Stage(ast::PipelineStage::kVertex)}, @@ -71,7 +71,7 @@ TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Builtin) { } TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Missing) { - // [[stage(vertex)]] + // @stage(vertex) // fn main() -> f32 { // return 1.0; // } @@ -85,8 +85,8 @@ TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Missing) { } TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Multiple) { - // [[stage(vertex)]] - // fn main() -> [[location(0)]] [[builtin(position)]] vec4 { + // @stage(vertex) + // fn main() -> @location(0) @builtin(position) vec4 { // return vec4(); // } Func(Source{{12, 34}}, "main", {}, ty.vec4(), @@ -102,10 +102,10 @@ TEST_F(ResolverEntryPointValidationTest, ReturnTypeAttribute_Multiple) { TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_Valid) { // struct Output { - // [[location(0)]] a : f32; - // [[builtin(frag_depth)]] b : f32; + // @location(0) a : f32; + // @builtin(frag_depth) b : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -122,9 +122,9 @@ TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_Valid) { TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_MemberMultipleAttributes) { // struct Output { - // [[location(0)]] [[builtin(frag_depth)]] a : f32; + // @location(0) @builtin(frag_depth) a : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -146,10 +146,10 @@ TEST_F(ResolverEntryPointValidationTest, TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_MemberMissingAttribute) { // struct Output { - // [[location(0)]] a : f32; + // @location(0) a : f32; // b : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -168,10 +168,10 @@ TEST_F(ResolverEntryPointValidationTest, TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_DuplicateBuiltins) { // struct Output { - // [[builtin(frag_depth)]] a : f32; - // [[builtin(frag_depth)]] b : f32; + // @builtin(frag_depth) a : f32; + // @builtin(frag_depth) b : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -190,8 +190,8 @@ TEST_F(ResolverEntryPointValidationTest, ReturnType_Struct_DuplicateBuiltins) { } TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Location) { - // [[stage(fragment)]] - // fn main([[location(0)]] param : f32) {} + // @stage(fragment) + // fn main(@location(0) param : f32) {} auto* param = Param("param", ty.f32(), {Location(0)}); Func(Source{{12, 34}}, "main", {param}, ty.void_(), {}, {Stage(ast::PipelineStage::kFragment)}); @@ -200,7 +200,7 @@ TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Location) { } TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Missing) { - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : f32) {} auto* param = Param(Source{{13, 43}}, "param", ty.vec4()); Func(Source{{12, 34}}, "main", {param}, ty.void_(), {}, @@ -212,8 +212,8 @@ TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Missing) { } TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Multiple) { - // [[stage(fragment)]] - // fn main([[location(0)]] [[builtin(sample_index)]] param : u32) {} + // @stage(fragment) + // fn main(@location(0) @builtin(sample_index) param : u32) {} auto* param = Param("param", ty.u32(), {Location(Source{{13, 43}}, 0), Builtin(Source{{14, 52}}, ast::Builtin::kSampleIndex)}); @@ -227,10 +227,10 @@ TEST_F(ResolverEntryPointValidationTest, ParameterAttribute_Multiple) { TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_Valid) { // struct Input { - // [[location(0)]] a : f32; - // [[builtin(sample_index)]] b : u32; + // @location(0) a : f32; + // @builtin(sample_index) b : u32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : Input) {} auto* input = Structure( "Input", {Member("a", ty.f32(), {Location(0)}), @@ -245,9 +245,9 @@ TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_Valid) { TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_MemberMultipleAttributes) { // struct Input { - // [[location(0)]] [[builtin(sample_index)]] a : u32; + // @location(0) @builtin(sample_index) a : u32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : Input) {} auto* input = Structure( "Input", @@ -267,10 +267,10 @@ TEST_F(ResolverEntryPointValidationTest, TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_MemberMissingAttribute) { // struct Input { - // [[location(0)]] a : f32; + // @location(0) a : f32; // b : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : Input) {} auto* input = Structure( "Input", {Member(Source{{13, 43}}, "a", ty.f32(), {Location(0)}), @@ -285,9 +285,9 @@ TEST_F(ResolverEntryPointValidationTest, } TEST_F(ResolverEntryPointValidationTest, Parameter_DuplicateBuiltins) { - // [[stage(fragment)]] - // fn main([[builtin(sample_index)]] param_a : u32, - // [[builtin(sample_index)]] param_b : u32) {} + // @stage(fragment) + // fn main(@builtin(sample_index) param_a : u32, + // @builtin(sample_index) param_b : u32) {} auto* param_a = Param("param_a", ty.u32(), {Builtin(ast::Builtin::kSampleIndex)}); auto* param_b = @@ -304,12 +304,12 @@ TEST_F(ResolverEntryPointValidationTest, Parameter_DuplicateBuiltins) { TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_DuplicateBuiltins) { // struct InputA { - // [[builtin(sample_index)]] a : u32; + // @builtin(sample_index) a : u32; // }; // struct InputB { - // [[builtin(sample_index)]] a : u32; + // @builtin(sample_index) a : u32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param_a : InputA, param_b : InputB) {} auto* input_a = Structure( "InputA", {Member("a", ty.u32(), {Builtin(ast::Builtin::kSampleIndex)})}); @@ -328,7 +328,7 @@ TEST_F(ResolverEntryPointValidationTest, Parameter_Struct_DuplicateBuiltins) { } TEST_F(ResolverEntryPointValidationTest, VertexShaderMustReturnPosition) { - // [[stage(vertex)]] + // @stage(vertex) // fn main() {} Func(Source{{12, 34}}, "main", {}, ty.void_(), {}, {Stage(ast::PipelineStage::kVertex)}); @@ -370,8 +370,8 @@ static constexpr Params cases[] = { }; TEST_P(TypeValidationTest, BareInputs) { - // [[stage(fragment)]] - // fn main([[location(0)]] a : *) {} + // @stage(fragment) + // fn main(@location(0) a : *) {} auto params = GetParam(); auto* a = Param("a", params.create_ast_type(*this), {Location(0)}); Func(Source{{12, 34}}, "main", {a}, ty.void_(), {}, @@ -386,9 +386,9 @@ TEST_P(TypeValidationTest, BareInputs) { TEST_P(TypeValidationTest, StructInputs) { // struct Input { - // [[location(0)]] a : *; + // @location(0) a : *; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(a : Input) {} auto params = GetParam(); auto* input = Structure( @@ -405,8 +405,8 @@ TEST_P(TypeValidationTest, StructInputs) { } TEST_P(TypeValidationTest, BareOutputs) { - // [[stage(fragment)]] - // fn main() -> [[location(0)]] * { + // @stage(fragment) + // fn main() -> @location(0) * { // return *(); // } auto params = GetParam(); @@ -423,9 +423,9 @@ TEST_P(TypeValidationTest, BareOutputs) { TEST_P(TypeValidationTest, StructOutputs) { // struct Output { - // [[location(0)]] a : *; + // @location(0) a : *; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -453,8 +453,8 @@ namespace { using LocationDecorationTests = ResolverTest; TEST_F(LocationDecorationTests, Pass) { - // [[stage(fragment)]] - // fn frag_main([[location(0)]] a: i32) {} + // @stage(fragment) + // fn frag_main(@location(0) a: i32) {} auto* p = Param(Source{{12, 34}}, "a", ty.i32(), {Location(0)}); Func("frag_main", {p}, ty.void_(), {}, @@ -464,8 +464,8 @@ TEST_F(LocationDecorationTests, Pass) { } TEST_F(LocationDecorationTests, BadType_Input_bool) { - // [[stage(fragment)]] - // fn frag_main([[location(0)]] a: bool) {} + // @stage(fragment) + // fn frag_main(@location(0) a: bool) {} auto* p = Param(Source{{12, 34}}, "a", ty.bool_(), {Location(Source{{34, 56}}, 0)}); @@ -481,8 +481,8 @@ TEST_F(LocationDecorationTests, BadType_Input_bool) { } TEST_F(LocationDecorationTests, BadType_Output_Array) { - // [[stage(fragment)]] - // fn frag_main()->[[location(0)]] array { return array(); } + // @stage(fragment) + // fn frag_main()->@location(0) array { return array(); } Func(Source{{12, 34}}, "frag_main", {}, ty.array(), {Return(Construct(ty.array()))}, @@ -500,8 +500,8 @@ TEST_F(LocationDecorationTests, BadType_Input_Struct) { // struct Input { // a : f32; // }; - // [[stage(fragment)]] - // fn main([[location(0)]] param : Input) {} + // @stage(fragment) + // fn main(@location(0) param : Input) {} auto* input = Structure("Input", {Member("a", ty.f32())}); auto* param = Param(Source{{12, 34}}, "param", ty.Of(input), {Location(Source{{13, 43}}, 0)}); @@ -518,12 +518,12 @@ TEST_F(LocationDecorationTests, BadType_Input_Struct) { TEST_F(LocationDecorationTests, BadType_Input_Struct_NestedStruct) { // struct Inner { - // [[location(0)]] b : f32; + // @location(0) b : f32; // }; // struct Input { // a : Inner; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : Input) {} auto* inner = Structure( "Inner", {Member(Source{{13, 43}}, "a", ty.f32(), {Location(0)})}); @@ -542,9 +542,9 @@ TEST_F(LocationDecorationTests, BadType_Input_Struct_NestedStruct) { TEST_F(LocationDecorationTests, BadType_Input_Struct_RuntimeArray) { // [[block]] // struct Input { - // [[location(0)]] a : array; + // @location(0) a : array; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param : Input) {} auto* input = Structure( "Input", @@ -564,8 +564,8 @@ TEST_F(LocationDecorationTests, BadType_Input_Struct_RuntimeArray) { TEST_F(LocationDecorationTests, BadMemberType_Input) { // [[block]] - // struct S { [[location(0)]] m: array; }; - // [[stage(fragment)]] + // struct S { @location(0) m: array; }; + // @stage(fragment) // fn frag_main( a: S) {} auto* m = Member(Source{{34, 56}}, "m", ty.array(), @@ -585,8 +585,8 @@ TEST_F(LocationDecorationTests, BadMemberType_Input) { } TEST_F(LocationDecorationTests, BadMemberType_Output) { - // struct S { [[location(0)]] m: atomic; }; - // [[stage(fragment)]] + // struct S { @location(0) m: atomic; }; + // @stage(fragment) // fn frag_main() -> S {} auto* m = Member(Source{{34, 56}}, "m", ty.atomic(), ast::DecorationList{Location(Source{{12, 34}}, 0u)}); @@ -604,7 +604,7 @@ TEST_F(LocationDecorationTests, BadMemberType_Output) { } TEST_F(LocationDecorationTests, BadMemberType_Unused) { - // struct S { [[location(0)]] m: mat3x2; }; + // struct S { @location(0) m: mat3x2; }; auto* m = Member(Source{{34, 56}}, "m", ty.mat3x2(), ast::DecorationList{Location(Source{{12, 34}}, 0u)}); @@ -620,10 +620,10 @@ TEST_F(LocationDecorationTests, BadMemberType_Unused) { TEST_F(LocationDecorationTests, ReturnType_Struct_Valid) { // struct Output { - // [[location(0)]] a : f32; - // [[builtin(frag_depth)]] b : f32; + // @location(0) a : f32; + // @builtin(frag_depth) b : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -641,8 +641,8 @@ TEST_F(LocationDecorationTests, ReturnType_Struct) { // struct Output { // a : f32; // }; - // [[stage(vertex)]] - // fn main() -> [[location(0)]] Output { + // @stage(vertex) + // fn main() -> @location(0) Output { // return Output(); // } auto* output = Structure("Output", {Member("a", ty.f32())}); @@ -660,12 +660,12 @@ TEST_F(LocationDecorationTests, ReturnType_Struct) { TEST_F(LocationDecorationTests, ReturnType_Struct_NestedStruct) { // struct Inner { - // [[location(0)]] b : f32; + // @location(0) b : f32; // }; // struct Output { // a : Inner; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { return Output(); } auto* inner = Structure( "Inner", {Member(Source{{13, 43}}, "a", ty.f32(), {Location(0)})}); @@ -684,9 +684,9 @@ TEST_F(LocationDecorationTests, ReturnType_Struct_NestedStruct) { TEST_F(LocationDecorationTests, ReturnType_Struct_RuntimeArray) { // [[block]] // struct Output { - // [[location(0)]] a : array; + // @location(0) a : array; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main() -> Output { // return Output(); // } @@ -760,9 +760,9 @@ TEST_F(LocationDecorationTests, ComputeShaderLocationStructMember_Input) { } TEST_F(LocationDecorationTests, Duplicate_input) { - // [[stage(fragment)]] - // fn main([[location(1)]] param_a : f32, - // [[location(1)]] param_b : f32) {} + // @stage(fragment) + // fn main(@location(1) param_a : f32, + // @location(1) param_b : f32) {} auto* param_a = Param("param_a", ty.f32(), {Location(1)}); auto* param_b = Param("param_b", ty.f32(), {Location(Source{{12, 34}}, 1)}); Func(Source{{12, 34}}, "main", {param_a, param_b}, ty.void_(), {}, @@ -775,12 +775,12 @@ TEST_F(LocationDecorationTests, Duplicate_input) { TEST_F(LocationDecorationTests, Duplicate_struct) { // struct InputA { - // [[location(1)]] a : f32; + // @location(1) a : f32; // }; // struct InputB { - // [[location(1)]] a : f32; + // @location(1) a : f32; // }; - // [[stage(fragment)]] + // @stage(fragment) // fn main(param_a : InputA, param_b : InputB) {} auto* input_a = Structure("InputA", {Member("a", ty.f32(), {Location(1)})}); auto* input_b = Structure( diff --git a/src/resolver/function_validation_test.cc b/src/resolver/function_validation_test.cc index f2976de4ec..62631690bb 100644 --- a/src/resolver/function_validation_test.cc +++ b/src/resolver/function_validation_test.cc @@ -353,7 +353,7 @@ TEST_F(ResolverFunctionValidationTest, } TEST_F(ResolverFunctionValidationTest, CannotCallEntryPoint) { - // [[stage(compute), workgroup_size(1)]] fn entrypoint() {} + // @stage(compute) @workgroup_size(1) fn entrypoint() {} // fn func() { return entrypoint(); } Func("entrypoint", ast::VariableList{}, ty.void_(), {}, {Stage(ast::PipelineStage::kCompute), WorkgroupSize(1)}); @@ -371,8 +371,8 @@ TEST_F(ResolverFunctionValidationTest, CannotCallEntryPoint) { } TEST_F(ResolverFunctionValidationTest, PipelineStage_MustBeUnique_Fail) { - // [[stage(fragment)]] - // [[stage(vertex)]] + // @stage(fragment) + // @stage(vertex) // fn main() { return; } Func(Source{{12, 34}}, "main", ast::VariableList{}, ty.void_(), ast::StatementList{ @@ -440,7 +440,7 @@ TEST_F(ResolverFunctionValidationTest, FunctionParamsConst) { TEST_F(ResolverFunctionValidationTest, WorkgroupSize_GoodType_ConstU32) { // let x = 4u; // let x = 8u; - // [[stage(compute), workgroup_size(x, y, 16u)]] + // @stage(compute) @workgroup_size(x, y, 16u) // fn main() {} auto* x = GlobalConst("x", ty.u32(), Expr(4u)); auto* y = GlobalConst("y", ty.u32(), Expr(8u)); diff --git a/src/resolver/intrinsic_validation_test.cc b/src/resolver/intrinsic_validation_test.cc index edae91fcd5..80a3dc9c44 100644 --- a/src/resolver/intrinsic_validation_test.cc +++ b/src/resolver/intrinsic_validation_test.cc @@ -36,7 +36,7 @@ TEST_F(ResolverIntrinsicValidationTest, } TEST_F(ResolverIntrinsicValidationTest, InvalidPipelineStageDirect) { - // [[stage(compute), workgroup_size(1)]] fn func { return dpdx(1.0); } + // @stage(compute) @workgroup_size(1) fn func { return dpdx(1.0); } auto* dpdx = create(Source{{3, 4}}, Expr("dpdx"), ast::ExpressionList{Expr(1.0f)}); @@ -53,7 +53,7 @@ TEST_F(ResolverIntrinsicValidationTest, InvalidPipelineStageIndirect) { // fn f0 { return dpdx(1.0); } // fn f1 { f0(); } // fn f2 { f1(); } - // [[stage(compute), workgroup_size(1)]] fn main { return f2(); } + // @stage(compute) @workgroup_size(1) fn main { return f2(); } auto* dpdx = create(Source{{3, 4}}, Expr("dpdx"), ast::ExpressionList{Expr(1.0f)}); diff --git a/src/resolver/ptr_ref_validation_test.cc b/src/resolver/ptr_ref_validation_test.cc index 367b209aaf..003388a065 100644 --- a/src/resolver/ptr_ref_validation_test.cc +++ b/src/resolver/ptr_ref_validation_test.cc @@ -53,7 +53,7 @@ TEST_F(ResolverPtrRefValidationTest, AddressOfLet) { } TEST_F(ResolverPtrRefValidationTest, AddressOfHandle) { - // [[group(0), binding(0)]] var t: texture_3d; + // @group(0) @binding(0) var t: texture_3d; // &t Global("t", ty.sampled_texture(ast::TextureDimension::k3d, ty.f32()), GroupAndBinding(0u, 0u)); @@ -95,7 +95,7 @@ TEST_F(ResolverPtrRefValidationTest, AddressOfVectorComponent_IndexAccessor) { } TEST_F(ResolverPtrRefValidationTest, IndirectOfAddressOfHandle) { - // [[group(0), binding(0)]] var t: texture_3d; + // @group(0) @binding(0) var t: texture_3d; // *&t Global("t", ty.sampled_texture(ast::TextureDimension::k3d, ty.f32()), GroupAndBinding(0u, 0u)); @@ -142,7 +142,7 @@ TEST_F(ResolverPtrRefValidationTest, InferredPtrAccessMismatch) { // [[block]] struct S { // inner: Inner; // } - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // fn f() { // let p : pointer = &s.inner.arr[2]; // } diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index 434f7ff1e7..1cfed25051 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -2151,7 +2151,7 @@ sem::Array* Resolver::Array(const ast::Array* arr) { return nullptr; } - // Look for explicit stride via [[stride(n)]] decoration + // Look for explicit stride via @stride(n) decoration uint32_t explicit_stride = 0; for (auto* deco : arr->decorations) { Mark(deco); diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc index a32f56392f..5b97b259a9 100644 --- a/src/resolver/resolver_test.cc +++ b/src/resolver/resolver_test.cc @@ -920,7 +920,7 @@ TEST_F(ResolverTest, Function_CallSites) { } TEST_F(ResolverTest, Function_WorkgroupSize_NotSet) { - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn main() {} auto* func = Func("main", ast::VariableList{}, ty.void_(), {}, {}); @@ -938,7 +938,7 @@ TEST_F(ResolverTest, Function_WorkgroupSize_NotSet) { } TEST_F(ResolverTest, Function_WorkgroupSize_Literals) { - // [[stage(compute), workgroup_size(8, 2, 3)]] + // @stage(compute) @workgroup_size(8, 2, 3) // fn main() {} auto* func = Func("main", ast::VariableList{}, ty.void_(), {}, @@ -961,7 +961,7 @@ TEST_F(ResolverTest, Function_WorkgroupSize_Consts) { // let width = 16; // let height = 8; // let depth = 2; - // [[stage(compute), workgroup_size(width, height, depth)]] + // @stage(compute) @workgroup_size(width, height, depth) // fn main() {} GlobalConst("width", ty.i32(), Expr(16)); GlobalConst("height", ty.i32(), Expr(8)); @@ -986,7 +986,7 @@ TEST_F(ResolverTest, Function_WorkgroupSize_Consts) { TEST_F(ResolverTest, Function_WorkgroupSize_Consts_NestedInitializer) { // let width = i32(i32(i32(8))); // let height = i32(i32(i32(4))); - // [[stage(compute), workgroup_size(width, height)]] + // @stage(compute) @workgroup_size(width, height) // fn main() {} GlobalConst("width", ty.i32(), Construct(ty.i32(), Construct(ty.i32(), Construct(ty.i32(), 8)))); @@ -1010,10 +1010,10 @@ TEST_F(ResolverTest, Function_WorkgroupSize_Consts_NestedInitializer) { } TEST_F(ResolverTest, Function_WorkgroupSize_OverridableConsts) { - // [[override(0)]] let width = 16; - // [[override(1)]] let height = 8; - // [[override(2)]] let depth = 2; - // [[stage(compute), workgroup_size(width, height, depth)]] + // @override(0) let width = 16; + // @override(1) let height = 8; + // @override(2) let depth = 2; + // @stage(compute) @workgroup_size(width, height, depth) // fn main() {} auto* width = GlobalConst("width", ty.i32(), Expr(16), {Override(0)}); auto* height = GlobalConst("height", ty.i32(), Expr(8), {Override(1)}); @@ -1036,10 +1036,10 @@ TEST_F(ResolverTest, Function_WorkgroupSize_OverridableConsts) { } TEST_F(ResolverTest, Function_WorkgroupSize_OverridableConsts_NoInit) { - // [[override(0)]] let width : i32; - // [[override(1)]] let height : i32; - // [[override(2)]] let depth : i32; - // [[stage(compute), workgroup_size(width, height, depth)]] + // @override(0) let width : i32; + // @override(1) let height : i32; + // @override(2) let depth : i32; + // @stage(compute) @workgroup_size(width, height, depth) // fn main() {} auto* width = GlobalConst("width", ty.i32(), nullptr, {Override(0)}); auto* height = GlobalConst("height", ty.i32(), nullptr, {Override(1)}); @@ -1062,9 +1062,9 @@ TEST_F(ResolverTest, Function_WorkgroupSize_OverridableConsts_NoInit) { } TEST_F(ResolverTest, Function_WorkgroupSize_Mixed) { - // [[override(1)]] let height = 2; + // @override(1) let height = 2; // let depth = 3; - // [[stage(compute), workgroup_size(8, height, depth)]] + // @stage(compute) @workgroup_size(8, height, depth) // fn main() {} auto* height = GlobalConst("height", ty.i32(), Expr(2), {Override(0)}); GlobalConst("depth", ty.i32(), Expr(3)); @@ -1816,8 +1816,8 @@ TEST_F(ResolverTest, Access_SetForStorageBuffer) { } TEST_F(ResolverTest, BindingPoint_SetForResources) { - // [[group(1), binding(2)]] var s1 : sampler; - // [[group(3), binding(4)]] var s2 : sampler; + // @group(1) @binding(2) var s1 : sampler; + // @group(3) @binding(4) var s2 : sampler; auto* s1 = Global(Sym(), ty.sampler(ast::SamplerKind::kSampler), ast::DecorationList{create(1), create(2)}); diff --git a/src/resolver/resolver_validation.cc b/src/resolver/resolver_validation.cc index 3218e4af49..5edc4ee994 100644 --- a/src/resolver/resolver_validation.cc +++ b/src/resolver/resolver_validation.cc @@ -271,8 +271,8 @@ bool Resolver::ValidateStorageClassLayout(const sem::Struct* str, "' must be a multiple of " + std::to_string(required_align) + " bytes, but '" + member_name_of(m) + "' is currently at offset " + std::to_string(m->Offset()) + - ". Consider setting [[align(" + - std::to_string(required_align) + ")]] on this member", + ". Consider setting @align(" + + std::to_string(required_align) + ") on this member", m->Declaration()->source); AddNote("see layout of struct:\n" + str->Layout(builder_->Symbols()), @@ -299,7 +299,7 @@ bool Resolver::ValidateStorageClassLayout(const sem::Struct* str, "member be a multiple of 16 bytes, but there are currently " + std::to_string(prev_to_curr_offset) + " bytes between '" + member_name_of(prev_member) + "' and '" + member_name_of(m) + - "'. Consider setting [[align(16)]] on this member", + "'. Consider setting @align(16) on this member", m->Declaration()->source); AddNote("see layout of struct:\n" + str->Layout(builder_->Symbols()), @@ -326,10 +326,10 @@ bool Resolver::ValidateStorageClassLayout(const sem::Struct* str, "bytes, but array stride of '" + member_name_of(m) + "' is currently " + std::to_string(arr->Stride()) + - ". Consider setting [[stride(" + + ". Consider setting @stride(" + std::to_string( utils::RoundUp(required_align, arr->Stride())) + - ")]] on the array type", + ") on the array type", m->Declaration()->type->source); AddNote("see layout of struct:\n" + str->Layout(builder_->Symbols()), str->Declaration()->source); @@ -429,7 +429,7 @@ bool Resolver::ValidateGlobalVariable(const sem::Variable* var) { // attributes. if (!binding_point) { AddError( - "resource variables require [[group]] and [[binding]] " + "resource variables require @group and @binding " "decorations", decl->source); return false; @@ -441,7 +441,7 @@ bool Resolver::ValidateGlobalVariable(const sem::Variable* var) { // https://gpuweb.github.io/gpuweb/wgsl/#attribute-binding // Must only be applied to a resource variable AddError( - "non-resource variables must not have [[group]] or [[binding]] " + "non-resource variables must not have @group or @binding " "decorations", decl->source); return false; @@ -1037,7 +1037,7 @@ bool Resolver::ValidateEntryPoint(const sem::Function* func) { if (interpolate_attribute) { if (!pipeline_io_attribute || !pipeline_io_attribute->Is()) { - AddError("interpolate attribute must only be used with [[location]]", + AddError("interpolate attribute must only be used with @location", interpolate_attribute->source); return false; } @@ -1167,9 +1167,9 @@ bool Resolver::ValidateEntryPoint(const sem::Function* func) { auto func_name = builder_->Symbols().NameFor(decl->symbol); AddError("entry point '" + func_name + "' references multiple variables that use the " - "same resource binding [[group(" + - std::to_string(bp.group) + "), binding(" + - std::to_string(bp.binding) + ")]]", + "same resource binding @group(" + + std::to_string(bp.group) + "), @binding(" + + std::to_string(bp.binding) + ")", var_decl->source); AddNote("first resource binding usage declared here", res.first->second->source); @@ -2035,7 +2035,7 @@ bool Resolver::ValidateStructure(const sem::Struct* str) { } if (interpolate_attribute && !has_location) { - AddError("interpolate attribute must only be used with [[location]]", + AddError("interpolate attribute must only be used with @location", interpolate_attribute->source); return false; } diff --git a/src/resolver/storage_class_layout_validation_test.cc b/src/resolver/storage_class_layout_validation_test.cc index 467608d2f5..f9fcc121c8 100644 --- a/src/resolver/storage_class_layout_validation_test.cc +++ b/src/resolver/storage_class_layout_validation_test.cc @@ -28,10 +28,10 @@ TEST_F(ResolverStorageClassLayoutValidationTest, StorageBuffer_UnalignedMember) { // [[block]] // struct S { - // [[size(5)]] a : f32; - // [[align(1)]] b : f32; + // @size(5) a : f32; + // @align(1) b : f32; // }; - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : S; Structure(Source{{12, 34}}, "S", @@ -45,7 +45,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(34:56 error: the offset of a struct member of type 'f32' in storage class 'storage' must be a multiple of 4 bytes, but 'b' is currently at offset 5. Consider setting [[align(4)]] on this member + R"(34:56 error: the offset of a struct member of type 'f32' in storage class 'storage' must be a multiple of 4 bytes, but 'b' is currently at offset 5. Consider setting @align(4) on this member 12:34 note: see layout of struct: /* align(4) size(12) */ struct S { /* offset(0) align(4) size( 5) */ a : f32; @@ -59,10 +59,10 @@ TEST_F(ResolverStorageClassLayoutValidationTest, StorageBuffer_UnalignedMember_SuggestedFix) { // [[block]] // struct S { - // [[size(5)]] a : f32; - // [[align(4)]] b : f32; + // @size(5) a : f32; + // @align(4) b : f32; // }; - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : S; Structure(Source{{12, 34}}, "S", @@ -89,7 +89,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // inner : Inner; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Structure(Source{{12, 34}}, "Inner", {Member("scalar", ty.i32())}); @@ -107,7 +107,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(56:78 error: the offset of a struct member of type 'Inner' in storage class 'uniform' must be a multiple of 16 bytes, but 'inner' is currently at offset 4. Consider setting [[align(16)]] on this member + R"(56:78 error: the offset of a struct member of type 'Inner' in storage class 'uniform' must be a multiple of 16 bytes, but 'inner' is currently at offset 4. Consider setting @align(16) on this member 34:56 note: see layout of struct: /* align(4) size(8) */ struct Outer { /* offset(0) align(4) size(4) */ scalar : f32; @@ -129,10 +129,10 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // [[block]] // struct Outer { // scalar : f32; - // [[align(16)]] inner : Inner; + // @align(16) inner : Inner; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Structure(Source{{12, 34}}, "Inner", {Member("scalar", ty.i32())}); @@ -154,7 +154,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // Detect unaligned array member for uniform buffers TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_UnalignedMember_Array) { - // type Inner = [[stride(16)]] array; + // type Inner = @stride(16) array; // // [[block]] // struct Outer { @@ -162,7 +162,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // inner : Inner; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Alias("Inner", ty.array(ty.f32(), 10, 16)); @@ -179,26 +179,26 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(56:78 error: the offset of a struct member of type '[[stride(16)]] array' in storage class 'uniform' must be a multiple of 16 bytes, but 'inner' is currently at offset 4. Consider setting [[align(16)]] on this member + R"(56:78 error: the offset of a struct member of type '@stride(16) array' in storage class 'uniform' must be a multiple of 16 bytes, but 'inner' is currently at offset 4. Consider setting @align(16) on this member 12:34 note: see layout of struct: /* align(4) size(164) */ struct Outer { /* offset( 0) align(4) size( 4) */ scalar : f32; -/* offset( 4) align(4) size(160) */ inner : [[stride(16)]] array; +/* offset( 4) align(4) size(160) */ inner : @stride(16) array; /* */ }; 78:90 note: see declaration of variable)"); } TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_UnalignedMember_Array_SuggestedFix) { - // type Inner = [[stride(16)]] array; + // type Inner = @stride(16) array; // // [[block]] // struct Outer { // scalar : f32; - // [[align(16)]] inner : Inner; + // @align(16) inner : Inner; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Alias("Inner", ty.array(ty.f32(), 10, 16)); @@ -221,7 +221,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_MembersOffsetNotMultipleOf16) { // struct Inner { - // [[align(1), size(5)]] scalar : i32; + // @align(1) @size(5) scalar : i32; // }; // // [[block]] @@ -230,7 +230,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // scalar : i32; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Structure(Source{{12, 34}}, "Inner", @@ -249,7 +249,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(78:90 error: uniform storage requires that the number of bytes between the start of the previous member of type struct and the current member be a multiple of 16 bytes, but there are currently 8 bytes between 'inner' and 'scalar'. Consider setting [[align(16)]] on this member + R"(78:90 error: uniform storage requires that the number of bytes between the start of the previous member of type struct and the current member be a multiple of 16 bytes, but there are currently 8 bytes between 'inner' and 'scalar'. Consider setting @align(16) on this member 34:56 note: see layout of struct: /* align(4) size(12) */ struct Outer { /* offset( 0) align(1) size( 5) */ inner : Inner; @@ -270,7 +270,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // a : i32; // b : i32; // c : i32; - // [[align(1), size(5)]] scalar : i32; + // @align(1) @size(5) scalar : i32; // }; // // [[block]] @@ -279,7 +279,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // scalar : i32; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Structure(Source{{12, 34}}, "Inner", @@ -303,7 +303,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(78:90 error: uniform storage requires that the number of bytes between the start of the previous member of type struct and the current member be a multiple of 16 bytes, but there are currently 20 bytes between 'inner' and 'scalar'. Consider setting [[align(16)]] on this member + R"(78:90 error: uniform storage requires that the number of bytes between the start of the previous member of type struct and the current member be a multiple of 16 bytes, but there are currently 20 bytes between 'inner' and 'scalar'. Consider setting @align(16) on this member 34:56 note: see layout of struct: /* align(4) size(24) */ struct Outer { /* offset( 0) align(4) size(20) */ inner : Inner; @@ -323,16 +323,16 @@ TEST_F(ResolverStorageClassLayoutValidationTest, TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_MembersOffsetNotMultipleOf16_SuggestedFix) { // struct Inner { - // [[align(1), size(5)]] scalar : i32; + // @align(1) @size(5) scalar : i32; // }; // // [[block]] // struct Outer { - // [[align(16)]] inner : Inner; + // @align(16) inner : Inner; // scalar : i32; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Structure(Source{{12, 34}}, "Inner", @@ -360,7 +360,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // v : vec3; // s : f32; // }; - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : ScalarPackedAtEndOfVec3; Structure("ScalarPackedAtEndOfVec3", @@ -379,7 +379,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // Detect array stride must be a multiple of 16 bytes for uniform buffers TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_InvalidArrayStride) { - // type Inner = [[stride(8)]] array; + // type Inner = @stride(8) array; // // [[block]] // struct Outer { @@ -387,7 +387,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // scalar : i32; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Alias("Inner", ty.array(ty.f32(), 10, 8)); @@ -405,10 +405,10 @@ TEST_F(ResolverStorageClassLayoutValidationTest, ASSERT_FALSE(r()->Resolve()); EXPECT_EQ( r()->error(), - R"(34:56 error: uniform storage requires that array elements be aligned to 16 bytes, but array stride of 'inner' is currently 8. Consider setting [[stride(16)]] on the array type + R"(34:56 error: uniform storage requires that array elements be aligned to 16 bytes, but array stride of 'inner' is currently 8. Consider setting @stride(16) on the array type 12:34 note: see layout of struct: /* align(4) size(84) */ struct Outer { -/* offset( 0) align(4) size(80) */ inner : [[stride(8)]] array; +/* offset( 0) align(4) size(80) */ inner : @stride(8) array; /* offset(80) align(4) size( 4) */ scalar : i32; /* */ }; 78:90 note: see declaration of variable)"); @@ -416,7 +416,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, TEST_F(ResolverStorageClassLayoutValidationTest, UniformBuffer_InvalidArrayStride_SuggestedFix) { - // type Inner = [[stride(16)]] array; + // type Inner = @stride(16) array; // // [[block]] // struct Outer { @@ -424,7 +424,7 @@ TEST_F(ResolverStorageClassLayoutValidationTest, // scalar : i32; // }; // - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : Outer; Alias("Inner", ty.array(ty.f32(), 10, 16)); diff --git a/src/resolver/storage_class_validation_test.cc b/src/resolver/storage_class_validation_test.cc index 5d922c2f50..9965e08751 100644 --- a/src/resolver/storage_class_validation_test.cc +++ b/src/resolver/storage_class_validation_test.cc @@ -226,7 +226,7 @@ TEST_F(ResolverStorageClassValidationTest, StorageBufferNoError_Aliases) { TEST_F(ResolverStorageClassValidationTest, UniformBuffer_Struct_Runtime) { // [[block]] struct S { m: array; }; - // [[group(0), binding(0)]] var svar : S; + // @group(0) @binding(0) var svar : S; auto* s = Structure(Source{{12, 34}}, "S", {Member("m", ty.array())}, {create()}); diff --git a/src/resolver/type_validation_test.cc b/src/resolver/type_validation_test.cc index 08f37beb23..292a57fea1 100644 --- a/src/resolver/type_validation_test.cc +++ b/src/resolver/type_validation_test.cc @@ -79,7 +79,7 @@ TEST_F(ResolverTypeValidationTest, VariableDeclNoConstructor_Pass) { } TEST_F(ResolverTypeValidationTest, GlobalConstantNoConstructor_Pass) { - // [[override(0)]] let a :i32; + // @override(0) let a :i32; GlobalConst(Source{{12, 34}}, "a", ty.i32(), nullptr, ast::DecorationList{create(0)}); @@ -336,7 +336,7 @@ TEST_F(ResolverTypeValidationTest, ArraySize_TooBig_ImplicitStride) { } TEST_F(ResolverTypeValidationTest, ArraySize_TooBig_ExplicitStride) { - // var a : [[stride(8)]] array; + // var a : @stride(8) array; Global("a", ty.array(Source{{12, 34}}, ty.f32(), 0x20000000, 8), ast::StorageClass::kPrivate); EXPECT_FALSE(r()->Resolve()); @@ -396,7 +396,7 @@ TEST_F(ResolverTypeValidationTest, ArraySize_InvalidExpr) { } TEST_F(ResolverTypeValidationTest, RuntimeArrayInFunction_Fail) { - /// [[stage(vertex)]] + /// @stage(vertex) // fn func() { var a : array; } auto* var = @@ -594,7 +594,7 @@ TEST_F(ResolverTypeValidationTest, RuntimeArrayAsLocalVariable) { TEST_F(ResolverTypeValidationTest, RuntimeArrayAsParameter_Fail) { // fn func(a : array) {} - // [[stage(vertex)]] fn main() {} + // @stage(vertex) fn main() {} auto* param = Param(Source{{12, 34}}, "a", ty.array()); @@ -855,7 +855,7 @@ static constexpr DimensionParams Dimension_cases[] = { using StorageTextureDimensionTest = ResolverTestWithParam; TEST_P(StorageTextureDimensionTest, All) { - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_*; auto& params = GetParam(); @@ -905,13 +905,13 @@ static constexpr FormatParams format_cases[] = { using StorageTextureFormatTest = ResolverTestWithParam; TEST_P(StorageTextureFormatTest, All) { auto& params = GetParam(); - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_1d<*, write>; - // [[group(0), binding(1)]] + // @group(0) @binding(1) // var b : texture_storage_2d<*, write>; - // [[group(0), binding(2)]] + // @group(0) @binding(2) // var c : texture_storage_2d_array<*, write>; - // [[group(0), binding(3)]] + // @group(0) @binding(3) // var d : texture_storage_3d<*, write>; auto* st_a = ty.storage_texture(Source{{12, 34}}, ast::TextureDimension::k1d, @@ -951,7 +951,7 @@ INSTANTIATE_TEST_SUITE_P(ResolverTypeValidationTest, using StorageTextureAccessTest = ResolverTest; TEST_F(StorageTextureAccessTest, MissingAccess_Fail) { - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_1d; auto* st = @@ -967,7 +967,7 @@ TEST_F(StorageTextureAccessTest, MissingAccess_Fail) { } TEST_F(StorageTextureAccessTest, RWAccess_Fail) { - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_1d; auto* st = @@ -984,7 +984,7 @@ TEST_F(StorageTextureAccessTest, RWAccess_Fail) { } TEST_F(StorageTextureAccessTest, ReadOnlyAccess_Fail) { - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_1d; auto* st = ty.storage_texture(Source{{12, 34}}, ast::TextureDimension::k1d, @@ -1000,7 +1000,7 @@ TEST_F(StorageTextureAccessTest, ReadOnlyAccess_Fail) { } TEST_F(StorageTextureAccessTest, WriteOnlyAccess_Pass) { - // [[group(0), binding(0)]] + // @group(0) @binding(0) // var a : texture_storage_1d; auto* st = diff --git a/src/resolver/validation_test.cc b/src/resolver/validation_test.cc index 0b3152a6d8..2a8e41b513 100644 --- a/src/resolver/validation_test.cc +++ b/src/resolver/validation_test.cc @@ -80,7 +80,7 @@ TEST_F(ResolverValidationTest, WorkgroupMemoryUsedInFragmentStage) { // var dst : vec4; // fn f2(){ dst = wg; } // fn f1() { f2(); } - // [[stage(fragment)]] + // @stage(fragment) // fn f0() { // f1(); //} diff --git a/src/resolver/var_let_test.cc b/src/resolver/var_let_test.cc index 631537b47b..0bce0398d7 100644 --- a/src/resolver/var_let_test.cc +++ b/src/resolver/var_let_test.cc @@ -288,7 +288,7 @@ TEST_F(ResolverVarLetTest, LetInheritsAccessFromOriginatingVariable) { // [[block]] struct S { // inner: Inner; // } - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // fn f() { // let p = &s.inner.arr[2]; // } diff --git a/src/resolver/var_let_validation_test.cc b/src/resolver/var_let_validation_test.cc index 9ee07b0e80..8260136003 100644 --- a/src/resolver/var_let_validation_test.cc +++ b/src/resolver/var_let_validation_test.cc @@ -79,7 +79,7 @@ TEST_F(ResolverVarLetValidationTest, VarTypeNotStorable) { } TEST_F(ResolverVarLetValidationTest, LetTypeNotConstructible) { - // [[group(0), binding(0)]] var t1 : texture_2d; + // @group(0) @binding(0) var t1 : texture_2d; // let t2 : t1; auto* t1 = Global("t1", ty.sampled_texture(ast::TextureDimension::k2d, ty.f32()), @@ -223,7 +223,7 @@ TEST_F(ResolverVarLetValidationTest, InferredPtrStorageAccessMismatch) { // [[block]] struct S { // inner: Inner; // } - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // fn f() { // let p : pointer = &s.inner.arr[2]; // } @@ -286,7 +286,7 @@ TEST_F(ResolverVarLetValidationTest, NonConstructibleType_Struct_WithAtomic) { } TEST_F(ResolverVarLetValidationTest, NonConstructibleType_InferredType) { - // [[group(0), binding(0)]] var s : sampler; + // @group(0) @binding(0) var s : sampler; // fn foo() { // var v = s; // } diff --git a/src/sem/array.cc b/src/sem/array.cc index a5757bede4..9bb36041ae 100644 --- a/src/sem/array.cc +++ b/src/sem/array.cc @@ -58,7 +58,7 @@ std::string Array::type_name() const { std::string Array::FriendlyName(const SymbolTable& symbols) const { std::ostringstream out; if (!IsStrideImplicit()) { - out << "[[stride(" << stride_ << ")]] "; + out << "@stride(" << stride_ << ") "; } out << "array<" << element_->FriendlyName(symbols); if (!IsRuntimeSized()) { diff --git a/src/sem/array.h b/src/sem/array.h index b1992ffb35..feb40202b8 100644 --- a/src/sem/array.h +++ b/src/sem/array.h @@ -61,12 +61,12 @@ class Array : public Castable { /// @returns the byte alignment of the array /// @note this may differ from the alignment of a structure member of this - /// array type, if the member is annotated with the `[[align(n)]]` decoration. + /// array type, if the member is annotated with the `@align(n)` decoration. uint32_t Align() const override; /// @returns the byte size of the array /// @note this may differ from the size of a structure member of this array - /// type, if the member is annotated with the `[[size(n)]]` decoration. + /// type, if the member is annotated with the `@size(n)` decoration. uint32_t Size() const override; /// @returns the number of bytes from the start of one element of the diff --git a/src/sem/sem_array_test.cc b/src/sem/sem_array_test.cc index 04207b61cd..a74c58f2de 100644 --- a/src/sem/sem_array_test.cc +++ b/src/sem/sem_array_test.cc @@ -65,12 +65,12 @@ TEST_F(ArrayTest, FriendlyNameStaticSized) { TEST_F(ArrayTest, FriendlyNameRuntimeSizedNonImplicitStride) { auto* arr = create(create(), 0, 0, 4, 8, 4); - EXPECT_EQ(arr->FriendlyName(Symbols()), "[[stride(8)]] array"); + EXPECT_EQ(arr->FriendlyName(Symbols()), "@stride(8) array"); } TEST_F(ArrayTest, FriendlyNameStaticSizedNonImplicitStride) { auto* arr = create(create(), 5, 4, 20, 8, 4); - EXPECT_EQ(arr->FriendlyName(Symbols()), "[[stride(8)]] array"); + EXPECT_EQ(arr->FriendlyName(Symbols()), "@stride(8) array"); } TEST_F(ArrayTest, TypeName_RuntimeArray) { diff --git a/src/sem/struct.h b/src/sem/struct.h index 3c42c6c619..f0410580e9 100644 --- a/src/sem/struct.h +++ b/src/sem/struct.h @@ -89,13 +89,13 @@ class Struct : public Castable { /// @returns the byte alignment of the structure /// @note this may differ from the alignment of a structure member of this - /// structure type, if the member is annotated with the `[[align(n)]]` + /// structure type, if the member is annotated with the `@align(n)` /// decoration. uint32_t Align() const override; /// @returns the byte size of the structure /// @note this may differ from the size of a structure member of this - /// structure type, if the member is annotated with the `[[size(n)]]` + /// structure type, if the member is annotated with the `@size(n)` /// decoration. uint32_t Size() const override; diff --git a/src/transform/add_empty_entry_point_test.cc b/src/transform/add_empty_entry_point_test.cc index 722af1a504..4cee0bc601 100644 --- a/src/transform/add_empty_entry_point_test.cc +++ b/src/transform/add_empty_entry_point_test.cc @@ -28,7 +28,7 @@ TEST_F(AddEmptyEntryPointTest, EmptyModule) { auto* src = R"()"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn unused_entry_point() { } )"; @@ -40,7 +40,7 @@ fn unused_entry_point() { TEST_F(AddEmptyEntryPointTest, ExistingEntryPoint) { auto* src = R"( -[[stage(fragment)]] +@stage(fragment) fn main() { } )"; @@ -56,7 +56,7 @@ TEST_F(AddEmptyEntryPointTest, NameClash) { auto* src = R"(var unused_entry_point : f32;)"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn unused_entry_point_1() { } diff --git a/src/transform/add_spirv_block_decoration.h b/src/transform/add_spirv_block_decoration.h index c5e67bbd6b..2f23fb9182 100644 --- a/src/transform/add_spirv_block_decoration.h +++ b/src/transform/add_spirv_block_decoration.h @@ -24,10 +24,10 @@ namespace tint { namespace transform { /// AddSpirvBlockDecoration is a transform that adds an -/// [[internal(spirv_block)]] attribute to any structure that is used as the +/// `@internal(spirv_block)` attribute to any structure that is used as the /// store type of a buffer. If that structure is nested inside another structure /// or an array, then it is wrapped inside another structure which gets the -/// [[internal(spirv_block)]] attribute instead. +/// `@internal(spirv_block)` attribute instead. class AddSpirvBlockDecoration : public Castable { public: @@ -43,7 +43,7 @@ class AddSpirvBlockDecoration ~SpirvBlockDecoration() override; /// @return a short description of the internal decoration which will be - /// displayed as `[[internal()]]` + /// displayed as `@internal()` std::string InternalName() const override; /// Performs a deep clone of this object using the CloneContext `ctx`. diff --git a/src/transform/add_spirv_block_decoration_test.cc b/src/transform/add_spirv_block_decoration_test.cc index e504c500d2..3a8455fcb6 100644 --- a/src/transform/add_spirv_block_decoration_test.cc +++ b/src/transform/add_spirv_block_decoration_test.cc @@ -42,7 +42,7 @@ struct S { var p : S; -[[stage(fragment)]] +@stage(fragment) fn main() { p.f = 1.0; } @@ -57,11 +57,11 @@ fn main() { TEST_F(AddSpirvBlockDecorationTest, Noop_UsedForShaderIO) { auto* src = R"( struct S { - [[location(0)]] + @location(0) f : f32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> S { return S(); } @@ -75,23 +75,23 @@ fn main() -> S { TEST_F(AddSpirvBlockDecorationTest, BasicScalar) { auto* src = R"( -[[group(0), binding(0)]] +@group(0) @binding(0) var u : f32; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u; } )"; auto* expect = R"( -[[internal(spirv_block)]] +@internal(spirv_block) struct u_block { inner : f32; } -[[group(0), binding(0)]] var u : u_block; +@group(0) @binding(0) var u : u_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.inner; } @@ -104,23 +104,23 @@ fn main() { TEST_F(AddSpirvBlockDecorationTest, BasicArray) { auto* src = R"( -[[group(0), binding(0)]] +@group(0) @binding(0) var u : array, 4u>; -[[stage(fragment)]] +@stage(fragment) fn main() { let a = u; } )"; auto* expect = R"( -[[internal(spirv_block)]] +@internal(spirv_block) struct u_block { inner : array, 4u>; } -[[group(0), binding(0)]] var u : u_block; +@group(0) @binding(0) var u : u_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let a = u.inner; } @@ -135,10 +135,10 @@ TEST_F(AddSpirvBlockDecorationTest, BasicArray_Alias) { auto* src = R"( type Numbers = array, 4u>; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : Numbers; -[[stage(fragment)]] +@stage(fragment) fn main() { let a = u; } @@ -146,14 +146,14 @@ fn main() { auto* expect = R"( type Numbers = array, 4u>; -[[internal(spirv_block)]] +@internal(spirv_block) struct u_block { inner : array, 4u>; } -[[group(0), binding(0)]] var u : u_block; +@group(0) @binding(0) var u : u_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let a = u.inner; } @@ -170,23 +170,23 @@ struct S { f : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.f; } )"; auto* expect = R"( -[[internal(spirv_block)]] +@internal(spirv_block) struct S { f : f32; } -[[group(0), binding(0)]] var u : S; +@group(0) @binding(0) var u : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.f; } @@ -207,10 +207,10 @@ struct Outer { i : Inner; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : Outer; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.i.f; } @@ -220,14 +220,14 @@ struct Inner { f : f32; } -[[internal(spirv_block)]] +@internal(spirv_block) struct Outer { i : Inner; } -[[group(0), binding(0)]] var u : Outer; +@group(0) @binding(0) var u : Outer; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.i.f; } @@ -248,13 +248,13 @@ struct Outer { i : Inner; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u0 : Outer; -[[group(0), binding(1)]] +@group(0) @binding(1) var u1 : Inner; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.f; @@ -265,21 +265,21 @@ struct Inner { f : f32; } -[[internal(spirv_block)]] +@internal(spirv_block) struct Outer { i : Inner; } -[[group(0), binding(0)]] var u0 : Outer; +@group(0) @binding(0) var u0 : Outer; -[[internal(spirv_block)]] +@internal(spirv_block) struct u1_block { inner : Inner; } -[[group(0), binding(1)]] var u1 : u1_block; +@group(0) @binding(1) var u1 : u1_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.inner.f; @@ -303,10 +303,10 @@ struct Outer { var p : Outer; -[[group(0), binding(1)]] +@group(0) @binding(1) var u : Inner; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = p.i.f; let f1 = u.f; @@ -323,14 +323,14 @@ struct Outer { var p : Outer; -[[internal(spirv_block)]] +@internal(spirv_block) struct u_block { inner : Inner; } -[[group(0), binding(1)]] var u : u_block; +@group(0) @binding(1) var u : u_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = p.i.f; let f1 = u.inner.f; @@ -352,16 +352,16 @@ struct S { i : Inner; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u0 : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var u1 : Inner; -[[group(0), binding(2)]] +@group(0) @binding(2) var u2 : Inner; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.f; @@ -373,23 +373,23 @@ struct Inner { f : f32; } -[[internal(spirv_block)]] +@internal(spirv_block) struct S { i : Inner; } -[[group(0), binding(0)]] var u0 : S; +@group(0) @binding(0) var u0 : S; -[[internal(spirv_block)]] +@internal(spirv_block) struct u1_block { inner : Inner; } -[[group(0), binding(1)]] var u1 : u1_block; +@group(0) @binding(1) var u1 : u1_block; -[[group(0), binding(2)]] var u2 : u1_block; +@group(0) @binding(2) var u2 : u1_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.inner.f; @@ -408,10 +408,10 @@ struct S { f : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.f; let a = array(); @@ -422,14 +422,14 @@ struct S { f : f32; } -[[internal(spirv_block)]] +@internal(spirv_block) struct u_block { inner : S; } -[[group(0), binding(0)]] var u : u_block; +@group(0) @binding(0) var u : u_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f = u.inner.f; let a = array(); @@ -447,13 +447,13 @@ struct S { f : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u0 : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var u1 : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.f; let f1 = u1.f; @@ -465,16 +465,16 @@ struct S { f : f32; } -[[internal(spirv_block)]] +@internal(spirv_block) struct u0_block { inner : S; } -[[group(0), binding(0)]] var u0 : u0_block; +@group(0) @binding(0) var u0 : u0_block; -[[group(0), binding(1)]] var u1 : u0_block; +@group(0) @binding(1) var u1 : u0_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.inner.f; let f1 = u1.inner.f; @@ -501,13 +501,13 @@ struct Outer { type MyOuter = Outer; -[[group(0), binding(0)]] +@group(0) @binding(0) var u0 : MyOuter; -[[group(0), binding(1)]] +@group(0) @binding(1) var u1 : MyInner; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.f; @@ -520,23 +520,23 @@ struct Inner { type MyInner = Inner; -[[internal(spirv_block)]] +@internal(spirv_block) struct Outer { i : MyInner; } type MyOuter = Outer; -[[group(0), binding(0)]] var u0 : MyOuter; +@group(0) @binding(0) var u0 : MyOuter; -[[internal(spirv_block)]] +@internal(spirv_block) struct u1_block { inner : Inner; } -[[group(0), binding(1)]] var u1 : u1_block; +@group(0) @binding(1) var u1 : u1_block; -[[stage(fragment)]] +@stage(fragment) fn main() { let f0 = u0.i.f; let f1 = u1.inner.f; diff --git a/src/transform/array_length_from_uniform.h b/src/transform/array_length_from_uniform.h index 6ab1598fa2..bd7a46194d 100644 --- a/src/transform/array_length_from_uniform.h +++ b/src/transform/array_length_from_uniform.h @@ -38,7 +38,7 @@ namespace transform { /// buffer_size : array; /// }; /// -/// [[group(0), binding(30)]] +/// @group(0) @binding(30) /// var buffer_size_ubo : buffer_size_struct; /// ``` /// The binding group and number used for this uniform buffer is provided via diff --git a/src/transform/array_length_from_uniform_test.cc b/src/transform/array_length_from_uniform_test.cc index b9139a99ce..944fc6a4f4 100644 --- a/src/transform/array_length_from_uniform_test.cc +++ b/src/transform/array_length_from_uniform_test.cc @@ -52,9 +52,9 @@ TEST_F(ArrayLengthFromUniformTest, Error_MissingSimplifyPointers) { TEST_F(ArrayLengthFromUniformTest, Basic) { auto* src = R"( -[[group(0), binding(0)]] var sb : array; +@group(0) @binding(0) var sb : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb); } @@ -65,11 +65,11 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; -[[group(0), binding(0)]] var sb : array; +@group(0) @binding(0) var sb : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = (tint_symbol_1.buffer_size[0u][0u] / 4u); } @@ -95,9 +95,9 @@ struct SB { arr : array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb.arr); } @@ -108,16 +108,16 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; struct SB { x : i32; arr : array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = ((tint_symbol_1.buffer_size[0u][0u] - 4u) / 4u); } @@ -138,9 +138,9 @@ fn main() { TEST_F(ArrayLengthFromUniformTest, WithStride) { auto* src = R"( -[[group(0), binding(0)]] var sb : [[stride(64)]] array; +@group(0) @binding(0) var sb : @stride(64) array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb); } @@ -151,11 +151,11 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; -[[group(0), binding(0)]] var sb : [[stride(64)]] array; +@group(0) @binding(0) var sb : @stride(64) array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = (tint_symbol_1.buffer_size[0u][0u] / 64u); } @@ -179,12 +179,12 @@ TEST_F(ArrayLengthFromUniformTest, WithStride_InStruct) { struct SB { x : i32; y : f32; - arr : [[stride(64)]] array; + arr : @stride(64) array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb.arr); } @@ -195,17 +195,17 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; struct SB { x : i32; y : f32; - arr : [[stride(64)]] array; + arr : @stride(64) array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = ((tint_symbol_1.buffer_size[0u][0u] - 8u) / 64u); } @@ -239,13 +239,13 @@ struct SB4 { arr4 : array>; }; -[[group(0), binding(2)]] var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; -[[group(2), binding(2)]] var sb3 : array>; -[[group(3), binding(2)]] var sb4 : SB4; -[[group(4), binding(2)]] var sb5 : array>; +@group(0) @binding(2) var sb1 : SB1; +@group(1) @binding(2) var sb2 : SB2; +@group(2) @binding(2) var sb3 : array>; +@group(3) @binding(2) var sb4 : SB4; +@group(4) @binding(2) var sb5 : array>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = arrayLength(&(sb1.arr1)); var len2 : u32 = arrayLength(&(sb2.arr2)); @@ -261,7 +261,7 @@ struct tint_symbol { buffer_size : array, 2u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; struct SB1 { x : i32; @@ -278,17 +278,17 @@ struct SB4 { arr4 : array>; } -[[group(0), binding(2)]] var sb1 : SB1; +@group(0) @binding(2) var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; +@group(1) @binding(2) var sb2 : SB2; -[[group(2), binding(2)]] var sb3 : array>; +@group(2) @binding(2) var sb3 : array>; -[[group(3), binding(2)]] var sb4 : SB4; +@group(3) @binding(2) var sb4 : SB4; -[[group(4), binding(2)]] var sb5 : array>; +@group(4) @binding(2) var sb5 : array>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = ((tint_symbol_1.buffer_size[0u][0u] - 4u) / 4u); var len2 : u32 = ((tint_symbol_1.buffer_size[0u][1u] - 16u) / 16u); @@ -331,13 +331,13 @@ struct SB4 { arr4 : array>; }; -[[group(0), binding(2)]] var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; -[[group(2), binding(2)]] var sb3 : array>; -[[group(3), binding(2)]] var sb4 : SB4; -[[group(4), binding(2)]] var sb5 : array>; +@group(0) @binding(2) var sb1 : SB1; +@group(1) @binding(2) var sb2 : SB2; +@group(2) @binding(2) var sb3 : array>; +@group(3) @binding(2) var sb4 : SB4; +@group(4) @binding(2) var sb5 : array>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = arrayLength(&(sb1.arr1)); var len3 : u32 = arrayLength(&sb3); @@ -350,7 +350,7 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; struct SB1 { x : i32; @@ -367,17 +367,17 @@ struct SB4 { arr4 : array>; } -[[group(0), binding(2)]] var sb1 : SB1; +@group(0) @binding(2) var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; +@group(1) @binding(2) var sb2 : SB2; -[[group(2), binding(2)]] var sb3 : array>; +@group(2) @binding(2) var sb3 : array>; -[[group(3), binding(2)]] var sb4 : SB4; +@group(3) @binding(2) var sb4 : SB4; -[[group(4), binding(2)]] var sb5 : array>; +@group(4) @binding(2) var sb5 : array>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = ((tint_symbol_1.buffer_size[0u][0u] - 4u) / 4u); var len3 : u32 = (tint_symbol_1.buffer_size[0u][2u] / 16u); @@ -409,9 +409,9 @@ struct SB { arr : array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(&(sb.arr)); } @@ -442,11 +442,11 @@ struct SB2 { arr2 : array>; }; -[[group(0), binding(2)]] var sb1 : SB1; +@group(0) @binding(2) var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; +@group(1) @binding(2) var sb2 : SB2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = arrayLength(&(sb1.arr1)); var len2 : u32 = arrayLength(&(sb2.arr2)); @@ -459,7 +459,7 @@ struct tint_symbol { buffer_size : array, 1u>; } -[[group(0), binding(30)]] var tint_symbol_1 : tint_symbol; +@group(0) @binding(30) var tint_symbol_1 : tint_symbol; struct SB1 { x : i32; @@ -471,11 +471,11 @@ struct SB2 { arr2 : array>; } -[[group(0), binding(2)]] var sb1 : SB1; +@group(0) @binding(2) var sb1 : SB1; -[[group(1), binding(2)]] var sb2 : SB2; +@group(1) @binding(2) var sb2 : SB2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = ((tint_symbol_1.buffer_size[0u][0u] - 4u) / 4u); var len2 : u32 = arrayLength(&(sb2.arr2)); diff --git a/src/transform/binding_remapper_test.cc b/src/transform/binding_remapper_test.cc index de85cb0e93..5827cb2af9 100644 --- a/src/transform/binding_remapper_test.cc +++ b/src/transform/binding_remapper_test.cc @@ -30,11 +30,11 @@ struct S { a : f32; } -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -55,11 +55,11 @@ struct S { a : f32; }; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -69,11 +69,11 @@ struct S { a : f32; } -[[group(1), binding(2)]] var a : S; +@group(1) @binding(2) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -83,7 +83,7 @@ fn f() { BindingRemapper::BindingPoints{ {{2, 1}, {1, 2}}, // Remap {{4, 5}, {6, 7}}, // Not found - // Keep [[group(3), binding(2)]] as is + // Keep @group(3) @binding(2) as is }, BindingRemapper::AccessControls{}); auto got = Run(src, data); @@ -97,13 +97,13 @@ struct S { a : f32; }; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[group(4), binding(3)]] var c : S; +@group(4) @binding(3) var c : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -113,13 +113,13 @@ struct S { a : f32; } -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[group(4), binding(3)]] var c : S; +@group(4) @binding(3) var c : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -129,7 +129,7 @@ fn f() { BindingRemapper::BindingPoints{}, BindingRemapper::AccessControls{ {{2, 1}, ast::Access::kWrite}, // Modify access control - // Keep [[group(3), binding(2)]] as is + // Keep @group(3) @binding(2) as is {{4, 3}, ast::Access::kRead}, // Add access control }); auto got = Run(src, data); @@ -151,13 +151,13 @@ type, write WriteOnlyS = S; type A = S; -[[group(2), binding(1)]] var a : ReadOnlyS; +@group(2) @binding(1) var a : ReadOnlyS; -[[group(3), binding(2)]] var b : WriteOnlyS; +@group(3) @binding(2) var b : WriteOnlyS; -[[group(4), binding(3)]] var c : A; +@group(4) @binding(3) var c : A; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -173,13 +173,13 @@ type, write WriteOnlyS = S; type A = S; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : WriteOnlyS; +@group(3) @binding(2) var b : WriteOnlyS; -[[group(4), binding(3)]] var c : S; +@group(4) @binding(3) var c : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -189,7 +189,7 @@ fn f() { BindingRemapper::BindingPoints{}, BindingRemapper::AccessControls{ {{2, 1}, ast::Access::kWrite}, // Modify access control - // Keep [[group(3), binding(2)]] as is + // Keep @group(3) @binding(2) as is {{4, 3}, ast::Access::kRead}, // Add access control }); auto got = Run(src, data); @@ -203,11 +203,11 @@ struct S { a : f32; }; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -217,11 +217,11 @@ struct S { a : f32; } -[[group(4), binding(5)]] var a : S; +@group(4) @binding(5) var a : S; -[[group(6), binding(7)]] var b : S; +@group(6) @binding(7) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -247,15 +247,15 @@ struct S { i : i32; }; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[group(4), binding(3)]] var c : S; +@group(4) @binding(3) var c : S; -[[group(5), binding(4)]] var d : S; +@group(5) @binding(4) var d : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : i32 = (((a.i + b.i) + c.i) + d.i); } @@ -266,15 +266,15 @@ struct S { i : i32; } -[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var a : S; +@internal(disable_validation__binding_point_collision) @group(1) @binding(1) var a : S; -[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var b : S; +@internal(disable_validation__binding_point_collision) @group(1) @binding(1) var b : S; -[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var c : S; +@internal(disable_validation__binding_point_collision) @group(5) @binding(4) var c : S; -[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var d : S; +@internal(disable_validation__binding_point_collision) @group(5) @binding(4) var d : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : i32 = (((a.i + b.i) + c.i) + d.i); } @@ -299,20 +299,20 @@ struct S { i : i32; }; -[[group(2), binding(1)]] var a : S; +@group(2) @binding(1) var a : S; -[[group(3), binding(2)]] var b : S; +@group(3) @binding(2) var b : S; -[[group(4), binding(3)]] var c : S; +@group(4) @binding(3) var c : S; -[[group(5), binding(4)]] var d : S; +@group(5) @binding(4) var d : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f1() { let x : i32 = (a.i + c.i); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f2() { let x : i32 = (b.i + d.i); } @@ -323,20 +323,20 @@ struct S { i : i32; } -[[group(1), binding(1)]] var a : S; +@group(1) @binding(1) var a : S; -[[group(1), binding(1)]] var b : S; +@group(1) @binding(1) var b : S; -[[group(5), binding(4)]] var c : S; +@group(5) @binding(4) var c : S; -[[group(5), binding(4)]] var d : S; +@group(5) @binding(4) var d : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f1() { let x : i32 = (a.i + c.i); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f2() { let x : i32 = (b.i + d.i); } @@ -361,10 +361,10 @@ struct S { a : f32; }; -[[group(2), binding(1)]] var a : S; -[[group(3), binding(2)]] var b : S; +@group(2) @binding(1) var a : S; +@group(3) @binding(2) var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() {} )"; diff --git a/src/transform/calculate_array_length_test.cc b/src/transform/calculate_array_length_test.cc index 83e0ac7f9b..88643aecc7 100644 --- a/src/transform/calculate_array_length_test.cc +++ b/src/transform/calculate_array_length_test.cc @@ -38,21 +38,21 @@ TEST_F(CalculateArrayLengthTest, Error_MissingCalculateArrayLength) { TEST_F(CalculateArrayLengthTest, Basic) { auto* src = R"( -[[group(0), binding(0)]] var sb : array; +@group(0) @binding(0) var sb : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb); } )"; auto* expect = R"( -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : array, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : array, result : ptr) -[[group(0), binding(0)]] var sb : array; +@group(0) @binding(0) var sb : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -73,9 +73,9 @@ struct SB { arr : array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb.arr); } @@ -87,12 +87,12 @@ struct SB { arr : array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, result : ptr) -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -108,9 +108,9 @@ fn main() { TEST_F(CalculateArrayLengthTest, InSameBlock) { auto* src = R"( -[[group(0), binding(0)]] var sb : array;; +@group(0) @binding(0) var sb : array;; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : u32 = arrayLength(&sb); var b : u32 = arrayLength(&sb); @@ -119,12 +119,12 @@ fn main() { )"; auto* expect = R"( -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : array, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : array, result : ptr) -[[group(0), binding(0)]] var sb : array; +@group(0) @binding(0) var sb : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -147,9 +147,9 @@ struct SB { arr : array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : u32 = arrayLength(&sb.arr); var b : u32 = arrayLength(&sb.arr); @@ -163,12 +163,12 @@ struct SB { arr : array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, result : ptr) -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -186,21 +186,21 @@ fn main() { TEST_F(CalculateArrayLengthTest, WithStride) { auto* src = R"( -[[group(0), binding(0)]] var sb : [[stride(64)]] array; +@group(0) @binding(0) var sb : @stride(64) array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb); } )"; auto* expect = R"( -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : [[stride(64)]] array, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : @stride(64) array, result : ptr) -[[group(0), binding(0)]] var sb : [[stride(64)]] array; +@group(0) @binding(0) var sb : @stride(64) array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -219,12 +219,12 @@ TEST_F(CalculateArrayLengthTest, WithStride_InStruct) { struct SB { x : i32; y : f32; - arr : [[stride(64)]] array; + arr : @stride(64) array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len : u32 = arrayLength(&sb.arr); } @@ -234,15 +234,15 @@ fn main() { struct SB { x : i32; y : f32; - arr : [[stride(64)]] array; + arr : @stride(64) array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, result : ptr) -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb, &(tint_symbol_1)); @@ -263,9 +263,9 @@ struct SB { arr : array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { if (true) { var len : u32 = arrayLength(&sb.arr); @@ -283,12 +283,12 @@ struct SB { arr : array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, result : ptr) -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { if (true) { var tint_symbol_1 : u32 = 0u; @@ -323,13 +323,13 @@ struct SB2 { arr2 : array>; }; -[[group(0), binding(0)]] var sb1 : SB1; +@group(0) @binding(0) var sb1 : SB1; -[[group(0), binding(1)]] var sb2 : SB2; +@group(0) @binding(1) var sb2 : SB2; -[[group(0), binding(2)]] var sb3 : array; +@group(0) @binding(2) var sb3 : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var len1 : u32 = arrayLength(&(sb1.arr1)); var len2 : u32 = arrayLength(&(sb2.arr2)); @@ -339,32 +339,32 @@ fn main() { )"; auto* expect = R"( -[[internal(intrinsic_buffer_size)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : array, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : array, result : ptr) struct SB1 { x : i32; arr1 : array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB1, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB1, result : ptr) struct SB2 { x : i32; arr2 : array>; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB2, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB2, result : ptr) -[[group(0), binding(0)]] var sb1 : SB1; +@group(0) @binding(0) var sb1 : SB1; -[[group(0), binding(1)]] var sb2 : SB2; +@group(0) @binding(1) var sb2 : SB2; -[[group(0), binding(2)]] var sb3 : array; +@group(0) @binding(2) var sb3 : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(sb1, &(tint_symbol_1)); @@ -394,10 +394,10 @@ struct SB { arr : array; }; -[[group(0), binding(0)]] var a : SB; -[[group(0), binding(1)]] var b : SB; +@group(0) @binding(0) var a : SB; +@group(0) @binding(1) var b : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = &a; var a : u32 = arrayLength(&a.arr); @@ -414,14 +414,14 @@ struct SB { arr : array; } -[[internal(intrinsic_buffer_size)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, result : ptr) +@internal(intrinsic_buffer_size) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, result : ptr) -[[group(0), binding(0)]] var a : SB; +@group(0) @binding(0) var a : SB; -[[group(0), binding(1)]] var b : SB; +@group(0) @binding(1) var b : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var tint_symbol_1 : u32 = 0u; tint_symbol(a, &(tint_symbol_1)); diff --git a/src/transform/canonicalize_entry_point_io.h b/src/transform/canonicalize_entry_point_io.h index baaa65a454..0bf16bab17 100644 --- a/src/transform/canonicalize_entry_point_io.h +++ b/src/transform/canonicalize_entry_point_io.h @@ -31,13 +31,13 @@ namespace transform { /// Before: /// ``` /// struct Locations{ -/// [[location(1)]] loc1 : f32; -/// [[location(2)]] loc2 : vec4; +/// @location(1) loc1 : f32; +/// @location(2) loc2 : vec4; /// }; /// -/// [[stage(fragment)]] -/// fn frag_main([[builtin(position)]] coord : vec4, -/// locations : Locations) -> [[location(0)]] f32 { +/// @stage(fragment) +/// fn frag_main(@builtin(position) coord : vec4, +/// locations : Locations) -> @location(0) f32 { /// if (coord.w > 1.0) { /// return 0.0; /// } @@ -54,13 +54,13 @@ namespace transform { /// }; /// /// struct frag_main_in { -/// [[builtin(position)]] coord : vec4; -/// [[location(1)]] loc1 : f32; -/// [[location(2)]] loc2 : vec4 +/// @builtin(position) coord : vec4; +/// @location(1) loc1 : f32; +/// @location(2) loc2 : vec4 /// }; /// /// struct frag_main_out { -/// [[location(0)]] loc0 : f32; +/// @location(0) loc0 : f32; /// }; /// /// fn frag_main_inner(coord : vec4, @@ -72,7 +72,7 @@ namespace transform { /// return col; /// } /// -/// [[stage(fragment)]] +/// @stage(fragment) /// fn frag_main(in : frag_main_in) -> frag_main_out { /// let inner_retval = frag_main_inner(in.coord, Locations(in.loc1, in.loc2)); /// var wrapper_result : frag_main_out; diff --git a/src/transform/canonicalize_entry_point_io_test.cc b/src/transform/canonicalize_entry_point_io_test.cc index 3c16ee5b0a..0219ff2bf5 100644 --- a/src/transform/canonicalize_entry_point_io_test.cc +++ b/src/transform/canonicalize_entry_point_io_test.cc @@ -51,11 +51,11 @@ TEST_F(CanonicalizeEntryPointIOTest, NoShaderIO) { // Test that we do not introduce wrapper functions when there is no shader IO // to process. auto* src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main() { } )"; @@ -72,26 +72,26 @@ fn comp_main() { TEST_F(CanonicalizeEntryPointIOTest, Parameters_Spirv) { auto* src = R"( -[[stage(fragment)]] -fn frag_main([[location(1)]] loc1 : f32, - [[location(2)]] loc2 : vec4, - [[builtin(position)]] coord : vec4) { +@stage(fragment) +fn frag_main(@location(1) loc1 : f32, + @location(2) loc2 : vec4, + @builtin(position) coord : vec4) { var col : f32 = (coord.x * loc1); } )"; auto* expect = R"( -[[location(1), internal(disable_validation__ignore_storage_class)]] var loc1_1 : f32; +@location(1) @internal(disable_validation__ignore_storage_class) var loc1_1 : f32; -[[location(2), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var loc2_1 : vec4; +@location(2) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var loc2_1 : vec4; -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var coord_1 : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var coord_1 : vec4; fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { var col : f32 = (coord.x * loc1); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { frag_main_inner(loc1_1, loc2_1, coord_1); } @@ -107,19 +107,19 @@ fn frag_main() { TEST_F(CanonicalizeEntryPointIOTest, Parameters_Msl) { auto* src = R"( -[[stage(fragment)]] -fn frag_main([[location(1)]] loc1 : f32, - [[location(2)]] loc2 : vec4, - [[builtin(position)]] coord : vec4) { +@stage(fragment) +fn frag_main(@location(1) loc1 : f32, + @location(2) loc2 : vec4, + @builtin(position) coord : vec4) { var col : f32 = (coord.x * loc1); } )"; auto* expect = R"( struct tint_symbol_1 { - [[location(1)]] + @location(1) loc1 : f32; - [[location(2)]] + @location(2) loc2 : vec4; } @@ -127,8 +127,8 @@ fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { var col : f32 = (coord.x * loc1); } -[[stage(fragment)]] -fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_1) { +@stage(fragment) +fn frag_main(@builtin(position) coord : vec4, tint_symbol : tint_symbol_1) { frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, coord); } )"; @@ -143,21 +143,21 @@ fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_ TEST_F(CanonicalizeEntryPointIOTest, Parameters_Hlsl) { auto* src = R"( -[[stage(fragment)]] -fn frag_main([[location(1)]] loc1 : f32, - [[location(2)]] loc2 : vec4, - [[builtin(position)]] coord : vec4) { +@stage(fragment) +fn frag_main(@location(1) loc1 : f32, + @location(2) loc2 : vec4, + @builtin(position) coord : vec4) { var col : f32 = (coord.x * loc1); } )"; auto* expect = R"( struct tint_symbol_1 { - [[location(1)]] + @location(1) loc1 : f32; - [[location(2)]] + @location(2) loc2 : vec4; - [[builtin(position)]] + @builtin(position) coord : vec4; } @@ -165,7 +165,7 @@ fn frag_main_inner(loc1 : f32, loc2 : vec4, coord : vec4) { var col : f32 = (coord.x * loc1); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol : tint_symbol_1) { frag_main_inner(tint_symbol.loc1, tint_symbol.loc2, tint_symbol.coord); } @@ -183,8 +183,8 @@ TEST_F(CanonicalizeEntryPointIOTest, Parameter_TypeAlias) { auto* src = R"( type myf32 = f32; -[[stage(fragment)]] -fn frag_main([[location(1)]] loc1 : myf32) { +@stage(fragment) +fn frag_main(@location(1) loc1 : myf32) { var x : myf32 = loc1; } )"; @@ -193,7 +193,7 @@ fn frag_main([[location(1)]] loc1 : myf32) { type myf32 = f32; struct tint_symbol_1 { - [[location(1)]] + @location(1) loc1 : f32; } @@ -201,7 +201,7 @@ fn frag_main_inner(loc1 : myf32) { var x : myf32 = loc1; } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol : tint_symbol_1) { frag_main_inner(tint_symbol.loc1); } @@ -218,15 +218,15 @@ fn frag_main(tint_symbol : tint_symbol_1) { TEST_F(CanonicalizeEntryPointIOTest, StructParameters_Spirv) { auto* src = R"( struct FragBuiltins { - [[builtin(position)]] coord : vec4; + @builtin(position) coord : vec4; }; struct FragLocations { - [[location(1)]] loc1 : f32; - [[location(2)]] loc2 : vec4; + @location(1) loc1 : f32; + @location(2) loc2 : vec4; }; -[[stage(fragment)]] -fn frag_main([[location(0)]] loc0 : f32, +@stage(fragment) +fn frag_main(@location(0) loc0 : f32, locations : FragLocations, builtins : FragBuiltins) { var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); @@ -234,13 +234,13 @@ fn frag_main([[location(0)]] loc0 : f32, )"; auto* expect = R"( -[[location(0), internal(disable_validation__ignore_storage_class)]] var loc0_1 : f32; +@location(0) @internal(disable_validation__ignore_storage_class) var loc0_1 : f32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var loc1_1 : f32; +@location(1) @internal(disable_validation__ignore_storage_class) var loc1_1 : f32; -[[location(2), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var loc2_1 : vec4; +@location(2) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var loc2_1 : vec4; -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var coord_1 : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var coord_1 : vec4; struct FragBuiltins { coord : vec4; @@ -255,7 +255,7 @@ fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltin var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { frag_main_inner(loc0_1, FragLocations(loc1_1, loc2_1), FragBuiltins(coord_1)); } @@ -272,15 +272,15 @@ fn frag_main() { TEST_F(CanonicalizeEntryPointIOTest, StructParameters_kMsl) { auto* src = R"( struct FragBuiltins { - [[builtin(position)]] coord : vec4; + @builtin(position) coord : vec4; }; struct FragLocations { - [[location(1)]] loc1 : f32; - [[location(2)]] loc2 : vec4; + @location(1) loc1 : f32; + @location(2) loc2 : vec4; }; -[[stage(fragment)]] -fn frag_main([[location(0)]] loc0 : f32, +@stage(fragment) +fn frag_main(@location(0) loc0 : f32, locations : FragLocations, builtins : FragBuiltins) { var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); @@ -298,11 +298,11 @@ struct FragLocations { } struct tint_symbol_1 { - [[location(0)]] + @location(0) loc0 : f32; - [[location(1)]] + @location(1) loc1 : f32; - [[location(2)]] + @location(2) loc2 : vec4; } @@ -310,8 +310,8 @@ fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltin var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); } -[[stage(fragment)]] -fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_1) { +@stage(fragment) +fn frag_main(@builtin(position) coord : vec4, tint_symbol : tint_symbol_1) { frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(coord)); } )"; @@ -327,15 +327,15 @@ fn frag_main([[builtin(position)]] coord : vec4, tint_symbol : tint_symbol_ TEST_F(CanonicalizeEntryPointIOTest, StructParameters_Hlsl) { auto* src = R"( struct FragBuiltins { - [[builtin(position)]] coord : vec4; + @builtin(position) coord : vec4; }; struct FragLocations { - [[location(1)]] loc1 : f32; - [[location(2)]] loc2 : vec4; + @location(1) loc1 : f32; + @location(2) loc2 : vec4; }; -[[stage(fragment)]] -fn frag_main([[location(0)]] loc0 : f32, +@stage(fragment) +fn frag_main(@location(0) loc0 : f32, locations : FragLocations, builtins : FragBuiltins) { var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); @@ -353,13 +353,13 @@ struct FragLocations { } struct tint_symbol_1 { - [[location(0)]] + @location(0) loc0 : f32; - [[location(1)]] + @location(1) loc1 : f32; - [[location(2)]] + @location(2) loc2 : vec4; - [[builtin(position)]] + @builtin(position) coord : vec4; } @@ -367,7 +367,7 @@ fn frag_main_inner(loc0 : f32, locations : FragLocations, builtins : FragBuiltin var col : f32 = ((builtins.coord.x * locations.loc1) + loc0); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol : tint_symbol_1) { frag_main_inner(tint_symbol.loc0, FragLocations(tint_symbol.loc1, tint_symbol.loc2), FragBuiltins(tint_symbol.coord)); } @@ -383,20 +383,20 @@ fn frag_main(tint_symbol : tint_symbol_1) { TEST_F(CanonicalizeEntryPointIOTest, Return_NonStruct_Spirv) { auto* src = R"( -[[stage(fragment)]] -fn frag_main() -> [[builtin(frag_depth)]] f32 { +@stage(fragment) +fn frag_main() -> @builtin(frag_depth) f32 { return 1.0; } )"; auto* expect = R"( -[[builtin(frag_depth), internal(disable_validation__ignore_storage_class)]] var value : f32; +@builtin(frag_depth) @internal(disable_validation__ignore_storage_class) var value : f32; fn frag_main_inner() -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { let inner_result = frag_main_inner(); value = inner_result; @@ -413,15 +413,15 @@ fn frag_main() { TEST_F(CanonicalizeEntryPointIOTest, Return_NonStruct_Msl) { auto* src = R"( -[[stage(fragment)]] -fn frag_main() -> [[builtin(frag_depth)]] f32 { +@stage(fragment) +fn frag_main() -> @builtin(frag_depth) f32 { return 1.0; } )"; auto* expect = R"( struct tint_symbol { - [[builtin(frag_depth)]] + @builtin(frag_depth) value : f32; } @@ -429,7 +429,7 @@ fn frag_main_inner() -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -448,15 +448,15 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, Return_NonStruct_Hlsl) { auto* src = R"( -[[stage(fragment)]] -fn frag_main() -> [[builtin(frag_depth)]] f32 { +@stage(fragment) +fn frag_main() -> @builtin(frag_depth) f32 { return 1.0; } )"; auto* expect = R"( struct tint_symbol { - [[builtin(frag_depth)]] + @builtin(frag_depth) value : f32; } @@ -464,7 +464,7 @@ fn frag_main_inner() -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -484,12 +484,12 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, Return_Struct_Spirv) { auto* src = R"( struct FragOutput { - [[location(0)]] color : vec4; - [[builtin(frag_depth)]] depth : f32; - [[builtin(sample_mask)]] mask : u32; + @location(0) color : vec4; + @builtin(frag_depth) depth : f32; + @builtin(sample_mask) mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> FragOutput { var output : FragOutput; output.depth = 1.0; @@ -500,11 +500,11 @@ fn frag_main() -> FragOutput { )"; auto* expect = R"( -[[location(0), internal(disable_validation__ignore_storage_class)]] var color_1 : vec4; +@location(0) @internal(disable_validation__ignore_storage_class) var color_1 : vec4; -[[builtin(frag_depth), internal(disable_validation__ignore_storage_class)]] var depth_1 : f32; +@builtin(frag_depth) @internal(disable_validation__ignore_storage_class) var depth_1 : f32; -[[builtin(sample_mask), internal(disable_validation__ignore_storage_class)]] var mask_1 : array; +@builtin(sample_mask) @internal(disable_validation__ignore_storage_class) var mask_1 : array; struct FragOutput { color : vec4; @@ -520,7 +520,7 @@ fn frag_main_inner() -> FragOutput { return output; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { let inner_result = frag_main_inner(); color_1 = inner_result.color; @@ -540,12 +540,12 @@ fn frag_main() { TEST_F(CanonicalizeEntryPointIOTest, Return_Struct_Msl) { auto* src = R"( struct FragOutput { - [[location(0)]] color : vec4; - [[builtin(frag_depth)]] depth : f32; - [[builtin(sample_mask)]] mask : u32; + @location(0) color : vec4; + @builtin(frag_depth) depth : f32; + @builtin(sample_mask) mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> FragOutput { var output : FragOutput; output.depth = 1.0; @@ -563,11 +563,11 @@ struct FragOutput { } struct tint_symbol { - [[location(0)]] + @location(0) color : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) depth : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) mask : u32; } @@ -579,7 +579,7 @@ fn frag_main_inner() -> FragOutput { return output; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -601,12 +601,12 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, Return_Struct_Hlsl) { auto* src = R"( struct FragOutput { - [[location(0)]] color : vec4; - [[builtin(frag_depth)]] depth : f32; - [[builtin(sample_mask)]] mask : u32; + @location(0) color : vec4; + @builtin(frag_depth) depth : f32; + @builtin(sample_mask) mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> FragOutput { var output : FragOutput; output.depth = 1.0; @@ -624,11 +624,11 @@ struct FragOutput { } struct tint_symbol { - [[location(0)]] + @location(0) color : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) depth : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) mask : u32; } @@ -640,7 +640,7 @@ fn frag_main_inner() -> FragOutput { return output; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -663,33 +663,33 @@ TEST_F(CanonicalizeEntryPointIOTest, StructParameters_SharedDeviceFunction_Spirv) { auto* src = R"( struct FragmentInput { - [[location(0)]] value : f32; - [[location(1)]] mul : f32; + @location(0) value : f32; + @location(1) mul : f32; }; fn foo(x : FragmentInput) -> f32 { return x.value * x.mul; } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2(inputs : FragmentInput) { var x : f32 = foo(inputs); } )"; auto* expect = R"( -[[location(0), internal(disable_validation__ignore_storage_class)]] var value_1 : f32; +@location(0) @internal(disable_validation__ignore_storage_class) var value_1 : f32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var mul_1 : f32; +@location(1) @internal(disable_validation__ignore_storage_class) var mul_1 : f32; -[[location(0), internal(disable_validation__ignore_storage_class)]] var value_2 : f32; +@location(0) @internal(disable_validation__ignore_storage_class) var value_2 : f32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var mul_2 : f32; +@location(1) @internal(disable_validation__ignore_storage_class) var mul_2 : f32; struct FragmentInput { value : f32; @@ -704,7 +704,7 @@ fn frag_main1_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main1() { frag_main1_inner(FragmentInput(value_1, mul_1)); } @@ -713,7 +713,7 @@ fn frag_main2_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2() { frag_main2_inner(FragmentInput(value_2, mul_2)); } @@ -731,20 +731,20 @@ TEST_F(CanonicalizeEntryPointIOTest, StructParameters_SharedDeviceFunction_Msl) { auto* src = R"( struct FragmentInput { - [[location(0)]] value : f32; - [[location(1)]] mul : f32; + @location(0) value : f32; + @location(1) mul : f32; }; fn foo(x : FragmentInput) -> f32 { return x.value * x.mul; } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2(inputs : FragmentInput) { var x : f32 = foo(inputs); } @@ -761,9 +761,9 @@ fn foo(x : FragmentInput) -> f32 { } struct tint_symbol_1 { - [[location(0)]] + @location(0) value : f32; - [[location(1)]] + @location(1) mul : f32; } @@ -771,15 +771,15 @@ fn frag_main1_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(tint_symbol : tint_symbol_1) { frag_main1_inner(FragmentInput(tint_symbol.value, tint_symbol.mul)); } struct tint_symbol_3 { - [[location(0)]] + @location(0) value : f32; - [[location(1)]] + @location(1) mul : f32; } @@ -787,7 +787,7 @@ fn frag_main2_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2(tint_symbol_2 : tint_symbol_3) { frag_main2_inner(FragmentInput(tint_symbol_2.value, tint_symbol_2.mul)); } @@ -805,20 +805,20 @@ TEST_F(CanonicalizeEntryPointIOTest, StructParameters_SharedDeviceFunction_Hlsl) { auto* src = R"( struct FragmentInput { - [[location(0)]] value : f32; - [[location(1)]] mul : f32; + @location(0) value : f32; + @location(1) mul : f32; }; fn foo(x : FragmentInput) -> f32 { return x.value * x.mul; } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2(inputs : FragmentInput) { var x : f32 = foo(inputs); } @@ -835,9 +835,9 @@ fn foo(x : FragmentInput) -> f32 { } struct tint_symbol_1 { - [[location(0)]] + @location(0) value : f32; - [[location(1)]] + @location(1) mul : f32; } @@ -845,15 +845,15 @@ fn frag_main1_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(tint_symbol : tint_symbol_1) { frag_main1_inner(FragmentInput(tint_symbol.value, tint_symbol.mul)); } struct tint_symbol_3 { - [[location(0)]] + @location(0) value : f32; - [[location(1)]] + @location(1) mul : f32; } @@ -861,7 +861,7 @@ fn frag_main2_inner(inputs : FragmentInput) { var x : f32 = foo(inputs); } -[[stage(fragment)]] +@stage(fragment) fn frag_main2(tint_symbol_2 : tint_symbol_3) { frag_main2_inner(FragmentInput(tint_symbol_2.value, tint_symbol_2.mul)); } @@ -878,8 +878,8 @@ fn frag_main2(tint_symbol_2 : tint_symbol_3) { TEST_F(CanonicalizeEntryPointIOTest, Struct_ModuleScopeVariable) { auto* src = R"( struct FragmentInput { - [[location(0)]] col1 : f32; - [[location(1)]] col2 : f32; + @location(0) col1 : f32; + @location(1) col2 : f32; }; var global_inputs : FragmentInput; @@ -892,7 +892,7 @@ fn bar() -> f32 { return global_inputs.col2 * 2.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(inputs : FragmentInput) { global_inputs = inputs; var r : f32 = foo(); @@ -917,9 +917,9 @@ fn bar() -> f32 { } struct tint_symbol_1 { - [[location(0)]] + @location(0) col1 : f32; - [[location(1)]] + @location(1) col2 : f32; } @@ -929,7 +929,7 @@ fn frag_main1_inner(inputs : FragmentInput) { var g : f32 = bar(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main1(tint_symbol : tint_symbol_1) { frag_main1_inner(FragmentInput(tint_symbol.col1, tint_symbol.col2)); } @@ -948,13 +948,13 @@ TEST_F(CanonicalizeEntryPointIOTest, Struct_TypeAliases) { type myf32 = f32; struct FragmentInput { - [[location(0)]] col1 : myf32; - [[location(1)]] col2 : myf32; + @location(0) col1 : myf32; + @location(1) col2 : myf32; }; struct FragmentOutput { - [[location(0)]] col1 : myf32; - [[location(1)]] col2 : myf32; + @location(0) col1 : myf32; + @location(1) col2 : myf32; }; type MyFragmentInput = FragmentInput; @@ -965,7 +965,7 @@ fn foo(x : MyFragmentInput) -> myf32 { return x.col1; } -[[stage(fragment)]] +@stage(fragment) fn frag_main(inputs : MyFragmentInput) -> MyFragmentOutput { var x : myf32 = foo(inputs); return MyFragmentOutput(x, inputs.col2); @@ -994,16 +994,16 @@ fn foo(x : MyFragmentInput) -> myf32 { } struct tint_symbol_1 { - [[location(0)]] + @location(0) col1 : f32; - [[location(1)]] + @location(1) col2 : f32; } struct tint_symbol_2 { - [[location(0)]] + @location(0) col1 : f32; - [[location(1)]] + @location(1) col2 : f32; } @@ -1012,7 +1012,7 @@ fn frag_main_inner(inputs : MyFragmentInput) -> MyFragmentOutput { return MyFragmentOutput(x, inputs.col2); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { let inner_result = frag_main_inner(MyFragmentInput(tint_symbol.col1, tint_symbol.col2)); var wrapper_result : tint_symbol_2; @@ -1033,25 +1033,25 @@ fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { TEST_F(CanonicalizeEntryPointIOTest, InterpolateAttributes) { auto* src = R"( struct VertexOut { - [[builtin(position)]] pos : vec4; - [[location(1), interpolate(flat)]] loc1: f32; - [[location(2), interpolate(linear, sample)]] loc2 : f32; - [[location(3), interpolate(perspective, centroid)]] loc3 : f32; + @builtin(position) pos : vec4; + @location(1) @interpolate(flat) loc1: f32; + @location(2) @interpolate(linear, sample) loc2 : f32; + @location(3) @interpolate(perspective, centroid) loc3 : f32; }; struct FragmentIn { - [[location(1), interpolate(flat)]] loc1: f32; - [[location(2), interpolate(linear, sample)]] loc2 : f32; + @location(1) @interpolate(flat) loc1: f32; + @location(2) @interpolate(linear, sample) loc2 : f32; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> VertexOut { return VertexOut(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(inputs : FragmentIn, - [[location(3), interpolate(perspective, centroid)]] loc3 : f32) { + @location(3) @interpolate(perspective, centroid) loc3 : f32) { let x = inputs.loc1 + inputs.loc2 + loc3; } )"; @@ -1070,13 +1070,13 @@ struct FragmentIn { } struct tint_symbol { - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) loc1 : f32; - [[location(2), interpolate(linear, sample)]] + @location(2) @interpolate(linear, sample) loc2 : f32; - [[location(3), interpolate(perspective, centroid)]] + @location(3) @interpolate(perspective, centroid) loc3 : f32; - [[builtin(position)]] + @builtin(position) pos : vec4; } @@ -1084,7 +1084,7 @@ fn vert_main_inner() -> VertexOut { return VertexOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> tint_symbol { let inner_result = vert_main_inner(); var wrapper_result : tint_symbol; @@ -1096,11 +1096,11 @@ fn vert_main() -> tint_symbol { } struct tint_symbol_2 { - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) loc1 : f32; - [[location(2), interpolate(linear, sample)]] + @location(2) @interpolate(linear, sample) loc2 : f32; - [[location(3), interpolate(perspective, centroid)]] + @location(3) @interpolate(perspective, centroid) loc3 : f32; } @@ -1108,7 +1108,7 @@ fn frag_main_inner(inputs : FragmentIn, loc3 : f32) { let x = ((inputs.loc1 + inputs.loc2) + loc3); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol_1 : tint_symbol_2) { frag_main_inner(FragmentIn(tint_symbol_1.loc1, tint_symbol_1.loc2), tint_symbol_1.loc3); } @@ -1127,33 +1127,33 @@ TEST_F(CanonicalizeEntryPointIOTest, InterpolateAttributes_Integers_Spirv) { // fragment inputs, but not vertex inputs or fragment outputs. auto* src = R"( struct VertexIn { - [[location(0)]] i : i32; - [[location(1)]] u : u32; - [[location(2)]] vi : vec4; - [[location(3)]] vu : vec4; + @location(0) i : i32; + @location(1) u : u32; + @location(2) vi : vec4; + @location(3) vu : vec4; }; struct VertexOut { - [[location(0)]] i : i32; - [[location(1)]] u : u32; - [[location(2)]] vi : vec4; - [[location(3)]] vu : vec4; - [[builtin(position)]] pos : vec4; + @location(0) i : i32; + @location(1) u : u32; + @location(2) vi : vec4; + @location(3) vu : vec4; + @builtin(position) pos : vec4; }; struct FragmentInterface { - [[location(0)]] i : i32; - [[location(1)]] u : u32; - [[location(2)]] vi : vec4; - [[location(3)]] vu : vec4; + @location(0) i : i32; + @location(1) u : u32; + @location(2) vi : vec4; + @location(3) vu : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main(in : VertexIn) -> VertexOut { return VertexOut(in.i, in.u, in.vi, in.vu, vec4()); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(inputs : FragmentInterface) -> FragmentInterface { return inputs; } @@ -1161,39 +1161,39 @@ fn frag_main(inputs : FragmentInterface) -> FragmentInterface { auto* expect = R"( -[[location(0), internal(disable_validation__ignore_storage_class)]] var i_1 : i32; +@location(0) @internal(disable_validation__ignore_storage_class) var i_1 : i32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var u_1 : u32; +@location(1) @internal(disable_validation__ignore_storage_class) var u_1 : u32; -[[location(2), internal(disable_validation__ignore_storage_class)]] var vi_1 : vec4; +@location(2) @internal(disable_validation__ignore_storage_class) var vi_1 : vec4; -[[location(3), internal(disable_validation__ignore_storage_class)]] var vu_1 : vec4; +@location(3) @internal(disable_validation__ignore_storage_class) var vu_1 : vec4; -[[location(0), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var i_2 : i32; +@location(0) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var i_2 : i32; -[[location(1), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var u_2 : u32; +@location(1) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var u_2 : u32; -[[location(2), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var vi_2 : vec4; +@location(2) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var vi_2 : vec4; -[[location(3), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var vu_2 : vec4; +@location(3) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var vu_2 : vec4; -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var pos_1 : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var pos_1 : vec4; -[[location(0), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var i_3 : i32; +@location(0) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var i_3 : i32; -[[location(1), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var u_3 : u32; +@location(1) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var u_3 : u32; -[[location(2), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var vi_3 : vec4; +@location(2) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var vi_3 : vec4; -[[location(3), interpolate(flat), internal(disable_validation__ignore_storage_class)]] var vu_3 : vec4; +@location(3) @interpolate(flat) @internal(disable_validation__ignore_storage_class) var vu_3 : vec4; -[[location(0), internal(disable_validation__ignore_storage_class)]] var i_4 : i32; +@location(0) @internal(disable_validation__ignore_storage_class) var i_4 : i32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var u_4 : u32; +@location(1) @internal(disable_validation__ignore_storage_class) var u_4 : u32; -[[location(2), internal(disable_validation__ignore_storage_class)]] var vi_4 : vec4; +@location(2) @internal(disable_validation__ignore_storage_class) var vi_4 : vec4; -[[location(3), internal(disable_validation__ignore_storage_class)]] var vu_4 : vec4; +@location(3) @internal(disable_validation__ignore_storage_class) var vu_4 : vec4; struct VertexIn { i : i32; @@ -1221,7 +1221,7 @@ fn vert_main_inner(in : VertexIn) -> VertexOut { return VertexOut(in.i, in.u, in.vi, in.vu, vec4()); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() { let inner_result = vert_main_inner(VertexIn(i_1, u_1, vi_1, vu_1)); i_2 = inner_result.i; @@ -1235,7 +1235,7 @@ fn frag_main_inner(inputs : FragmentInterface) -> FragmentInterface { return inputs; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { let inner_result_1 = frag_main_inner(FragmentInterface(i_3, u_3, vi_3, vu_3)); i_4 = inner_result_1.i; @@ -1259,12 +1259,12 @@ struct VertexOut { [[builtin(position), invariant]] pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main1() -> VertexOut { return VertexOut(); } -[[stage(vertex)]] +@stage(vertex) fn main2() -> [[builtin(position), invariant]] vec4 { return vec4(); } @@ -1276,7 +1276,7 @@ struct VertexOut { } struct tint_symbol { - [[builtin(position), invariant]] + @builtin(position) @invariant pos : vec4; } @@ -1284,7 +1284,7 @@ fn main1_inner() -> VertexOut { return VertexOut(); } -[[stage(vertex)]] +@stage(vertex) fn main1() -> tint_symbol { let inner_result = main1_inner(); var wrapper_result : tint_symbol; @@ -1293,7 +1293,7 @@ fn main1() -> tint_symbol { } struct tint_symbol_1 { - [[builtin(position), invariant]] + @builtin(position) @invariant value : vec4; } @@ -1301,7 +1301,7 @@ fn main2_inner() -> vec4 { return vec4(); } -[[stage(vertex)]] +@stage(vertex) fn main2() -> tint_symbol_1 { let inner_result_1 = main2_inner(); var wrapper_result_1 : tint_symbol_1; @@ -1321,16 +1321,16 @@ fn main2() -> tint_symbol_1 { TEST_F(CanonicalizeEntryPointIOTest, Struct_LayoutDecorations) { auto* src = R"( struct FragmentInput { - [[size(16), location(1)]] value : f32; - [[builtin(position)]] [[align(32)]] coord : vec4; - [[location(0), interpolate(linear, sample)]] [[align(128)]] loc0 : f32; + @size(16) @location(1) value : f32; + @builtin(position) @align(32) coord : vec4; + @location(0) @interpolate(linear, sample) @align(128) loc0 : f32; }; struct FragmentOutput { - [[size(16), location(1), interpolate(flat)]] value : f32; + @size(16) @location(1) @interpolate(flat) value : f32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main(inputs : FragmentInput) -> FragmentOutput { return FragmentOutput(inputs.coord.x * inputs.value + inputs.loc0); } @@ -1338,30 +1338,30 @@ fn frag_main(inputs : FragmentInput) -> FragmentOutput { auto* expect = R"( struct FragmentInput { - [[size(16)]] + @size(16) value : f32; - [[align(32)]] + @align(32) coord : vec4; - [[align(128)]] + @align(128) loc0 : f32; } struct FragmentOutput { - [[size(16)]] + @size(16) value : f32; } struct tint_symbol_1 { - [[location(0), interpolate(linear, sample)]] + @location(0) @interpolate(linear, sample) loc0 : f32; - [[location(1)]] + @location(1) value : f32; - [[builtin(position)]] + @builtin(position) coord : vec4; } struct tint_symbol_2 { - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) value : f32; } @@ -1369,7 +1369,7 @@ fn frag_main_inner(inputs : FragmentInput) -> FragmentOutput { return FragmentOutput(((inputs.coord.x * inputs.value) + inputs.loc0)); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { let inner_result = frag_main_inner(FragmentInput(tint_symbol.value, tint_symbol.coord, tint_symbol.loc0)); var wrapper_result : tint_symbol_2; @@ -1389,29 +1389,29 @@ fn frag_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { TEST_F(CanonicalizeEntryPointIOTest, SortedMembers) { auto* src = R"( struct VertexOutput { - [[location(1)]] b : u32; - [[builtin(position)]] pos : vec4; - [[location(3)]] d : u32; - [[location(0)]] a : f32; - [[location(2)]] c : i32; + @location(1) b : u32; + @builtin(position) pos : vec4; + @location(3) d : u32; + @location(0) a : f32; + @location(2) c : i32; }; struct FragmentInputExtra { - [[location(3)]] d : u32; - [[builtin(position)]] pos : vec4; - [[location(0)]] a : f32; + @location(3) d : u32; + @builtin(position) pos : vec4; + @location(0) a : f32; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> VertexOutput { return VertexOutput(); } -[[stage(fragment)]] -fn frag_main([[builtin(front_facing)]] ff : bool, - [[location(2)]] c : i32, +@stage(fragment) +fn frag_main(@builtin(front_facing) ff : bool, + @location(2) c : i32, inputs : FragmentInputExtra, - [[location(1)]] b : u32) { + @location(1) b : u32) { } )"; @@ -1431,15 +1431,15 @@ struct FragmentInputExtra { } struct tint_symbol { - [[location(0)]] + @location(0) a : f32; - [[location(1)]] + @location(1) b : u32; - [[location(2)]] + @location(2) c : i32; - [[location(3)]] + @location(3) d : u32; - [[builtin(position)]] + @builtin(position) pos : vec4; } @@ -1447,7 +1447,7 @@ fn vert_main_inner() -> VertexOutput { return VertexOutput(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> tint_symbol { let inner_result = vert_main_inner(); var wrapper_result : tint_symbol; @@ -1460,24 +1460,24 @@ fn vert_main() -> tint_symbol { } struct tint_symbol_2 { - [[location(0)]] + @location(0) a : f32; - [[location(1)]] + @location(1) b : u32; - [[location(2)]] + @location(2) c : i32; - [[location(3)]] + @location(3) d : u32; - [[builtin(position)]] + @builtin(position) pos : vec4; - [[builtin(front_facing)]] + @builtin(front_facing) ff : bool; } fn frag_main_inner(ff : bool, c : i32, inputs : FragmentInputExtra, b : u32) { } -[[stage(fragment)]] +@stage(fragment) fn frag_main(tint_symbol_1 : tint_symbol_2) { frag_main_inner(tint_symbol_1.ff, tint_symbol_1.c, FragmentInputExtra(tint_symbol_1.d, tint_symbol_1.pos, tint_symbol_1.a), tint_symbol_1.b); } @@ -1493,21 +1493,21 @@ fn frag_main(tint_symbol_1 : tint_symbol_2) { TEST_F(CanonicalizeEntryPointIOTest, DontRenameSymbols) { auto* src = R"( -[[stage(fragment)]] -fn tint_symbol_1([[location(0)]] col : f32) { +@stage(fragment) +fn tint_symbol_1(@location(0) col : f32) { } )"; auto* expect = R"( struct tint_symbol_2 { - [[location(0)]] + @location(0) col : f32; } fn tint_symbol_1_inner(col : f32) { } -[[stage(fragment)]] +@stage(fragment) fn tint_symbol_1(tint_symbol : tint_symbol_2) { tint_symbol_1_inner(tint_symbol.col); } @@ -1523,21 +1523,21 @@ fn tint_symbol_1(tint_symbol : tint_symbol_2) { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_VoidNoReturn) { auto* src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { } )"; auto* expect = R"( struct tint_symbol { - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask : u32; } fn frag_main_inner() { } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { frag_main_inner(); var wrapper_result : tint_symbol; @@ -1556,7 +1556,7 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_VoidWithReturn) { auto* src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { return; } @@ -1564,7 +1564,7 @@ fn frag_main() { auto* expect = R"( struct tint_symbol { - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask : u32; } @@ -1572,7 +1572,7 @@ fn frag_main_inner() { return; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { frag_main_inner(); var wrapper_result : tint_symbol; @@ -1591,15 +1591,15 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_WithAuthoredMask) { auto* src = R"( -[[stage(fragment)]] -fn frag_main() -> [[builtin(sample_mask)]] u32 { +@stage(fragment) +fn frag_main() -> @builtin(sample_mask) u32 { return 7u; } )"; auto* expect = R"( struct tint_symbol { - [[builtin(sample_mask)]] + @builtin(sample_mask) value : u32; } @@ -1607,7 +1607,7 @@ fn frag_main_inner() -> u32 { return 7u; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -1626,17 +1626,17 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_WithoutAuthoredMask) { auto* src = R"( -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] f32 { +@stage(fragment) +fn frag_main() -> @location(0) f32 { return 1.0; } )"; auto* expect = R"( struct tint_symbol { - [[location(0)]] + @location(0) value : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask : u32; } @@ -1644,7 +1644,7 @@ fn frag_main_inner() -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -1665,12 +1665,12 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_StructWithAuthoredMask) { auto* src = R"( struct Output { - [[builtin(frag_depth)]] depth : f32; - [[builtin(sample_mask)]] mask : u32; - [[location(0)]] value : f32; + @builtin(frag_depth) depth : f32; + @builtin(sample_mask) mask : u32; + @location(0) value : f32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> Output { return Output(0.5, 7u, 1.0); } @@ -1684,11 +1684,11 @@ struct Output { } struct tint_symbol { - [[location(0)]] + @location(0) value : f32; - [[builtin(frag_depth)]] + @builtin(frag_depth) depth : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) mask : u32; } @@ -1696,7 +1696,7 @@ fn frag_main_inner() -> Output { return Output(0.5, 7u, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -1719,11 +1719,11 @@ TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_StructWithoutAuthoredMask) { auto* src = R"( struct Output { - [[builtin(frag_depth)]] depth : f32; - [[location(0)]] value : f32; + @builtin(frag_depth) depth : f32; + @location(0) value : f32; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> Output { return Output(0.5, 1.0); } @@ -1736,11 +1736,11 @@ struct Output { } struct tint_symbol { - [[location(0)]] + @location(0) value : f32; - [[builtin(frag_depth)]] + @builtin(frag_depth) depth : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask : u32; } @@ -1748,7 +1748,7 @@ fn frag_main_inner() -> Output { return Output(0.5, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -1769,29 +1769,29 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_MultipleShaders) { auto* src = R"( -[[stage(fragment)]] -fn frag_main1() -> [[builtin(sample_mask)]] u32 { +@stage(fragment) +fn frag_main1() -> @builtin(sample_mask) u32 { return 7u; } -[[stage(fragment)]] -fn frag_main2() -> [[location(0)]] f32 { +@stage(fragment) +fn frag_main2() -> @location(0) f32 { return 1.0; } -[[stage(vertex)]] -fn vert_main1() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main1() -> @builtin(position) vec4 { return vec4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { } )"; auto* expect = R"( struct tint_symbol { - [[builtin(sample_mask)]] + @builtin(sample_mask) value : u32; } @@ -1799,7 +1799,7 @@ fn frag_main1_inner() -> u32 { return 7u; } -[[stage(fragment)]] +@stage(fragment) fn frag_main1() -> tint_symbol { let inner_result = frag_main1_inner(); var wrapper_result : tint_symbol; @@ -1808,9 +1808,9 @@ fn frag_main1() -> tint_symbol { } struct tint_symbol_1 { - [[location(0)]] + @location(0) value : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask : u32; } @@ -1818,7 +1818,7 @@ fn frag_main2_inner() -> f32 { return 1.0; } -[[stage(fragment)]] +@stage(fragment) fn frag_main2() -> tint_symbol_1 { let inner_result_1 = frag_main2_inner(); var wrapper_result_1 : tint_symbol_1; @@ -1828,7 +1828,7 @@ fn frag_main2() -> tint_symbol_1 { } struct tint_symbol_2 { - [[builtin(position)]] + @builtin(position) value : vec4; } @@ -1836,7 +1836,7 @@ fn vert_main1_inner() -> vec4 { return vec4(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main1() -> tint_symbol_2 { let inner_result_2 = vert_main1_inner(); var wrapper_result_2 : tint_symbol_2; @@ -1844,7 +1844,7 @@ fn vert_main1() -> tint_symbol_2 { return wrapper_result_2; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { } )"; @@ -1860,11 +1860,11 @@ fn comp_main1() { TEST_F(CanonicalizeEntryPointIOTest, FixedSampleMask_AvoidNameClash) { auto* src = R"( struct FragOut { - [[location(0)]] fixed_sample_mask : vec4; - [[location(1)]] fixed_sample_mask_1 : vec4; + @location(0) fixed_sample_mask : vec4; + @location(1) fixed_sample_mask_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> FragOut { return FragOut(); } @@ -1877,11 +1877,11 @@ struct FragOut { } struct tint_symbol { - [[location(0)]] + @location(0) fixed_sample_mask : vec4; - [[location(1)]] + @location(1) fixed_sample_mask_1 : vec4; - [[builtin(sample_mask)]] + @builtin(sample_mask) fixed_sample_mask_2 : u32; } @@ -1889,7 +1889,7 @@ fn frag_main_inner() -> FragOut { return FragOut(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() -> tint_symbol { let inner_result = frag_main_inner(); var wrapper_result : tint_symbol; @@ -1911,22 +1911,22 @@ fn frag_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_ReturnNonStruct_Spirv) { auto* src = R"( -[[stage(vertex)]] -fn vert_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main() -> @builtin(position) vec4 { return vec4(); } )"; auto* expect = R"( -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var value : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var value : vec4; -[[builtin(pointsize), internal(disable_validation__ignore_storage_class)]] var vertex_point_size : f32; +@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var vertex_point_size : f32; fn vert_main_inner() -> vec4 { return vec4(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() { let inner_result = vert_main_inner(); value = inner_result; @@ -1944,17 +1944,17 @@ fn vert_main() { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_ReturnNonStruct_Msl) { auto* src = R"( -[[stage(vertex)]] -fn vert_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main() -> @builtin(position) vec4 { return vec4(); } )"; auto* expect = R"( struct tint_symbol { - [[builtin(position)]] + @builtin(position) value : vec4; - [[builtin(pointsize)]] + @builtin(pointsize) vertex_point_size : f32; } @@ -1962,7 +1962,7 @@ fn vert_main_inner() -> vec4 { return vec4(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> tint_symbol { let inner_result = vert_main_inner(); var wrapper_result : tint_symbol; @@ -1983,19 +1983,19 @@ fn vert_main() -> tint_symbol { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_ReturnStruct_Spirv) { auto* src = R"( struct VertOut { - [[builtin(position)]] pos : vec4; + @builtin(position) pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> VertOut { return VertOut(); } )"; auto* expect = R"( -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var pos_1 : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var pos_1 : vec4; -[[builtin(pointsize), internal(disable_validation__ignore_storage_class)]] var vertex_point_size : f32; +@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var vertex_point_size : f32; struct VertOut { pos : vec4; @@ -2005,7 +2005,7 @@ fn vert_main_inner() -> VertOut { return VertOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() { let inner_result = vert_main_inner(); pos_1 = inner_result.pos; @@ -2024,10 +2024,10 @@ fn vert_main() { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_ReturnStruct_Msl) { auto* src = R"( struct VertOut { - [[builtin(position)]] pos : vec4; + @builtin(position) pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> VertOut { return VertOut(); } @@ -2039,9 +2039,9 @@ struct VertOut { } struct tint_symbol { - [[builtin(position)]] + @builtin(position) pos : vec4; - [[builtin(pointsize)]] + @builtin(pointsize) vertex_point_size : f32; } @@ -2049,7 +2049,7 @@ fn vert_main_inner() -> VertOut { return VertOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> tint_symbol { let inner_result = vert_main_inner(); var wrapper_result : tint_symbol; @@ -2074,19 +2074,19 @@ var vertex_point_size_1 : f32; var vertex_point_size_2 : f32; struct VertIn1 { - [[location(0)]] collide : f32; + @location(0) collide : f32; }; struct VertIn2 { - [[location(1)]] collide : f32; + @location(1) collide : f32; }; struct VertOut { - [[location(0)]] vertex_point_size : f32; - [[builtin(position)]] vertex_point_size_1 : vec4; + @location(0) vertex_point_size : f32; + @builtin(position) vertex_point_size_1 : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main(collide : VertIn1, collide_1 : VertIn2) -> VertOut { let x = collide.collide + collide_1.collide; return VertOut(); @@ -2094,15 +2094,15 @@ fn vert_main(collide : VertIn1, collide_1 : VertIn2) -> VertOut { )"; auto* expect = R"( -[[location(0), internal(disable_validation__ignore_storage_class)]] var collide_2 : f32; +@location(0) @internal(disable_validation__ignore_storage_class) var collide_2 : f32; -[[location(1), internal(disable_validation__ignore_storage_class)]] var collide_3 : f32; +@location(1) @internal(disable_validation__ignore_storage_class) var collide_3 : f32; -[[location(0), internal(disable_validation__ignore_storage_class)]] var vertex_point_size_3 : f32; +@location(0) @internal(disable_validation__ignore_storage_class) var vertex_point_size_3 : f32; -[[builtin(position), internal(disable_validation__ignore_storage_class)]] var vertex_point_size_1_1 : vec4; +@builtin(position) @internal(disable_validation__ignore_storage_class) var vertex_point_size_1_1 : vec4; -[[builtin(pointsize), internal(disable_validation__ignore_storage_class)]] var vertex_point_size_4 : f32; +@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var vertex_point_size_4 : f32; var vertex_point_size : f32; @@ -2128,7 +2128,7 @@ fn vert_main_inner(collide : VertIn1, collide_1 : VertIn2) -> VertOut { return VertOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main() { let inner_result = vert_main_inner(VertIn1(collide_2), VertIn2(collide_3)); vertex_point_size_3 = inner_result.vertex_point_size; @@ -2148,19 +2148,19 @@ fn vert_main() { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_AvoidNameClash_Msl) { auto* src = R"( struct VertIn1 { - [[location(0)]] collide : f32; + @location(0) collide : f32; }; struct VertIn2 { - [[location(1)]] collide : f32; + @location(1) collide : f32; }; struct VertOut { - [[location(0)]] vertex_point_size : vec4; - [[builtin(position)]] vertex_point_size_1 : vec4; + @location(0) vertex_point_size : vec4; + @builtin(position) vertex_point_size_1 : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main(collide : VertIn1, collide_1 : VertIn2) -> VertOut { let x = collide.collide + collide_1.collide; return VertOut(); @@ -2182,18 +2182,18 @@ struct VertOut { } struct tint_symbol_1 { - [[location(0)]] + @location(0) collide : f32; - [[location(1)]] + @location(1) collide_2 : f32; } struct tint_symbol_2 { - [[location(0)]] + @location(0) vertex_point_size : vec4; - [[builtin(position)]] + @builtin(position) vertex_point_size_1 : vec4; - [[builtin(pointsize)]] + @builtin(pointsize) vertex_point_size_2 : f32; } @@ -2202,7 +2202,7 @@ fn vert_main_inner(collide : VertIn1, collide_1 : VertIn2) -> VertOut { return VertOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { let inner_result = vert_main_inner(VertIn1(tint_symbol.collide), VertIn2(tint_symbol.collide_2)); var wrapper_result : tint_symbol_2; @@ -2224,19 +2224,19 @@ fn vert_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { TEST_F(CanonicalizeEntryPointIOTest, EmitVertexPointSize_AvoidNameClash_Hlsl) { auto* src = R"( struct VertIn1 { - [[location(0)]] collide : f32; + @location(0) collide : f32; }; struct VertIn2 { - [[location(1)]] collide : f32; + @location(1) collide : f32; }; struct VertOut { - [[location(0)]] vertex_point_size : vec4; - [[builtin(position)]] vertex_point_size_1 : vec4; + @location(0) vertex_point_size : vec4; + @builtin(position) vertex_point_size_1 : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main(collide : VertIn1, collide_1 : VertIn2) -> VertOut { let x = collide.collide + collide_1.collide; return VertOut(); @@ -2258,18 +2258,18 @@ struct VertOut { } struct tint_symbol_1 { - [[location(0)]] + @location(0) collide : f32; - [[location(1)]] + @location(1) collide_2 : f32; } struct tint_symbol_2 { - [[location(0)]] + @location(0) vertex_point_size : vec4; - [[builtin(position)]] + @builtin(position) vertex_point_size_1 : vec4; - [[builtin(pointsize)]] + @builtin(pointsize) vertex_point_size_2 : f32; } @@ -2278,7 +2278,7 @@ fn vert_main_inner(collide : VertIn1, collide_1 : VertIn2) -> VertOut { return VertOut(); } -[[stage(vertex)]] +@stage(vertex) fn vert_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { let inner_result = vert_main_inner(VertIn1(tint_symbol.collide), VertIn2(tint_symbol.collide_2)); var wrapper_result : tint_symbol_2; @@ -2299,26 +2299,26 @@ fn vert_main(tint_symbol : tint_symbol_1) -> tint_symbol_2 { TEST_F(CanonicalizeEntryPointIOTest, SpirvSampleMaskBuiltins) { auto* src = R"( -[[stage(fragment)]] -fn main([[builtin(sample_index)]] sample_index : u32, - [[builtin(sample_mask)]] mask_in : u32 - ) -> [[builtin(sample_mask)]] u32 { +@stage(fragment) +fn main(@builtin(sample_index) sample_index : u32, + @builtin(sample_mask) mask_in : u32 + ) -> @builtin(sample_mask) u32 { return mask_in; } )"; auto* expect = R"( -[[builtin(sample_index), internal(disable_validation__ignore_storage_class)]] var sample_index_1 : u32; +@builtin(sample_index) @internal(disable_validation__ignore_storage_class) var sample_index_1 : u32; -[[builtin(sample_mask), internal(disable_validation__ignore_storage_class)]] var mask_in_1 : array; +@builtin(sample_mask) @internal(disable_validation__ignore_storage_class) var mask_in_1 : array; -[[builtin(sample_mask), internal(disable_validation__ignore_storage_class)]] var value : array; +@builtin(sample_mask) @internal(disable_validation__ignore_storage_class) var value : array; fn main_inner(sample_index : u32, mask_in : u32) -> u32 { return mask_in; } -[[stage(fragment)]] +@stage(fragment) fn main() { let inner_result = main_inner(sample_index_1, mask_in_1[0]); value[0] = inner_result; diff --git a/src/transform/decompose_memory_access.h b/src/transform/decompose_memory_access.h index 67f3eb96a5..9fb1b0f857 100644 --- a/src/transform/decompose_memory_access.h +++ b/src/transform/decompose_memory_access.h @@ -82,7 +82,7 @@ class DecomposeMemoryAccess ~Intrinsic() override; /// @return a short description of the internal decoration which will be - /// displayed as `[[internal()]]` + /// displayed as `@internal()` std::string InternalName() const override; /// Performs a deep clone of this object using the CloneContext `ctx`. diff --git a/src/transform/decompose_memory_access_test.cc b/src/transform/decompose_memory_access_test.cc index c28f48e1eb..2fd6e10060 100644 --- a/src/transform/decompose_memory_access_test.cc +++ b/src/transform/decompose_memory_access_test.cc @@ -49,9 +49,9 @@ struct SB { v : array, 2>; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : i32 = sb.a; var b : u32 = sb.b; @@ -104,81 +104,81 @@ struct SB { v : array, 2>; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_load_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> i32 +@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> i32 -[[internal(intrinsic_load_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> u32 +@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> u32 -[[internal(intrinsic_load_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> f32 +@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> f32 -[[internal(intrinsic_load_storage_vec2_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec2_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec2_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec3_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec3_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec3_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec4_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -[[internal(intrinsic_load_storage_vec4_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -[[internal(intrinsic_load_storage_vec4_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x2 { +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x2 { return mat2x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u))); } -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x3 { +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x3 { return mat2x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u))); } -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x4 { +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x4 { return mat2x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u))); } -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x2 { +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x2 { return mat3x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u))); } -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x3 { +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x3 { return mat3x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u))); } -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x4 { +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x4 { return mat3x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u))); } -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x2 { +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x2 { return mat4x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 24u))); } -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x3 { +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x3 { return mat4x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u))); } -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x4 { +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x4 { return mat4x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)), tint_symbol_11(buffer, (offset + 48u))); } -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> array, 2u> { +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> array, 2u> { var arr : array, 2u>; for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { arr[i_1] = tint_symbol_8(buffer, (offset + (i_1 * 16u))); @@ -186,7 +186,7 @@ fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_p return arr; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : i32 = tint_symbol(sb, 0u); var b : u32 = tint_symbol_1(sb, 4u); @@ -245,9 +245,9 @@ struct UB { v : array, 2>; }; -[[group(0), binding(0)]] var ub : UB; +@group(0) @binding(0) var ub : UB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : i32 = ub.a; var b : u32 = ub.b; @@ -300,81 +300,81 @@ struct UB { v : array, 2>; } -[[group(0), binding(0)]] var ub : UB; +@group(0) @binding(0) var ub : UB; -[[internal(intrinsic_load_uniform_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> i32 +@internal(intrinsic_load_uniform_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> i32 -[[internal(intrinsic_load_uniform_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> u32 +@internal(intrinsic_load_uniform_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> u32 -[[internal(intrinsic_load_uniform_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> f32 +@internal(intrinsic_load_uniform_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> f32 -[[internal(intrinsic_load_uniform_vec2_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec2 +@internal(intrinsic_load_uniform_vec2_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec2 -[[internal(intrinsic_load_uniform_vec2_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec2 +@internal(intrinsic_load_uniform_vec2_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec2 -[[internal(intrinsic_load_uniform_vec2_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec2 +@internal(intrinsic_load_uniform_vec2_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec2 -[[internal(intrinsic_load_uniform_vec3_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec3 +@internal(intrinsic_load_uniform_vec3_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec3 -[[internal(intrinsic_load_uniform_vec3_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec3 +@internal(intrinsic_load_uniform_vec3_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec3 -[[internal(intrinsic_load_uniform_vec3_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec3 +@internal(intrinsic_load_uniform_vec3_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec3 -[[internal(intrinsic_load_uniform_vec4_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec4 +@internal(intrinsic_load_uniform_vec4_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec4 -[[internal(intrinsic_load_uniform_vec4_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec4 +@internal(intrinsic_load_uniform_vec4_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec4 -[[internal(intrinsic_load_uniform_vec4_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> vec4 +@internal(intrinsic_load_uniform_vec4_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> vec4 -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat2x2 { +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat2x2 { return mat2x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u))); } -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat2x3 { +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat2x3 { return mat2x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u))); } -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat2x4 { +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat2x4 { return mat2x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u))); } -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat3x2 { +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat3x2 { return mat3x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u))); } -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat3x3 { +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat3x3 { return mat3x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u))); } -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat3x4 { +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat3x4 { return mat3x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u))); } -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat4x2 { +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat4x2 { return mat4x2(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 24u))); } -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat4x3 { +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat4x3 { return mat4x3(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u))); } -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> mat4x4 { +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> mat4x4 { return mat4x4(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)), tint_symbol_11(buffer, (offset + 48u))); } -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : UB, offset : u32) -> array, 2u> { +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : UB, offset : u32) -> array, 2u> { var arr : array, 2u>; for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { arr[i_1] = tint_symbol_8(buffer, (offset + (i_1 * 16u))); @@ -382,7 +382,7 @@ fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_p return arr; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a : i32 = tint_symbol(ub, 0u); var b : u32 = tint_symbol_1(ub, 4u); @@ -441,9 +441,9 @@ struct SB { v : array, 2>; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { sb.a = i32(); sb.b = u32(); @@ -496,106 +496,106 @@ struct SB { v : array, 2>; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_store_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : i32) +@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : i32) -[[internal(intrinsic_store_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : u32) +@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : u32) -[[internal(intrinsic_store_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : f32) +@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : f32) -[[internal(intrinsic_store_storage_vec2_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec2_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec2_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec3_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec3_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec3_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec4_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -[[internal(intrinsic_store_storage_vec4_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -[[internal(intrinsic_store_storage_vec4_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x2) { +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x2) { tint_symbol_5(buffer, (offset + 0u), value[0u]); tint_symbol_5(buffer, (offset + 8u), value[1u]); } -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x3) { +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x3) { tint_symbol_8(buffer, (offset + 0u), value[0u]); tint_symbol_8(buffer, (offset + 16u), value[1u]); } -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x4) { +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x4) { tint_symbol_11(buffer, (offset + 0u), value[0u]); tint_symbol_11(buffer, (offset + 16u), value[1u]); } -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x2) { +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x2) { tint_symbol_5(buffer, (offset + 0u), value[0u]); tint_symbol_5(buffer, (offset + 8u), value[1u]); tint_symbol_5(buffer, (offset + 16u), value[2u]); } -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x3) { +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x3) { tint_symbol_8(buffer, (offset + 0u), value[0u]); tint_symbol_8(buffer, (offset + 16u), value[1u]); tint_symbol_8(buffer, (offset + 32u), value[2u]); } -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x4) { +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x4) { tint_symbol_11(buffer, (offset + 0u), value[0u]); tint_symbol_11(buffer, (offset + 16u), value[1u]); tint_symbol_11(buffer, (offset + 32u), value[2u]); } -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x2) { +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x2) { tint_symbol_5(buffer, (offset + 0u), value[0u]); tint_symbol_5(buffer, (offset + 8u), value[1u]); tint_symbol_5(buffer, (offset + 16u), value[2u]); tint_symbol_5(buffer, (offset + 24u), value[3u]); } -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x3) { +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x3) { tint_symbol_8(buffer, (offset + 0u), value[0u]); tint_symbol_8(buffer, (offset + 16u), value[1u]); tint_symbol_8(buffer, (offset + 32u), value[2u]); tint_symbol_8(buffer, (offset + 48u), value[3u]); } -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x4) { +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x4) { tint_symbol_11(buffer, (offset + 0u), value[0u]); tint_symbol_11(buffer, (offset + 16u), value[1u]); tint_symbol_11(buffer, (offset + 32u), value[2u]); tint_symbol_11(buffer, (offset + 48u), value[3u]); } -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : array, 2u>) { +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : array, 2u>) { var array = value; for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { tint_symbol_8(buffer, (offset + (i_1 * 16u)), array[i_1]); } } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { tint_symbol(sb, 0u, i32()); tint_symbol_1(sb, 4u, u32()); @@ -654,9 +654,9 @@ struct SB { v : array, 2>; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var x : SB = sb; } @@ -688,81 +688,81 @@ struct SB { v : array, 2>; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_load_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> i32 +@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> i32 -[[internal(intrinsic_load_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> u32 +@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> u32 -[[internal(intrinsic_load_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> f32 +@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> f32 -[[internal(intrinsic_load_storage_vec2_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec2_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec2_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec2 +@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec2 -[[internal(intrinsic_load_storage_vec3_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec3_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec3_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec3 +@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec3 -[[internal(intrinsic_load_storage_vec4_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -[[internal(intrinsic_load_storage_vec4_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -[[internal(intrinsic_load_storage_vec4_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> vec4 +@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> vec4 -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x2 { +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x2 { return mat2x2(tint_symbol_6(buffer, (offset + 0u)), tint_symbol_6(buffer, (offset + 8u))); } -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x3 { +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x3 { return mat2x3(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u))); } -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat2x4 { +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat2x4 { return mat2x4(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u))); } -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x2 { +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x2 { return mat3x2(tint_symbol_6(buffer, (offset + 0u)), tint_symbol_6(buffer, (offset + 8u)), tint_symbol_6(buffer, (offset + 16u))); } -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x3 { +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x3 { return mat3x3(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u))); } -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat3x4 { +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat3x4 { return mat3x4(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u))); } -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x2 { +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x2 { return mat4x2(tint_symbol_6(buffer, (offset + 0u)), tint_symbol_6(buffer, (offset + 8u)), tint_symbol_6(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 24u))); } -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x3 { +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x3 { return mat4x3(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u)), tint_symbol_9(buffer, (offset + 48u))); } -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> mat4x4 { +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> mat4x4 { return mat4x4(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)), tint_symbol_12(buffer, (offset + 48u))); } -fn tint_symbol_22([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> array, 2u> { +fn tint_symbol_22(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> array, 2u> { var arr : array, 2u>; for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { arr[i_1] = tint_symbol_9(buffer, (offset + (i_1 * 16u))); @@ -770,11 +770,11 @@ fn tint_symbol_22([[internal(disable_validation__ignore_constructible_function_p return arr; } -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> SB { +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> SB { return SB(tint_symbol_1(buffer, (offset + 0u)), tint_symbol_2(buffer, (offset + 4u)), tint_symbol_3(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 24u)), tint_symbol_6(buffer, (offset + 32u)), tint_symbol_7(buffer, (offset + 48u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_9(buffer, (offset + 80u)), tint_symbol_10(buffer, (offset + 96u)), tint_symbol_11(buffer, (offset + 112u)), tint_symbol_12(buffer, (offset + 128u)), tint_symbol_13(buffer, (offset + 144u)), tint_symbol_14(buffer, (offset + 160u)), tint_symbol_15(buffer, (offset + 192u)), tint_symbol_16(buffer, (offset + 224u)), tint_symbol_17(buffer, (offset + 256u)), tint_symbol_18(buffer, (offset + 304u)), tint_symbol_19(buffer, (offset + 352u)), tint_symbol_20(buffer, (offset + 384u)), tint_symbol_21(buffer, (offset + 448u)), tint_symbol_22(buffer, (offset + 512u))); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var x : SB = tint_symbol(sb, 0u); } @@ -812,9 +812,9 @@ struct SB { v : array, 2>; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { sb = SB(); } @@ -846,106 +846,106 @@ struct SB { v : array, 2>; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_store_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : i32) +@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : i32) -[[internal(intrinsic_store_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : u32) +@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : u32) -[[internal(intrinsic_store_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : f32) +@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : f32) -[[internal(intrinsic_store_storage_vec2_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec2_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec2_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec2) +@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec2) -[[internal(intrinsic_store_storage_vec3_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec3_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec3_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec3) +@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec3) -[[internal(intrinsic_store_storage_vec4_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -[[internal(intrinsic_store_storage_vec4_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -[[internal(intrinsic_store_storage_vec4_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : vec4) +@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : vec4) -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x2) { +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x2) { tint_symbol_6(buffer, (offset + 0u), value[0u]); tint_symbol_6(buffer, (offset + 8u), value[1u]); } -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x3) { +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x3) { tint_symbol_9(buffer, (offset + 0u), value[0u]); tint_symbol_9(buffer, (offset + 16u), value[1u]); } -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat2x4) { +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat2x4) { tint_symbol_12(buffer, (offset + 0u), value[0u]); tint_symbol_12(buffer, (offset + 16u), value[1u]); } -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x2) { +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x2) { tint_symbol_6(buffer, (offset + 0u), value[0u]); tint_symbol_6(buffer, (offset + 8u), value[1u]); tint_symbol_6(buffer, (offset + 16u), value[2u]); } -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x3) { +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x3) { tint_symbol_9(buffer, (offset + 0u), value[0u]); tint_symbol_9(buffer, (offset + 16u), value[1u]); tint_symbol_9(buffer, (offset + 32u), value[2u]); } -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat3x4) { +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat3x4) { tint_symbol_12(buffer, (offset + 0u), value[0u]); tint_symbol_12(buffer, (offset + 16u), value[1u]); tint_symbol_12(buffer, (offset + 32u), value[2u]); } -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x2) { +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x2) { tint_symbol_6(buffer, (offset + 0u), value[0u]); tint_symbol_6(buffer, (offset + 8u), value[1u]); tint_symbol_6(buffer, (offset + 16u), value[2u]); tint_symbol_6(buffer, (offset + 24u), value[3u]); } -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x3) { +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x3) { tint_symbol_9(buffer, (offset + 0u), value[0u]); tint_symbol_9(buffer, (offset + 16u), value[1u]); tint_symbol_9(buffer, (offset + 32u), value[2u]); tint_symbol_9(buffer, (offset + 48u), value[3u]); } -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : mat4x4) { +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : mat4x4) { tint_symbol_12(buffer, (offset + 0u), value[0u]); tint_symbol_12(buffer, (offset + 16u), value[1u]); tint_symbol_12(buffer, (offset + 32u), value[2u]); tint_symbol_12(buffer, (offset + 48u), value[3u]); } -fn tint_symbol_22([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : array, 2u>) { +fn tint_symbol_22(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : array, 2u>) { var array = value; for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) { tint_symbol_9(buffer, (offset + (i_1 * 16u)), array[i_1]); } } -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, value : SB) { +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, value : SB) { tint_symbol_1(buffer, (offset + 0u), value.a); tint_symbol_2(buffer, (offset + 4u), value.b); tint_symbol_3(buffer, (offset + 8u), value.c); @@ -970,7 +970,7 @@ fn tint_symbol([[internal(disable_validation__ignore_constructible_function_para tint_symbol_22(buffer, (offset + 512u), value.v); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { tint_symbol(sb, 0u, SB()); } @@ -991,19 +991,19 @@ struct S1 { struct S2 { a : i32; - b : [[stride(32)]] array; + b : @stride(32) array; c : i32; }; struct SB { - [[size(128)]] + @size(128) a : i32; - b : [[stride(256)]] array; + b : @stride(256) array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var x : f32 = sb.b[4].b[1].b.z; } @@ -1025,22 +1025,22 @@ struct S1 { struct S2 { a : i32; - b : [[stride(32)]] array; + b : @stride(32) array; c : i32; } struct SB { - [[size(128)]] + @size(128) a : i32; - b : [[stride(256)]] array; + b : @stride(256) array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_load_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> f32 +@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> f32 -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var x : f32 = tint_symbol(sb, 1224u); } @@ -1061,19 +1061,19 @@ struct S1 { struct S2 { a : i32; - b : [[stride(32)]] array; + b : @stride(32) array; c : i32; }; struct SB { - [[size(128)]] + @size(128) a : i32; - b : [[stride(256)]] array; + b : @stride(256) array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 4; var j : u32 = 1u; @@ -1091,22 +1091,22 @@ struct S1 { struct S2 { a : i32; - b : [[stride(32)]] array; + b : @stride(32) array; c : i32; } struct SB { - [[size(128)]] + @size(128) a : i32; - b : [[stride(256)]] array; + b : @stride(256) array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_load_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> f32 +@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> f32 -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 4; var j : u32 = 1u; @@ -1130,7 +1130,7 @@ struct S1 { type A1 = S1; -type A1_Array = [[stride(32)]] array; +type A1_Array = @stride(32) array; struct S2 { a : i32; @@ -1140,17 +1140,17 @@ struct S2 { type A2 = S2; -type A2_Array = [[stride(256)]] array; +type A2_Array = @stride(256) array; struct SB { - [[size(128)]] + @size(128) a : i32; b : A2_Array; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 4; var j : u32 = 1u; @@ -1168,7 +1168,7 @@ struct S1 { type A1 = S1; -type A1_Array = [[stride(32)]] array; +type A1_Array = @stride(32) array; struct S2 { a : i32; @@ -1178,20 +1178,20 @@ struct S2 { type A2 = S2; -type A2_Array = [[stride(256)]] array; +type A2_Array = @stride(256) array; struct SB { - [[size(128)]] + @size(128) a : i32; b : A2_Array; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_load_storage_f32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> f32 +@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> f32 -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 4; var j : u32 = 1u; @@ -1213,9 +1213,9 @@ struct SB { b : atomic; }; -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { atomicStore(&sb.a, 123); atomicLoad(&sb.a); @@ -1250,75 +1250,75 @@ struct SB { b : atomic; } -[[group(0), binding(0)]] var sb : SB; +@group(0) @binding(0) var sb : SB; -[[internal(intrinsic_atomic_store_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) +@internal(intrinsic_atomic_store_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -[[internal(intrinsic_atomic_load_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_1([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> i32 +@internal(intrinsic_atomic_load_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_1(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> i32 -[[internal(intrinsic_atomic_add_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_2([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_add_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_2(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_sub_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_3([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_sub_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_3(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_max_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_4([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_max_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_4(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_min_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_5([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_min_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_5(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_and_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_6([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_and_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_6(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_or_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_7([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_or_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_7(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_xor_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_8([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_xor_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_8(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_exchange_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_9([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32) -> i32 +@internal(intrinsic_atomic_exchange_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_9(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32) -> i32 -[[internal(intrinsic_atomic_compare_exchange_weak_storage_i32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_10([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : i32, param_2 : i32) -> vec2 +@internal(intrinsic_atomic_compare_exchange_weak_storage_i32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_10(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : i32, param_2 : i32) -> vec2 -[[internal(intrinsic_atomic_store_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_11([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) +@internal(intrinsic_atomic_store_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_11(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -[[internal(intrinsic_atomic_load_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_12([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32) -> u32 +@internal(intrinsic_atomic_load_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_12(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32) -> u32 -[[internal(intrinsic_atomic_add_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_13([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_add_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_13(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_sub_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_14([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_sub_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_14(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_max_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_15([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_max_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_15(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_min_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_16([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_min_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_16(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_and_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_17([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_and_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_17(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_or_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_18([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_or_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_18(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_xor_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_19([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_xor_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_19(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_exchange_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_20([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32) -> u32 +@internal(intrinsic_atomic_exchange_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_20(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32) -> u32 -[[internal(intrinsic_atomic_compare_exchange_weak_storage_u32), internal(disable_validation__function_has_no_body)]] -fn tint_symbol_21([[internal(disable_validation__ignore_constructible_function_parameter)]] buffer : SB, offset : u32, param_1 : u32, param_2 : u32) -> vec2 +@internal(intrinsic_atomic_compare_exchange_weak_storage_u32) @internal(disable_validation__function_has_no_body) +fn tint_symbol_21(@internal(disable_validation__ignore_constructible_function_parameter) buffer : SB, offset : u32, param_1 : u32, param_2 : u32) -> vec2 -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { tint_symbol(sb, 16u, 123); tint_symbol_1(sb, 16u); @@ -1360,7 +1360,7 @@ struct S { var w : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { atomicStore(&(w.a), 123); atomicLoad(&(w.a)); diff --git a/src/transform/decompose_strided_matrix_test.cc b/src/transform/decompose_strided_matrix_test.cc index db31c62c90..8561ccf356 100644 --- a/src/transform/decompose_strided_matrix_test.cc +++ b/src/transform/decompose_strided_matrix_test.cc @@ -52,13 +52,13 @@ TEST_F(DecomposeStridedMatrixTest, MissingDependencySimplify) { TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix) { // struct S { - // [[offset(16), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(16) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : mat2x2 = s.m; // } @@ -88,18 +88,18 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix) { auto* expect = R"( struct S { - [[size(16)]] + @size(16) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -fn arr_to_mat2x2_stride_32(arr : [[stride(32)]] array, 2u>) -> mat2x2 { +fn arr_to_mat2x2_stride_32(arr : @stride(32) array, 2u>) -> mat2x2 { return mat2x2(arr[0u], arr[1u]); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : mat2x2 = arr_to_mat2x2_stride_32(s.m); } @@ -113,13 +113,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadUniformColumn) { // struct S { - // [[offset(16), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(16) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : vec2 = s.m[1]; // } @@ -149,14 +149,14 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformColumn) { auto* expect = R"( struct S { - [[size(16)]] + @size(16) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : vec2 = s.m[1]; } @@ -170,13 +170,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix_DefaultStride) { // struct S { - // [[offset(16), stride(8)]] - // [[internal(ignore_stride_decoration)]] + // @offset(16) @stride(8) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : mat2x2 = s.m; // } @@ -206,15 +206,15 @@ TEST_F(DecomposeStridedMatrixTest, ReadUniformMatrix_DefaultStride) { auto* expect = R"( struct S { - [[size(16)]] + @size(16) padding : u32; - [[stride(8), internal(disable_validation__ignore_stride)]] + @stride(8) @internal(disable_validation__ignore_stride) m : mat2x2; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : mat2x2 = s.m; } @@ -228,13 +228,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadStorageMatrix) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : mat2x2 = s.m; // } @@ -264,18 +264,18 @@ TEST_F(DecomposeStridedMatrixTest, ReadStorageMatrix) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -fn arr_to_mat2x2_stride_32(arr : [[stride(32)]] array, 2u>) -> mat2x2 { +fn arr_to_mat2x2_stride_32(arr : @stride(32) array, 2u>) -> mat2x2 { return mat2x2(arr[0u], arr[1u]); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : mat2x2 = arr_to_mat2x2_stride_32(s.m); } @@ -289,13 +289,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadStorageColumn) { // struct S { - // [[offset(16), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(16) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : vec2 = s.m[1]; // } @@ -325,14 +325,14 @@ TEST_F(DecomposeStridedMatrixTest, ReadStorageColumn) { auto* expect = R"( struct S { - [[size(16)]] + @size(16) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : vec2 = s.m[1]; } @@ -346,13 +346,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, WriteStorageMatrix) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // s.m = mat2x2(vec2(1.0, 2.0), vec2(3.0, 4.0)); // } @@ -383,18 +383,18 @@ TEST_F(DecomposeStridedMatrixTest, WriteStorageMatrix) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -fn mat2x2_stride_32_to_arr(mat : mat2x2) -> [[stride(32)]] array, 2u> { - return [[stride(32)]] array, 2u>(mat[0u], mat[1u]); +fn mat2x2_stride_32_to_arr(mat : mat2x2) -> @stride(32) array, 2u> { + return @stride(32) array, 2u>(mat[0u], mat[1u]); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.m = mat2x2_stride_32_to_arr(mat2x2(vec2(1.0, 2.0), vec2(3.0, 4.0))); } @@ -408,13 +408,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, WriteStorageColumn) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // s.m[1] = vec2(1.0, 2.0); // } @@ -444,14 +444,14 @@ TEST_F(DecomposeStridedMatrixTest, WriteStorageColumn) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.m[1] = vec2(1.0, 2.0); } @@ -465,13 +465,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadWriteViaPointerLets) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; - // [[group(0), binding(0)]] var s : S; + // @group(0) @binding(0) var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let a = &s.m; // let b = &*&*(a); @@ -516,22 +516,22 @@ TEST_F(DecomposeStridedMatrixTest, ReadWriteViaPointerLets) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - m : [[stride(32)]] array, 2u>; + m : @stride(32) array, 2u>; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -fn arr_to_mat2x2_stride_32(arr : [[stride(32)]] array, 2u>) -> mat2x2 { +fn arr_to_mat2x2_stride_32(arr : @stride(32) array, 2u>) -> mat2x2 { return mat2x2(arr[0u], arr[1u]); } -fn mat2x2_stride_32_to_arr(mat : mat2x2) -> [[stride(32)]] array, 2u> { - return [[stride(32)]] array, 2u>(mat[0u], mat[1u]); +fn mat2x2_stride_32_to_arr(mat : mat2x2) -> @stride(32) array, 2u> { + return @stride(32) array, 2u>(mat[0u], mat[1u]); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x = arr_to_mat2x2_stride_32(s.m); let y = s.m[1]; @@ -549,13 +549,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, ReadPrivateMatrix) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; // var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // let x : mat2x2 = s.m; // } @@ -584,15 +584,15 @@ TEST_F(DecomposeStridedMatrixTest, ReadPrivateMatrix) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - [[stride(32), internal(disable_validation__ignore_stride)]] + @stride(32) @internal(disable_validation__ignore_stride) m : mat2x2; } var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let x : mat2x2 = s.m; } @@ -606,13 +606,13 @@ fn f() { TEST_F(DecomposeStridedMatrixTest, WritePrivateMatrix) { // struct S { - // [[offset(8), stride(32)]] - // [[internal(ignore_stride_decoration)]] + // @offset(8) @stride(32) + // @internal(ignore_stride_decoration) // m : mat2x2; // }; // var s : S; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn f() { // s.m = mat2x2(vec2(1.0, 2.0), vec2(3.0, 4.0)); // } @@ -642,15 +642,15 @@ TEST_F(DecomposeStridedMatrixTest, WritePrivateMatrix) { auto* expect = R"( struct S { - [[size(8)]] + @size(8) padding : u32; - [[stride(32), internal(disable_validation__ignore_stride)]] + @stride(32) @internal(disable_validation__ignore_stride) m : mat2x2; } var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.m = mat2x2(vec2(1.0, 2.0), vec2(3.0, 4.0)); } diff --git a/src/transform/external_texture_transform_test.cc b/src/transform/external_texture_transform_test.cc index d9fef8f0cc..28baadf243 100644 --- a/src/transform/external_texture_transform_test.cc +++ b/src/transform/external_texture_transform_test.cc @@ -24,23 +24,23 @@ using ExternalTextureTransformTest = TransformTest; TEST_F(ExternalTextureTransformTest, SampleLevelSinglePlane) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; -[[group(0), binding(1)]] var t : texture_external; +@group(0) @binding(1) var t : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(t, s, (coord.xy / vec2(4.0, 4.0))); } )"; auto* expect = R"( -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; -[[group(0), binding(1)]] var t : texture_2d; +@group(0) @binding(1) var t : texture_2d; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(t, s, (coord.xy / vec2(4.0, 4.0)), 0.0); } )"; @@ -52,19 +52,19 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { TEST_F(ExternalTextureTransformTest, LoadSinglePlane) { auto* src = R"( -[[group(0), binding(0)]] var t : texture_external; +@group(0) @binding(0) var t : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureLoad(t, vec2(1, 1)); } )"; auto* expect = R"( -[[group(0), binding(0)]] var t : texture_2d; +@group(0) @binding(0) var t : texture_2d; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureLoad(t, vec2(1, 1), 0); } )"; @@ -76,10 +76,10 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { TEST_F(ExternalTextureTransformTest, DimensionsSinglePlane) { auto* src = R"( -[[group(0), binding(0)]] var t : texture_external; +@group(0) @binding(0) var t : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { var dim : vec2; dim = textureDimensions(t); return vec4(0.0, 0.0, 0.0, 0.0); @@ -87,10 +87,10 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { )"; auto* expect = R"( -[[group(0), binding(0)]] var t : texture_2d; +@group(0) @binding(0) var t : texture_2d; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { var dim : vec2; dim = textureDimensions(t); return vec4(0.0, 0.0, 0.0, 0.0); diff --git a/src/transform/first_index_offset.h b/src/transform/first_index_offset.h index ffbb138fc7..a88558111d 100644 --- a/src/transform/first_index_offset.h +++ b/src/transform/first_index_offset.h @@ -35,24 +35,28 @@ namespace transform { /// Therefore, these values must by passed to the shader. /// /// Before: -/// [[builtin(vertex_index)]] var vert_idx : u32; +/// ``` +/// @builtin(vertex_index) var vert_idx : u32; /// fn func() -> u32 { /// return vert_idx; /// } +/// ``` /// /// After: +/// ``` /// struct TintFirstIndexOffsetData { /// tint_first_vertex_index : u32; /// tint_first_instance_index : u32; /// }; -/// [[builtin(vertex_index)]] var tint_first_index_offset_vert_idx : u32; -/// [[binding(N), group(M)]] var tint_first_index_data : +/// @builtin(vertex_index) var tint_first_index_offset_vert_idx : u32; +/// @binding(N) @group(M) var tint_first_index_data : /// TintFirstIndexOffsetData; /// fn func() -> u32 { /// const vert_idx = (tint_first_index_offset_vert_idx + /// tint_first_index_data.tint_first_vertex_index); /// return vert_idx; /// } +/// ``` /// class FirstIndexOffset : public Castable { public: @@ -71,9 +75,9 @@ class FirstIndexOffset : public Castable { /// Destructor ~BindingPoint() override; - /// [[binding()]] for the first vertex / first instance uniform buffer + /// `@binding()` for the first vertex / first instance uniform buffer uint32_t binding = 0; - /// [[group()]] for the first vertex / first instance uniform buffer + /// `@group()` for the first vertex / first instance uniform buffer uint32_t group = 0; }; diff --git a/src/transform/first_index_offset_test.cc b/src/transform/first_index_offset_test.cc index 6368d29527..c0c95f6f80 100644 --- a/src/transform/first_index_offset_test.cc +++ b/src/transform/first_index_offset_test.cc @@ -51,8 +51,8 @@ fn test(vert_idx : u32) -> u32 { return vert_idx; } -[[stage(vertex)]] -fn entry([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { test(vert_idx); return vec4(); } @@ -63,14 +63,14 @@ struct tint_symbol { first_vertex_index : u32; } -[[binding(1), group(2)]] var tint_symbol_1 : tint_symbol; +@binding(1) @group(2) var tint_symbol_1 : tint_symbol; fn test(vert_idx : u32) -> u32 { return vert_idx; } -[[stage(vertex)]] -fn entry([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { test((vert_idx + tint_symbol_1.first_vertex_index)); return vec4(); } @@ -97,8 +97,8 @@ fn test(inst_idx : u32) -> u32 { return inst_idx; } -[[stage(vertex)]] -fn entry([[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { test(inst_idx); return vec4(); } @@ -109,14 +109,14 @@ struct tint_symbol { first_instance_index : u32; } -[[binding(1), group(7)]] var tint_symbol_1 : tint_symbol; +@binding(1) @group(7) var tint_symbol_1 : tint_symbol; fn test(inst_idx : u32) -> u32 { return inst_idx; } -[[stage(vertex)]] -fn entry([[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { test((inst_idx + tint_symbol_1.first_instance_index)); return vec4(); } @@ -144,12 +144,12 @@ fn test(instance_idx : u32, vert_idx : u32) -> u32 { } struct Inputs { - [[builtin(instance_index)]] instance_idx : u32; - [[builtin(vertex_index)]] vert_idx : u32; + @builtin(instance_index) instance_idx : u32; + @builtin(vertex_index) vert_idx : u32; }; -[[stage(vertex)]] -fn entry(inputs : Inputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(inputs : Inputs) -> @builtin(position) vec4 { test(inputs.instance_idx, inputs.vert_idx); return vec4(); } @@ -161,21 +161,21 @@ struct tint_symbol { first_instance_index : u32; } -[[binding(1), group(2)]] var tint_symbol_1 : tint_symbol; +@binding(1) @group(2) var tint_symbol_1 : tint_symbol; fn test(instance_idx : u32, vert_idx : u32) -> u32 { return (instance_idx + vert_idx); } struct Inputs { - [[builtin(instance_index)]] + @builtin(instance_index) instance_idx : u32; - [[builtin(vertex_index)]] + @builtin(vertex_index) vert_idx : u32; } -[[stage(vertex)]] -fn entry(inputs : Inputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(inputs : Inputs) -> @builtin(position) vec4 { test((inputs.instance_idx + tint_symbol_1.first_instance_index), (inputs.vert_idx + tint_symbol_1.first_vertex_index)); return vec4(); } @@ -206,8 +206,8 @@ fn func2(vert_idx : u32) -> u32 { return func1(vert_idx); } -[[stage(vertex)]] -fn entry([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { func2(vert_idx); return vec4(); } @@ -218,7 +218,7 @@ struct tint_symbol { first_vertex_index : u32; } -[[binding(1), group(2)]] var tint_symbol_1 : tint_symbol; +@binding(1) @group(2) var tint_symbol_1 : tint_symbol; fn func1(vert_idx : u32) -> u32 { return vert_idx; @@ -228,8 +228,8 @@ fn func2(vert_idx : u32) -> u32 { return func1(vert_idx); } -[[stage(vertex)]] -fn entry([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { func2((vert_idx + tint_symbol_1.first_vertex_index)); return vec4(); } @@ -256,20 +256,20 @@ fn func(i : u32) -> u32 { return i; } -[[stage(vertex)]] -fn entry_a([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_a(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { func(vert_idx); return vec4(); } -[[stage(vertex)]] -fn entry_b([[builtin(vertex_index)]] vert_idx : u32, [[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_b(@builtin(vertex_index) vert_idx : u32, @builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { func(vert_idx + inst_idx); return vec4(); } -[[stage(vertex)]] -fn entry_c([[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_c(@builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { func(inst_idx); return vec4(); } @@ -281,26 +281,26 @@ struct tint_symbol { first_instance_index : u32; } -[[binding(1), group(2)]] var tint_symbol_1 : tint_symbol; +@binding(1) @group(2) var tint_symbol_1 : tint_symbol; fn func(i : u32) -> u32 { return i; } -[[stage(vertex)]] -fn entry_a([[builtin(vertex_index)]] vert_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_a(@builtin(vertex_index) vert_idx : u32) -> @builtin(position) vec4 { func((vert_idx + tint_symbol_1.first_vertex_index)); return vec4(); } -[[stage(vertex)]] -fn entry_b([[builtin(vertex_index)]] vert_idx : u32, [[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_b(@builtin(vertex_index) vert_idx : u32, @builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { func(((vert_idx + tint_symbol_1.first_vertex_index) + (inst_idx + tint_symbol_1.first_instance_index))); return vec4(); } -[[stage(vertex)]] -fn entry_c([[builtin(instance_index)]] inst_idx : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry_c(@builtin(instance_index) inst_idx : u32) -> @builtin(position) vec4 { func((inst_idx + tint_symbol_1.first_instance_index)); return vec4(); } diff --git a/src/transform/glsl_test.cc b/src/transform/glsl_test.cc index b280e3318e..49b0dfd915 100644 --- a/src/transform/glsl_test.cc +++ b/src/transform/glsl_test.cc @@ -26,7 +26,7 @@ TEST_F(GlslTest, AddEmptyEntryPoint) { auto* src = R"()"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn unused_entry_point() { } )"; diff --git a/src/transform/localize_struct_array_assignment_test.cc b/src/transform/localize_struct_array_assignment_test.cc index 2b3b0c9a82..878a89c1c3 100644 --- a/src/transform/localize_struct_array_assignment_test.cc +++ b/src/transform/localize_struct_array_assignment_test.cc @@ -44,7 +44,7 @@ TEST_F(LocalizeStructArrayAssignmentTest, EmptyModule) { TEST_F(LocalizeStructArrayAssignmentTest, StructArray) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; }; @@ -56,9 +56,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -67,7 +67,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; } @@ -80,9 +80,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -102,7 +102,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, StructStructArray) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; }; @@ -118,9 +118,9 @@ struct OuterS { s2 : S1; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -129,7 +129,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; } @@ -146,9 +146,9 @@ struct OuterS { s2 : S1; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -168,7 +168,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, StructArrayArray) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; j : u32; }; @@ -181,9 +181,9 @@ struct OuterS { a1 : array, 8>; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -192,7 +192,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; j : u32; @@ -206,9 +206,9 @@ struct OuterS { a1 : array, 8>; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -228,7 +228,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, StructArrayStruct) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; }; @@ -244,9 +244,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -255,7 +255,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; } @@ -272,9 +272,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -294,7 +294,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, StructArrayStructArray) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; j : u32; }; @@ -311,9 +311,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; @@ -322,7 +322,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; j : u32; @@ -340,9 +340,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; @@ -365,7 +365,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, IndexingWithSideEffectFunc) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; j : u32; }; @@ -388,9 +388,9 @@ fn getNextIndex() -> u32 { return nextIndex; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; @@ -399,7 +399,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; j : u32; @@ -424,9 +424,9 @@ fn getNextIndex() -> u32 { return nextIndex; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; @@ -449,7 +449,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, ViaPointerArg) { auto* src = R"( -[[block]] struct Uniforms { +@block struct Uniforms { i : u32; }; struct InnerS { @@ -458,14 +458,14 @@ struct InnerS { struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr) { var v : InnerS; (*p).a1[uniforms.i] = v; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; f(&s1); @@ -473,7 +473,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; } @@ -486,7 +486,7 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr) { var v : InnerS; @@ -498,7 +498,7 @@ fn f(p : ptr) { } } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; f(&(s1)); @@ -512,7 +512,7 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, ViaPointerVar) { auto* src = R"( -[[block]] +@block struct Uniforms { i : u32; }; @@ -525,13 +525,13 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr, v : InnerS) { *(p) = v; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -541,7 +541,7 @@ fn main() { )"; auto* expect = R"( -[[block]] +@block struct Uniforms { i : u32; } @@ -554,13 +554,13 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr, v : InnerS) { *(p) = v; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; @@ -581,23 +581,23 @@ fn main() { TEST_F(LocalizeStructArrayAssignmentTest, VectorAssignment) { auto* src = R"( -[[block]] +@block struct Uniforms { i : u32; } -[[block]] +@block struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(i : u32) -> u32 { return (i + 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; var v : vec3; diff --git a/src/transform/module_scope_var_to_entry_point_param.h b/src/transform/module_scope_var_to_entry_point_param.h index 34db3e694e..29132c80c7 100644 --- a/src/transform/module_scope_var_to_entry_point_param.h +++ b/src/transform/module_scope_var_to_entry_point_param.h @@ -36,7 +36,7 @@ namespace transform { /// struct S { /// f : f32; /// }; -/// [[binding(0), group(0)]] +/// @binding(0) @group(0) /// var s : S; /// var p : f32 = 2.0; /// @@ -44,7 +44,7 @@ namespace transform { /// p = p + f; /// } /// -/// [[stage(compute), workgroup_size(1)]] +/// @stage(compute) @workgroup_size(1) /// fn main() { /// foo(); /// } @@ -56,7 +56,7 @@ namespace transform { /// *p = *p + (*sptr).f; /// } /// -/// [[stage(compute), workgroup_size(1)]] +/// @stage(compute) @workgroup_size(1) /// fn main(sptr : ptr) { /// var p : f32 = 2.0; /// foo(&p, sptr); diff --git a/src/transform/module_scope_var_to_entry_point_param_test.cc b/src/transform/module_scope_var_to_entry_point_param_test.cc index ffbd635c03..d8b0f63744 100644 --- a/src/transform/module_scope_var_to_entry_point_param_test.cc +++ b/src/transform/module_scope_var_to_entry_point_param_test.cc @@ -29,17 +29,17 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, Basic) { var p : f32; var w : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { w = p; } )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol_1 : f32; tint_symbol = tint_symbol_1; } )"; @@ -68,7 +68,7 @@ fn foo(a : f32) { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { foo(1.0); } @@ -78,21 +78,21 @@ fn main() { fn no_uses() { } -fn bar(a : f32, b : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_1 : ptr) { +fn bar(a : f32, b : f32, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr) { *(tint_symbol) = a; *(tint_symbol_1) = b; } -fn foo(a : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_2 : ptr, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_3 : ptr) { +fn foo(a : f32, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_2 : ptr, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_3 : ptr) { let b : f32 = 2.0; bar(a, b, tint_symbol_2, tint_symbol_3); no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_4 : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_5 : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol_4 : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol_5 : f32; foo(1.0, &(tint_symbol_4), &(tint_symbol_5)); } )"; @@ -107,17 +107,17 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, Constructors) { var a : f32 = 1.0; var b : f32 = f32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x : f32 = a + b; } )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol : f32 = 1.0; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32 = f32(); + @internal(disable_validation__ignore_storage_class) var tint_symbol : f32 = 1.0; + @internal(disable_validation__ignore_storage_class) var tint_symbol_1 : f32 = f32(); let x : f32 = (tint_symbol + tint_symbol_1); } )"; @@ -132,7 +132,7 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, Pointers) { var p : f32; var w : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p_ptr : ptr = &p; let w_ptr : ptr = &w; @@ -142,10 +142,10 @@ fn main() { )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol : f32; - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol_1 : f32; let p_ptr : ptr = &(tint_symbol); let w_ptr : ptr = &(tint_symbol_1); let x : f32 = (*(p_ptr) + *(w_ptr)); @@ -170,7 +170,7 @@ fn foo() { bar(&v); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { foo(); } @@ -181,13 +181,13 @@ fn bar(p : ptr) { *(p) = 0.0; } -fn foo([[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr) { +fn foo(@internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr) { bar(tint_symbol); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { - [[internal(disable_validation__ignore_storage_class)]] var tint_symbol_1 : f32; + @internal(disable_validation__ignore_storage_class) var tint_symbol_1 : f32; foo(&(tint_symbol_1)); } )"; @@ -203,12 +203,12 @@ struct S { a : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = u; _ = s; @@ -220,8 +220,8 @@ struct S { a : f32; } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol : ptr, [[group(0), binding(1), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_1 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol : ptr, @group(0) @binding(1) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol_1 : ptr) { _ = *(tint_symbol); _ = *(tint_symbol_1); } @@ -234,10 +234,10 @@ fn main([[group(0), binding(0), internal(disable_validation__entry_point_paramet TEST_F(ModuleScopeVarToEntryPointParamTest, Buffer_RuntimeArray) { auto* src = R"( -[[group(0), binding(0)]] +@group(0) @binding(0) var buffer : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = buffer[0]; } @@ -248,8 +248,8 @@ struct tint_symbol_1 { arr : array; } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol : ptr) { _ = (*(tint_symbol)).arr[0]; } )"; @@ -261,14 +261,14 @@ fn main([[group(0), binding(0), internal(disable_validation__entry_point_paramet TEST_F(ModuleScopeVarToEntryPointParamTest, Buffer_RuntimeArrayInsideFunction) { auto* src = R"( -[[group(0), binding(0)]] +@group(0) @binding(0) var buffer : array; fn foo() { _ = buffer[0]; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { foo(); } @@ -279,12 +279,12 @@ struct tint_symbol_2 { arr : array; } -fn foo([[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr>) { +fn foo(@internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr>) { _ = (*(tint_symbol))[0]; } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_1 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol_1 : ptr) { foo(&((*(tint_symbol_1)).arr)); } )"; @@ -298,10 +298,10 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, Buffer_RuntimeArray_Alias) { auto* src = R"( type myarray = array; -[[group(0), binding(0)]] +@group(0) @binding(0) var buffer : myarray; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = buffer[0]; } @@ -314,8 +314,8 @@ struct tint_symbol_1 { type myarray = array; -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol : ptr) { _ = (*(tint_symbol)).arr[0]; } )"; @@ -331,10 +331,10 @@ struct S { f : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var buffer : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = buffer[0]; } @@ -349,8 +349,8 @@ struct tint_symbol_1 { arr : array; } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol : ptr) { _ = (*(tint_symbol)).arr[0]; } )"; @@ -366,9 +366,9 @@ struct S { a : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var s : S; fn no_uses() { @@ -386,7 +386,7 @@ fn foo(a : f32) { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { foo(1.0); } @@ -400,20 +400,20 @@ struct S { fn no_uses() { } -fn bar(a : f32, b : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_1 : ptr) { +fn bar(a : f32, b : f32, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr) { _ = *(tint_symbol); _ = *(tint_symbol_1); } -fn foo(a : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_2 : ptr, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_3 : ptr) { +fn foo(a : f32, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_2 : ptr, @internal(disable_validation__ignore_storage_class) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_3 : ptr) { let b : f32 = 2.0; _ = *(tint_symbol_2); bar(a, b, tint_symbol_2, tint_symbol_3); no_uses(); } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_4 : ptr, [[group(0), binding(1), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_5 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol_4 : ptr, @group(0) @binding(1) @internal(disable_validation__entry_point_parameter) @internal(disable_validation__ignore_storage_class) tint_symbol_5 : ptr) { foo(1.0, tint_symbol_4, tint_symbol_5); } )"; @@ -425,10 +425,10 @@ fn main([[group(0), binding(0), internal(disable_validation__entry_point_paramet TEST_F(ModuleScopeVarToEntryPointParamTest, HandleTypes_Basic) { auto* src = R"( -[[group(0), binding(0)]] var t : texture_2d; -[[group(0), binding(1)]] var s : sampler; +@group(0) @binding(0) var t : texture_2d; +@group(0) @binding(1) var s : sampler; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t; _ = s; @@ -436,8 +436,8 @@ fn main() { )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter)]] tint_symbol : texture_2d, [[group(0), binding(1), internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : sampler) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) tint_symbol : texture_2d, @group(0) @binding(1) @internal(disable_validation__entry_point_parameter) tint_symbol_1 : sampler) { _ = tint_symbol; _ = tint_symbol_1; } @@ -450,8 +450,8 @@ fn main([[group(0), binding(0), internal(disable_validation__entry_point_paramet TEST_F(ModuleScopeVarToEntryPointParamTest, HandleTypes_FunctionCalls) { auto* src = R"( -[[group(0), binding(0)]] var t : texture_2d; -[[group(0), binding(1)]] var s : sampler; +@group(0) @binding(0) var t : texture_2d; +@group(0) @binding(1) var s : sampler; fn no_uses() { } @@ -468,7 +468,7 @@ fn foo(a : f32) { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { foo(1.0); } @@ -490,8 +490,8 @@ fn foo(a : f32, tint_symbol_2 : texture_2d, tint_symbol_3 : sampler) { no_uses(); } -[[stage(compute), workgroup_size(1)]] -fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter)]] tint_symbol_4 : texture_2d, [[group(0), binding(1), internal(disable_validation__entry_point_parameter)]] tint_symbol_5 : sampler) { +@stage(compute) @workgroup_size(1) +fn main(@group(0) @binding(0) @internal(disable_validation__entry_point_parameter) tint_symbol_4 : texture_2d, @group(0) @binding(1) @internal(disable_validation__entry_point_parameter) tint_symbol_5 : sampler) { foo(1.0, tint_symbol_4, tint_symbol_5); } )"; @@ -505,7 +505,7 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, Matrix) { auto* src = R"( var m : mat2x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = m; } @@ -516,8 +516,8 @@ struct tint_symbol_2 { m : mat2x2; } -[[stage(compute), workgroup_size(1)]] -fn main([[internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@internal(disable_validation__entry_point_parameter) tint_symbol_1 : ptr) { let tint_symbol : ptr> = &((*(tint_symbol_1)).m); let x = *(tint_symbol); } @@ -538,7 +538,7 @@ struct S2 { }; var m : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = m; } @@ -557,8 +557,8 @@ struct tint_symbol_2 { m : array; } -[[stage(compute), workgroup_size(1)]] -fn main([[internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@internal(disable_validation__entry_point_parameter) tint_symbol_1 : ptr) { let tint_symbol : ptr> = &((*(tint_symbol_1)).m); let x = *(tint_symbol); } @@ -581,7 +581,7 @@ var a : S; var b : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = a; let y = b; @@ -598,8 +598,8 @@ struct tint_symbol_3 { b : S; } -[[stage(compute), workgroup_size(1)]] -fn main([[internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : ptr) { +@stage(compute) @workgroup_size(1) +fn main(@internal(disable_validation__entry_point_parameter) tint_symbol_1 : ptr) { let tint_symbol : ptr = &((*(tint_symbol_1)).a); let tint_symbol_2 : ptr = &((*(tint_symbol_1)).b); let x = *(tint_symbol); @@ -621,15 +621,15 @@ struct S { var p : f32; var w : f32; -[[group(0), binding(0)]] +@group(0) @binding(0) var ub : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var sb : S; -[[group(0), binding(2)]] var t : texture_2d; -[[group(0), binding(3)]] var s : sampler; +@group(0) @binding(2) var t : texture_2d; +@group(0) @binding(3) var s : sampler; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } )"; @@ -639,7 +639,7 @@ struct S { a : f32; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } )"; diff --git a/src/transform/multiplanar_external_texture_test.cc b/src/transform/multiplanar_external_texture_test.cc index e4c1d558d2..be8137a815 100644 --- a/src/transform/multiplanar_external_texture_test.cc +++ b/src/transform/multiplanar_external_texture_test.cc @@ -25,11 +25,11 @@ using MultiplanarExternalTextureTest = TransformTest; // result in an error. TEST_F(MultiplanarExternalTextureTest, ErrorNoPassedData) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var ext_tex : texture_external; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(ext_tex, s, coord.xy); } )"; @@ -43,11 +43,11 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // Running the transform with incorrect binding data should result in an error. TEST_F(MultiplanarExternalTextureTest, ErrorIncorrectBindingPont) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var ext_tex : texture_external; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(ext_tex, s, coord.xy); } )"; @@ -67,10 +67,10 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // Tests that the transform works with a textureDimensions call. TEST_F(MultiplanarExternalTextureTest, Dimensions) { auto* src = R"( -[[group(0), binding(0)]] var ext_tex : texture_external; +@group(0) @binding(0) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { var dim : vec2; dim = textureDimensions(ext_tex); return vec4(0.0, 0.0, 0.0, 0.0); @@ -86,14 +86,14 @@ struct ExternalTextureParams { ub : f32; } -[[group(0), binding(1)]] var ext_tex_plane_1 : texture_2d; +@group(0) @binding(1) var ext_tex_plane_1 : texture_2d; -[[group(0), binding(2)]] var ext_tex_params : ExternalTextureParams; +@group(0) @binding(2) var ext_tex_params : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { var dim : vec2; dim = textureDimensions(ext_tex); return vec4(0.0, 0.0, 0.0, 0.0); @@ -110,17 +110,17 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // Test that the transform works with a textureSampleLevel call. TEST_F(MultiplanarExternalTextureTest, BasicTextureSampleLevel) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var ext_tex : texture_external; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(ext_tex, s, coord.xy); } )"; auto* expect = R"( -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; struct ExternalTextureParams { numPlanes : u32; @@ -130,11 +130,11 @@ struct ExternalTextureParams { ub : f32; } -[[group(0), binding(2)]] var ext_tex_plane_1 : texture_2d; +@group(0) @binding(2) var ext_tex_plane_1 : texture_2d; -[[group(0), binding(3)]] var ext_tex_params : ExternalTextureParams; +@group(0) @binding(3) var ext_tex_params : ExternalTextureParams; -[[group(0), binding(1)]] var ext_tex : texture_2d; +@group(0) @binding(1) var ext_tex : texture_2d; fn textureSampleExternal(plane0 : texture_2d, plane1 : texture_2d, smp : sampler, coord : vec2, params : ExternalTextureParams) -> vec4 { if ((params.numPlanes == 1u)) { @@ -150,8 +150,8 @@ fn textureSampleExternal(plane0 : texture_2d, plane1 : texture_2d, smp return vec4(r, g, b, 1.0); } -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleExternal(ext_tex, ext_tex_plane_1, s, coord.xy, ext_tex_params); } )"; @@ -166,10 +166,10 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // Tests that the transform works with a textureLoad call. TEST_F(MultiplanarExternalTextureTest, BasicTextureLoad) { auto* src = R"( -[[group(0), binding(0)]] var ext_tex : texture_external; +@group(0) @binding(0) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureLoad(ext_tex, vec2(1, 1)); } )"; @@ -183,11 +183,11 @@ struct ExternalTextureParams { ub : f32; } -[[group(0), binding(1)]] var ext_tex_plane_1 : texture_2d; +@group(0) @binding(1) var ext_tex_plane_1 : texture_2d; -[[group(0), binding(2)]] var ext_tex_params : ExternalTextureParams; +@group(0) @binding(2) var ext_tex_params : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; fn textureLoadExternal(plane0 : texture_2d, plane1 : texture_2d, coord : vec2, params : ExternalTextureParams) -> vec4 { if ((params.numPlanes == 1u)) { @@ -203,8 +203,8 @@ fn textureLoadExternal(plane0 : texture_2d, plane1 : texture_2d, coord return vec4(r, g, b, 1.0); } -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureLoadExternal(ext_tex, ext_tex_plane_1, vec2(1, 1), ext_tex_params); } )"; @@ -220,17 +220,17 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // call. TEST_F(MultiplanarExternalTextureTest, TextureSampleAndTextureLoad) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var ext_tex : texture_external; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var ext_tex : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(ext_tex, s, coord.xy) + textureLoad(ext_tex, vec2(1, 1)); } )"; auto* expect = R"( -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; struct ExternalTextureParams { numPlanes : u32; @@ -240,11 +240,11 @@ struct ExternalTextureParams { ub : f32; } -[[group(0), binding(2)]] var ext_tex_plane_1 : texture_2d; +@group(0) @binding(2) var ext_tex_plane_1 : texture_2d; -[[group(0), binding(3)]] var ext_tex_params : ExternalTextureParams; +@group(0) @binding(3) var ext_tex_params : ExternalTextureParams; -[[group(0), binding(1)]] var ext_tex : texture_2d; +@group(0) @binding(1) var ext_tex : texture_2d; fn textureSampleExternal(plane0 : texture_2d, plane1 : texture_2d, smp : sampler, coord : vec2, params : ExternalTextureParams) -> vec4 { if ((params.numPlanes == 1u)) { @@ -274,8 +274,8 @@ fn textureLoadExternal(plane0 : texture_2d, plane1 : texture_2d, coord return vec4(r, g, b, 1.0); } -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return (textureSampleExternal(ext_tex, ext_tex_plane_1, s, coord.xy, ext_tex_params) + textureLoadExternal(ext_tex, ext_tex_plane_1, vec2(1, 1), ext_tex_params)); } )"; @@ -290,20 +290,20 @@ fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { // Tests that the transform works with many instances of texture_external. TEST_F(MultiplanarExternalTextureTest, ManyTextureSampleLevel) { auto* src = R"( -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var ext_tex : texture_external; -[[group(0), binding(2)]] var ext_tex_1 : texture_external; -[[group(0), binding(3)]] var ext_tex_2 : texture_external; -[[group(1), binding(0)]] var ext_tex_3 : texture_external; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var ext_tex : texture_external; +@group(0) @binding(2) var ext_tex_1 : texture_external; +@group(0) @binding(3) var ext_tex_2 : texture_external; +@group(1) @binding(0) var ext_tex_3 : texture_external; -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return textureSampleLevel(ext_tex, s, coord.xy) + textureSampleLevel(ext_tex_1, s, coord.xy) + textureSampleLevel(ext_tex_2, s, coord.xy) + textureSampleLevel(ext_tex_3, s, coord.xy); } )"; auto* expect = R"( -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; struct ExternalTextureParams { numPlanes : u32; @@ -313,29 +313,29 @@ struct ExternalTextureParams { ub : f32; } -[[group(0), binding(4)]] var ext_tex_plane_1 : texture_2d; +@group(0) @binding(4) var ext_tex_plane_1 : texture_2d; -[[group(0), binding(5)]] var ext_tex_params : ExternalTextureParams; +@group(0) @binding(5) var ext_tex_params : ExternalTextureParams; -[[group(0), binding(1)]] var ext_tex : texture_2d; +@group(0) @binding(1) var ext_tex : texture_2d; -[[group(0), binding(6)]] var ext_tex_plane_1_1 : texture_2d; +@group(0) @binding(6) var ext_tex_plane_1_1 : texture_2d; -[[group(0), binding(7)]] var ext_tex_params_1 : ExternalTextureParams; +@group(0) @binding(7) var ext_tex_params_1 : ExternalTextureParams; -[[group(0), binding(2)]] var ext_tex_1 : texture_2d; +@group(0) @binding(2) var ext_tex_1 : texture_2d; -[[group(0), binding(8)]] var ext_tex_plane_1_2 : texture_2d; +@group(0) @binding(8) var ext_tex_plane_1_2 : texture_2d; -[[group(0), binding(9)]] var ext_tex_params_2 : ExternalTextureParams; +@group(0) @binding(9) var ext_tex_params_2 : ExternalTextureParams; -[[group(0), binding(3)]] var ext_tex_2 : texture_2d; +@group(0) @binding(3) var ext_tex_2 : texture_2d; -[[group(1), binding(1)]] var ext_tex_plane_1_3 : texture_2d; +@group(1) @binding(1) var ext_tex_plane_1_3 : texture_2d; -[[group(1), binding(2)]] var ext_tex_params_3 : ExternalTextureParams; +@group(1) @binding(2) var ext_tex_params_3 : ExternalTextureParams; -[[group(1), binding(0)]] var ext_tex_3 : texture_2d; +@group(1) @binding(0) var ext_tex_3 : texture_2d; fn textureSampleExternal(plane0 : texture_2d, plane1 : texture_2d, smp : sampler, coord : vec2, params : ExternalTextureParams) -> vec4 { if ((params.numPlanes == 1u)) { @@ -351,8 +351,8 @@ fn textureSampleExternal(plane0 : texture_2d, plane1 : texture_2d, smp return vec4(r, g, b, 1.0); } -[[stage(fragment)]] -fn main([[builtin(position)]] coord : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@builtin(position) coord : vec4) -> @location(0) vec4 { return (((textureSampleExternal(ext_tex, ext_tex_plane_1, s, coord.xy, ext_tex_params) + textureSampleExternal(ext_tex_1, ext_tex_plane_1_1, s, coord.xy, ext_tex_params_1)) + textureSampleExternal(ext_tex_2, ext_tex_plane_1_2, s, coord.xy, ext_tex_params_2)) + textureSampleExternal(ext_tex_3, ext_tex_plane_1_3, s, coord.xy, ext_tex_params_3)); } )"; @@ -377,10 +377,10 @@ fn f(t : texture_external, s : sampler) { textureSampleLevel(t, s, vec2(1.0, 2.0)); } -[[group(0), binding(0)]] var ext_tex : texture_external; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(0) var ext_tex : texture_external; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, smp); } @@ -413,15 +413,15 @@ fn f(t : texture_2d, ext_tex_plane_1 : texture_2d, ext_tex_params : Ex textureSampleExternal(t, ext_tex_plane_1, s, vec2(1.0, 2.0), ext_tex_params); } -[[group(0), binding(2)]] var ext_tex_plane_1_1 : texture_2d; +@group(0) @binding(2) var ext_tex_plane_1_1 : texture_2d; -[[group(0), binding(3)]] var ext_tex_params_1 : ExternalTextureParams; +@group(0) @binding(3) var ext_tex_params_1 : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, ext_tex_plane_1_1, ext_tex_params_1, smp); } @@ -443,10 +443,10 @@ fn f(s : sampler, t : texture_external) { textureSampleLevel(t, s, vec2(1.0, 2.0)); } -[[group(0), binding(0)]] var ext_tex : texture_external; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(0) var ext_tex : texture_external; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(smp, ext_tex); } @@ -479,15 +479,15 @@ fn f(s : sampler, t : texture_2d, ext_tex_plane_1 : texture_2d, ext_te textureSampleExternal(t, ext_tex_plane_1, s, vec2(1.0, 2.0), ext_tex_params); } -[[group(0), binding(2)]] var ext_tex_plane_1_1 : texture_2d; +@group(0) @binding(2) var ext_tex_plane_1_1 : texture_2d; -[[group(0), binding(3)]] var ext_tex_params_1 : ExternalTextureParams; +@group(0) @binding(3) var ext_tex_params_1 : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(smp, ext_tex, ext_tex_plane_1_1, ext_tex_params_1); } @@ -510,11 +510,11 @@ fn f(t : texture_external, s : sampler, t2 : texture_external) { textureSampleLevel(t2, s, vec2(1.0, 2.0)); } -[[group(0), binding(0)]] var ext_tex : texture_external; -[[group(0), binding(1)]] var smp : sampler; -[[group(0), binding(2)]] var ext_tex2 : texture_external; +@group(0) @binding(0) var ext_tex : texture_external; +@group(0) @binding(1) var smp : sampler; +@group(0) @binding(2) var ext_tex2 : texture_external; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, smp, ext_tex2); } @@ -548,21 +548,21 @@ fn f(t : texture_2d, ext_tex_plane_1 : texture_2d, ext_tex_params : Ex textureSampleExternal(t2, ext_tex_plane_1_1, s, vec2(1.0, 2.0), ext_tex_params_1); } -[[group(0), binding(3)]] var ext_tex_plane_1_2 : texture_2d; +@group(0) @binding(3) var ext_tex_plane_1_2 : texture_2d; -[[group(0), binding(4)]] var ext_tex_params_2 : ExternalTextureParams; +@group(0) @binding(4) var ext_tex_params_2 : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(1) var smp : sampler; -[[group(0), binding(5)]] var ext_tex_plane_1_3 : texture_2d; +@group(0) @binding(5) var ext_tex_plane_1_3 : texture_2d; -[[group(0), binding(6)]] var ext_tex_params_3 : ExternalTextureParams; +@group(0) @binding(6) var ext_tex_params_3 : ExternalTextureParams; -[[group(0), binding(2)]] var ext_tex2 : texture_2d; +@group(0) @binding(2) var ext_tex2 : texture_2d; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, ext_tex_plane_1_2, ext_tex_params_2, smp, ext_tex2, ext_tex_plane_1_3, ext_tex_params_3); } @@ -589,10 +589,10 @@ fn f(t : texture_external, s : sampler) { nested(t, s); } -[[group(0), binding(0)]] var ext_tex : texture_external; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(0) var ext_tex : texture_external; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, smp); } @@ -629,15 +629,15 @@ fn f(t : texture_2d, ext_tex_plane_1_1 : texture_2d, ext_tex_params_1 nested(t, ext_tex_plane_1_1, ext_tex_params_1, s); } -[[group(0), binding(2)]] var ext_tex_plane_1_2 : texture_2d; +@group(0) @binding(2) var ext_tex_plane_1_2 : texture_2d; -[[group(0), binding(3)]] var ext_tex_params_2 : ExternalTextureParams; +@group(0) @binding(3) var ext_tex_params_2 : ExternalTextureParams; -[[group(0), binding(0)]] var ext_tex : texture_2d; +@group(0) @binding(0) var ext_tex : texture_2d; -[[group(0), binding(1)]] var smp : sampler; +@group(0) @binding(1) var smp : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { f(ext_tex, ext_tex_plane_1_2, ext_tex_params_2, smp); } diff --git a/src/transform/num_workgroups_from_uniform.h b/src/transform/num_workgroups_from_uniform.h index af922c2485..ab8daa6992 100644 --- a/src/transform/num_workgroups_from_uniform.h +++ b/src/transform/num_workgroups_from_uniform.h @@ -34,7 +34,7 @@ namespace transform { /// num_workgroups : vec3; /// }; /// -/// [[group(0), binding(0)]] +/// @group(0) @binding(0) /// var num_workgroups_ubo : num_workgroups_struct; /// ``` /// The binding group and number used for this uniform buffer is provided via diff --git a/src/transform/num_workgroups_from_uniform_test.cc b/src/transform/num_workgroups_from_uniform_test.cc index ecb221a2f0..bea5222549 100644 --- a/src/transform/num_workgroups_from_uniform_test.cc +++ b/src/transform/num_workgroups_from_uniform_test.cc @@ -57,8 +57,8 @@ TEST_F(NumWorkgroupsFromUniformTest, Error_MissingCanonicalizeEntryPointIO) { TEST_F(NumWorkgroupsFromUniformTest, Basic) { auto* src = R"( -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(num_workgroups)]] num_wgs : vec3) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(num_workgroups) num_wgs : vec3) { let groups_x = num_wgs.x; let groups_y = num_wgs.y; let groups_z = num_wgs.z; @@ -70,7 +70,7 @@ struct tint_symbol_2 { num_workgroups : vec3; } -[[group(0), binding(30)]] var tint_symbol_3 : tint_symbol_2; +@group(0) @binding(30) var tint_symbol_3 : tint_symbol_2; fn main_inner(num_wgs : vec3) { let groups_x = num_wgs.x; @@ -78,7 +78,7 @@ fn main_inner(num_wgs : vec3) { let groups_z = num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { main_inner(tint_symbol_3.num_workgroups); } @@ -96,10 +96,10 @@ fn main() { TEST_F(NumWorkgroupsFromUniformTest, StructOnlyMember) { auto* src = R"( struct Builtins { - [[builtin(num_workgroups)]] num_wgs : vec3; + @builtin(num_workgroups) num_wgs : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(in : Builtins) { let groups_x = in.num_wgs.x; let groups_y = in.num_wgs.y; @@ -112,7 +112,7 @@ struct tint_symbol_2 { num_workgroups : vec3; } -[[group(0), binding(30)]] var tint_symbol_3 : tint_symbol_2; +@group(0) @binding(30) var tint_symbol_3 : tint_symbol_2; struct Builtins { num_wgs : vec3; @@ -124,7 +124,7 @@ fn main_inner(in : Builtins) { let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { main_inner(Builtins(tint_symbol_3.num_workgroups)); } @@ -142,12 +142,12 @@ fn main() { TEST_F(NumWorkgroupsFromUniformTest, StructMultipleMembers) { auto* src = R"( struct Builtins { - [[builtin(global_invocation_id)]] gid : vec3; - [[builtin(num_workgroups)]] num_wgs : vec3; - [[builtin(workgroup_id)]] wgid : vec3; + @builtin(global_invocation_id) gid : vec3; + @builtin(num_workgroups) num_wgs : vec3; + @builtin(workgroup_id) wgid : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(in : Builtins) { let groups_x = in.num_wgs.x; let groups_y = in.num_wgs.y; @@ -160,7 +160,7 @@ struct tint_symbol_2 { num_workgroups : vec3; } -[[group(0), binding(30)]] var tint_symbol_3 : tint_symbol_2; +@group(0) @binding(30) var tint_symbol_3 : tint_symbol_2; struct Builtins { gid : vec3; @@ -169,9 +169,9 @@ struct Builtins { } struct tint_symbol_1 { - [[builtin(global_invocation_id)]] + @builtin(global_invocation_id) gid : vec3; - [[builtin(workgroup_id)]] + @builtin(workgroup_id) wgid : vec3; } @@ -181,7 +181,7 @@ fn main_inner(in : Builtins) { let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(tint_symbol : tint_symbol_1) { main_inner(Builtins(tint_symbol.gid, tint_symbol_3.num_workgroups, tint_symbol.wgid)); } @@ -199,31 +199,31 @@ fn main(tint_symbol : tint_symbol_1) { TEST_F(NumWorkgroupsFromUniformTest, MultipleEntryPoints) { auto* src = R"( struct Builtins1 { - [[builtin(num_workgroups)]] num_wgs : vec3; + @builtin(num_workgroups) num_wgs : vec3; }; struct Builtins2 { - [[builtin(global_invocation_id)]] gid : vec3; - [[builtin(num_workgroups)]] num_wgs : vec3; - [[builtin(workgroup_id)]] wgid : vec3; + @builtin(global_invocation_id) gid : vec3; + @builtin(num_workgroups) num_wgs : vec3; + @builtin(workgroup_id) wgid : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1(in : Builtins1) { let groups_x = in.num_wgs.x; let groups_y = in.num_wgs.y; let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2(in : Builtins2) { let groups_x = in.num_wgs.x; let groups_y = in.num_wgs.y; let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] -fn main3([[builtin(num_workgroups)]] num_wgs : vec3) { +@stage(compute) @workgroup_size(1) +fn main3(@builtin(num_workgroups) num_wgs : vec3) { let groups_x = num_wgs.x; let groups_y = num_wgs.y; let groups_z = num_wgs.z; @@ -235,7 +235,7 @@ struct tint_symbol_6 { num_workgroups : vec3; } -[[group(0), binding(30)]] var tint_symbol_7 : tint_symbol_6; +@group(0) @binding(30) var tint_symbol_7 : tint_symbol_6; struct Builtins1 { num_wgs : vec3; @@ -253,15 +253,15 @@ fn main1_inner(in : Builtins1) { let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1() { main1_inner(Builtins1(tint_symbol_7.num_workgroups)); } struct tint_symbol_3 { - [[builtin(global_invocation_id)]] + @builtin(global_invocation_id) gid : vec3; - [[builtin(workgroup_id)]] + @builtin(workgroup_id) wgid : vec3; } @@ -271,7 +271,7 @@ fn main2_inner(in : Builtins2) { let groups_z = in.num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2(tint_symbol_2 : tint_symbol_3) { main2_inner(Builtins2(tint_symbol_2.gid, tint_symbol_7.num_workgroups, tint_symbol_2.wgid)); } @@ -282,7 +282,7 @@ fn main3_inner(num_wgs : vec3) { let groups_z = num_wgs.z; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main3() { main3_inner(tint_symbol_7.num_workgroups); } @@ -300,11 +300,11 @@ fn main3() { TEST_F(NumWorkgroupsFromUniformTest, NoUsages) { auto* src = R"( struct Builtins { - [[builtin(global_invocation_id)]] gid : vec3; - [[builtin(workgroup_id)]] wgid : vec3; + @builtin(global_invocation_id) gid : vec3; + @builtin(workgroup_id) wgid : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(in : Builtins) { } )"; @@ -316,16 +316,16 @@ struct Builtins { } struct tint_symbol_1 { - [[builtin(global_invocation_id)]] + @builtin(global_invocation_id) gid : vec3; - [[builtin(workgroup_id)]] + @builtin(workgroup_id) wgid : vec3; } fn main_inner(in : Builtins) { } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(tint_symbol : tint_symbol_1) { main_inner(Builtins(tint_symbol.gid, tint_symbol.wgid)); } diff --git a/src/transform/pad_array_elements_test.cc b/src/transform/pad_array_elements_test.cc index 05ca2da0a0..441eadcda9 100644 --- a/src/transform/pad_array_elements_test.cc +++ b/src/transform/pad_array_elements_test.cc @@ -46,11 +46,11 @@ var arr : array; TEST_F(PadArrayElementsTest, ArrayAsGlobal) { auto* src = R"( -var arr : [[stride(8)]] array; +var arr : @stride(8) array; )"; auto* expect = R"( struct tint_padded_array_element { - [[size(8)]] + @size(8) el : i32; } @@ -65,12 +65,12 @@ var arr : array; TEST_F(PadArrayElementsTest, RuntimeArray) { auto* src = R"( struct S { - rta : [[stride(8)]] array; + rta : @stride(8) array; }; )"; auto* expect = R"( struct tint_padded_array_element { - [[size(8)]] + @size(8) el : i32; } @@ -87,15 +87,15 @@ struct S { TEST_F(PadArrayElementsTest, ArrayFunctionVar) { auto* src = R"( fn f() { - var arr : [[stride(16)]] array; - arr = [[stride(16)]] array(); - arr = [[stride(16)]] array(1, 2, 3, 4); + var arr : @stride(16) array; + arr = @stride(16) array(); + arr = @stride(16) array(1, 2, 3, 4); let x = arr[3]; } )"; auto* expect = R"( struct tint_padded_array_element { - [[size(16)]] + @size(16) el : i32; } @@ -114,13 +114,13 @@ fn f() { TEST_F(PadArrayElementsTest, ArrayAsParam) { auto* src = R"( -fn f(a : [[stride(12)]] array) -> i32 { +fn f(a : @stride(12) array) -> i32 { return a[2]; } )"; auto* expect = R"( struct tint_padded_array_element { - [[size(12)]] + @size(12) el : i32; } @@ -137,14 +137,14 @@ fn f(a : array) -> i32 { // TODO(crbug.com/tint/781): Cannot parse the stride on the return array type. TEST_F(PadArrayElementsTest, DISABLED_ArrayAsReturn) { auto* src = R"( -fn f() -> [[stride(8)]] array { +fn f() -> @stride(8) array { return array(1, 2, 3, 4); } )"; auto* expect = R"( struct tint_padded_array_element { el : i32; - [[size(4)]] + @size(4) padding : u32; }; @@ -160,7 +160,7 @@ fn f() -> array { TEST_F(PadArrayElementsTest, ArrayAlias) { auto* src = R"( -type Array = [[stride(16)]] array; +type Array = @stride(16) array; fn f() { var arr : Array; @@ -173,7 +173,7 @@ fn f() { )"; auto* expect = R"( struct tint_padded_array_element { - [[size(16)]] + @size(16) el : i32; } @@ -197,25 +197,25 @@ fn f() { TEST_F(PadArrayElementsTest, ArraysInStruct) { auto* src = R"( struct S { - a : [[stride(8)]] array; - b : [[stride(8)]] array; - c : [[stride(8)]] array; - d : [[stride(12)]] array; + a : @stride(8) array; + b : @stride(8) array; + c : @stride(8) array; + d : @stride(12) array; }; )"; auto* expect = R"( struct tint_padded_array_element { - [[size(8)]] + @size(8) el : i32; } struct tint_padded_array_element_1 { - [[size(8)]] + @size(8) el : i32; } struct tint_padded_array_element_2 { - [[size(12)]] + @size(12) el : i32; } @@ -235,39 +235,39 @@ struct S { TEST_F(PadArrayElementsTest, ArraysOfArraysInStruct) { auto* src = R"( struct S { - a : [[stride(512)]] array; - b : [[stride(512)]] array<[[stride(32)]] array, 4>; - c : [[stride(512)]] array<[[stride(64)]] array<[[stride(8)]] array, 4>, 4>; + a : @stride(512) array; + b : @stride(512) array<@stride(32) array, 4>; + c : @stride(512) array<@stride(64) array<@stride(8) array, 4>, 4>; }; )"; auto* expect = R"( struct tint_padded_array_element { - [[size(512)]] + @size(512) el : i32; } struct tint_padded_array_element_2 { - [[size(32)]] + @size(32) el : i32; } struct tint_padded_array_element_1 { - [[size(512)]] + @size(512) el : array; } struct tint_padded_array_element_5 { - [[size(8)]] + @size(8) el : i32; } struct tint_padded_array_element_4 { - [[size(64)]] + @size(64) el : array; } struct tint_padded_array_element_3 { - [[size(512)]] + @size(512) el : array; } @@ -286,9 +286,9 @@ struct S { TEST_F(PadArrayElementsTest, AccessArraysOfArraysInStruct) { auto* src = R"( struct S { - a : [[stride(512)]] array; - b : [[stride(512)]] array<[[stride(32)]] array, 4>; - c : [[stride(512)]] array<[[stride(64)]] array<[[stride(8)]] array, 4>, 4>; + a : @stride(512) array; + b : @stride(512) array<@stride(32) array, 4>; + c : @stride(512) array<@stride(64) array<@stride(8) array, 4>, 4>; }; fn f(s : S) -> i32 { @@ -297,32 +297,32 @@ fn f(s : S) -> i32 { )"; auto* expect = R"( struct tint_padded_array_element { - [[size(512)]] + @size(512) el : i32; } struct tint_padded_array_element_2 { - [[size(32)]] + @size(32) el : i32; } struct tint_padded_array_element_1 { - [[size(512)]] + @size(512) el : array; } struct tint_padded_array_element_5 { - [[size(8)]] + @size(8) el : i32; } struct tint_padded_array_element_4 { - [[size(64)]] + @size(64) el : array; } struct tint_padded_array_element_3 { - [[size(512)]] + @size(512) el : array; } @@ -346,24 +346,24 @@ TEST_F(PadArrayElementsTest, DeclarationOrder) { auto* src = R"( type T0 = i32; -type T1 = [[stride(8)]] array; +type T1 = @stride(8) array; type T2 = i32; -fn f1(a : [[stride(8)]] array) { +fn f1(a : @stride(8) array) { } type T3 = i32; fn f2() { - var v : [[stride(8)]] array; + var v : @stride(8) array; } )"; auto* expect = R"( type T0 = i32; struct tint_padded_array_element { - [[size(8)]] + @size(8) el : i32; } @@ -372,7 +372,7 @@ type T1 = array; type T2 = i32; struct tint_padded_array_element_1 { - [[size(8)]] + @size(8) el : i32; } @@ -382,7 +382,7 @@ fn f1(a : array) { type T3 = i32; struct tint_padded_array_element_2 { - [[size(8)]] + @size(8) el : i32; } diff --git a/src/transform/remove_phonies_test.cc b/src/transform/remove_phonies_test.cc index 6d6c86d89e..6e8a1f1fca 100644 --- a/src/transform/remove_phonies_test.cc +++ b/src/transform/remove_phonies_test.cc @@ -37,7 +37,7 @@ TEST_F(RemovePhoniesTest, EmptyModule) { TEST_F(RemovePhoniesTest, NoSideEffects) { auto* src = R"( -[[group(0), binding(0)]] var t : texture_2d; +@group(0) @binding(0) var t : texture_2d; fn f() { var v : i32; @@ -54,7 +54,7 @@ fn f() { )"; auto* expect = R"( -[[group(0), binding(0)]] var t : texture_2d; +@group(0) @binding(0) var t : texture_2d; fn f() { var v : i32; @@ -177,7 +177,7 @@ struct S { arr : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn x() -> i32 { return 0; @@ -206,7 +206,7 @@ struct S { arr : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn x() -> i32 { return 0; diff --git a/src/transform/renamer_test.cc b/src/transform/renamer_test.cc index 7f830430cd..5ef8ee568c 100644 --- a/src/transform/renamer_test.cc +++ b/src/transform/renamer_test.cc @@ -46,9 +46,9 @@ fn test(vert_idx : u32) -> u32 { return vert_idx; } -[[stage(vertex)]] -fn entry([[builtin(vertex_index)]] vert_idx : u32 - ) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry(@builtin(vertex_index) vert_idx : u32 + ) -> @builtin(position) vec4 { ignore(test(vert_idx)); return vec4(); } @@ -59,8 +59,8 @@ fn tint_symbol(tint_symbol_1 : u32) -> u32 { return tint_symbol_1; } -[[stage(vertex)]] -fn tint_symbol_2([[builtin(vertex_index)]] tint_symbol_1 : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn tint_symbol_2(@builtin(vertex_index) tint_symbol_1 : u32) -> @builtin(position) vec4 { ignore(tint_symbol(tint_symbol_1)); return vec4(); } @@ -83,8 +83,8 @@ fn tint_symbol_2([[builtin(vertex_index)]] tint_symbol_1 : u32) -> [[builtin(pos TEST_F(RenamerTest, PreserveSwizzles) { auto* src = R"( -[[stage(vertex)]] -fn entry() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry() -> @builtin(position) vec4 { var v : vec4; var rgba : f32; var xyzw : f32; @@ -93,8 +93,8 @@ fn entry() -> [[builtin(position)]] vec4 { )"; auto* expect = R"( -[[stage(vertex)]] -fn tint_symbol() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn tint_symbol() -> @builtin(position) vec4 { var tint_symbol_1 : vec4; var tint_symbol_2 : f32; var tint_symbol_3 : f32; @@ -120,16 +120,16 @@ fn tint_symbol() -> [[builtin(position)]] vec4 { TEST_F(RenamerTest, PreserveIntrinsics) { auto* src = R"( -[[stage(vertex)]] -fn entry() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry() -> @builtin(position) vec4 { var blah : vec4; return abs(blah); } )"; auto* expect = R"( -[[stage(vertex)]] -fn tint_symbol() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn tint_symbol() -> @builtin(position) vec4 { var tint_symbol_1 : vec4; return abs(tint_symbol_1); } @@ -151,7 +151,7 @@ fn tint_symbol() -> [[builtin(position)]] vec4 { TEST_F(RenamerTest, PreserveBuiltinTypes) { auto* src = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn entry() { var a = modf(1.0).whole; var b = modf(1.0).fract; @@ -161,7 +161,7 @@ fn entry() { )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn tint_symbol() { var tint_symbol_1 = modf(1.0).whole; var tint_symbol_2 = modf(1.0).fract; @@ -186,8 +186,8 @@ fn tint_symbol() { TEST_F(RenamerTest, AttemptSymbolCollision) { auto* src = R"( -[[stage(vertex)]] -fn entry() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn entry() -> @builtin(position) vec4 { var tint_symbol : vec4; var tint_symbol_2 : vec4; var tint_symbol_4 : vec4; @@ -196,8 +196,8 @@ fn entry() -> [[builtin(position)]] vec4 { )"; auto* expect = R"( -[[stage(vertex)]] -fn tint_symbol() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn tint_symbol() -> @builtin(position) vec4 { var tint_symbol_1 : vec4; var tint_symbol_2 : vec4; var tint_symbol_3 : vec4; @@ -229,7 +229,7 @@ TEST_P(RenamerTestGlsl, Keywords) { auto keyword = GetParam(); auto src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var )" + keyword + R"( : i32; @@ -237,7 +237,7 @@ fn frag_main() { )"; auto* expect = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var tint_symbol : i32; } @@ -254,7 +254,7 @@ TEST_P(RenamerTestHlsl, Keywords) { auto keyword = GetParam(); auto src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var )" + keyword + R"( : i32; @@ -262,7 +262,7 @@ fn frag_main() { )"; auto* expect = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var tint_symbol : i32; } @@ -279,7 +279,7 @@ TEST_P(RenamerTestMsl, Keywords) { auto keyword = GetParam(); auto src = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var )" + keyword + R"( : i32; @@ -287,7 +287,7 @@ fn frag_main() { )"; auto* expect = R"( -[[stage(fragment)]] +@stage(fragment) fn frag_main() { var tint_symbol : i32; } diff --git a/src/transform/robustness_test.cc b/src/transform/robustness_test.cc index a471381a08..8af6cce79a 100644 --- a/src/transform/robustness_test.cc +++ b/src/transform/robustness_test.cc @@ -178,7 +178,7 @@ struct S { a : array; b : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn f() { // Signed @@ -217,7 +217,7 @@ struct S { b : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn f() { var i32_a1 : f32 = s.a[2147483646]; @@ -579,7 +579,7 @@ fn f() { // TODO(dsinclair): Implement when constant_id exists TEST_F(RobustnessTest, DISABLED_Vector_Constant_Id_Clamps) { - // [[override(1300)]] let idx : i32; + // @override(1300) let idx : i32; // var a : vec3 // var b : f32 = a[idx] // @@ -588,7 +588,7 @@ TEST_F(RobustnessTest, DISABLED_Vector_Constant_Id_Clamps) { // TODO(dsinclair): Implement when constant_id exists TEST_F(RobustnessTest, DISABLED_Array_Constant_Id_Clamps) { - // [[override(1300)]] let idx : i32; + // @override(1300) let idx : i32; // var a : array // var b : f32 = a[idx] // @@ -597,7 +597,7 @@ TEST_F(RobustnessTest, DISABLED_Array_Constant_Id_Clamps) { // TODO(dsinclair): Implement when constant_id exists TEST_F(RobustnessTest, DISABLED_Matrix_Column_Constant_Id_Clamps) { - // [[override(1300)]] let idx : i32; + // @override(1300) let idx : i32; // var a : mat3x2 // var b : f32 = a[idx][1] // @@ -606,7 +606,7 @@ TEST_F(RobustnessTest, DISABLED_Matrix_Column_Constant_Id_Clamps) { // TODO(dsinclair): Implement when constant_id exists TEST_F(RobustnessTest, DISABLED_Matrix_Row_Constant_Id_Clamps) { - // [[override(1300)]] let idx : i32; + // @override(1300) let idx : i32; // var a : mat3x2 // var b : f32 = a[1][idx] // @@ -619,7 +619,7 @@ struct S { a : f32; b : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn f() { var d : f32 = s.b[25]; @@ -632,7 +632,7 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; fn f() { var d : f32 = s.b[min(25u, (arrayLength(&(s.b)) - 1u))]; @@ -652,14 +652,14 @@ TEST_F(RobustnessTest, DISABLED_Atomics_Clamp) { // Clamp textureLoad() coord, array_index and level values TEST_F(RobustnessTest, TextureLoad_Clamp) { auto* src = R"( -[[group(0), binding(0)]] var tex_1d : texture_1d; -[[group(0), binding(0)]] var tex_2d : texture_2d; -[[group(0), binding(0)]] var tex_2d_arr : texture_2d_array; -[[group(0), binding(0)]] var tex_3d : texture_3d; -[[group(0), binding(0)]] var tex_ms_2d : texture_multisampled_2d; -[[group(0), binding(0)]] var tex_depth_2d : texture_depth_2d; -[[group(0), binding(0)]] var tex_depth_2d_arr : texture_depth_2d_array; -[[group(0), binding(0)]] var tex_external : texture_external; +@group(0) @binding(0) var tex_1d : texture_1d; +@group(0) @binding(0) var tex_2d : texture_2d; +@group(0) @binding(0) var tex_2d_arr : texture_2d_array; +@group(0) @binding(0) var tex_3d : texture_3d; +@group(0) @binding(0) var tex_ms_2d : texture_multisampled_2d; +@group(0) @binding(0) var tex_depth_2d : texture_depth_2d; +@group(0) @binding(0) var tex_depth_2d_arr : texture_depth_2d_array; +@group(0) @binding(0) var tex_external : texture_external; fn f() { var array_idx : i32; @@ -679,21 +679,21 @@ fn f() { auto* expect = R"( -[[group(0), binding(0)]] var tex_1d : texture_1d; +@group(0) @binding(0) var tex_1d : texture_1d; -[[group(0), binding(0)]] var tex_2d : texture_2d; +@group(0) @binding(0) var tex_2d : texture_2d; -[[group(0), binding(0)]] var tex_2d_arr : texture_2d_array; +@group(0) @binding(0) var tex_2d_arr : texture_2d_array; -[[group(0), binding(0)]] var tex_3d : texture_3d; +@group(0) @binding(0) var tex_3d : texture_3d; -[[group(0), binding(0)]] var tex_ms_2d : texture_multisampled_2d; +@group(0) @binding(0) var tex_ms_2d : texture_multisampled_2d; -[[group(0), binding(0)]] var tex_depth_2d : texture_depth_2d; +@group(0) @binding(0) var tex_depth_2d : texture_depth_2d; -[[group(0), binding(0)]] var tex_depth_2d_arr : texture_depth_2d_array; +@group(0) @binding(0) var tex_depth_2d_arr : texture_depth_2d_array; -[[group(0), binding(0)]] var tex_external : texture_external; +@group(0) @binding(0) var tex_external : texture_external; fn f() { var array_idx : i32; @@ -718,13 +718,13 @@ fn f() { // Clamp textureStore() coord, array_index and level values TEST_F(RobustnessTest, TextureStore_Clamp) { auto* src = R"( -[[group(0), binding(0)]] var tex1d : texture_storage_1d; +@group(0) @binding(0) var tex1d : texture_storage_1d; -[[group(0), binding(1)]] var tex2d : texture_storage_2d; +@group(0) @binding(1) var tex2d : texture_storage_2d; -[[group(0), binding(2)]] var tex2d_arr : texture_storage_2d_array; +@group(0) @binding(2) var tex2d_arr : texture_storage_2d_array; -[[group(0), binding(3)]] var tex3d : texture_storage_3d; +@group(0) @binding(3) var tex3d : texture_storage_3d; fn f() { textureStore(tex1d, 10, vec4()); @@ -735,13 +735,13 @@ fn f() { )"; auto* expect = R"( -[[group(0), binding(0)]] var tex1d : texture_storage_1d; +@group(0) @binding(0) var tex1d : texture_storage_1d; -[[group(0), binding(1)]] var tex2d : texture_storage_2d; +@group(0) @binding(1) var tex2d : texture_storage_2d; -[[group(0), binding(2)]] var tex2d_arr : texture_storage_2d_array; +@group(0) @binding(2) var tex2d_arr : texture_storage_2d_array; -[[group(0), binding(3)]] var tex3d : texture_storage_3d; +@group(0) @binding(3) var tex3d : texture_storage_3d; fn f() { textureStore(tex1d, clamp(10, i32(), (textureDimensions(tex1d) - i32(1))), vec4()); @@ -779,7 +779,7 @@ struct S { b : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; let c : u32 = 1u; @@ -796,7 +796,7 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; let c : u32 = 1u; @@ -817,13 +817,13 @@ struct S { a : array; b : array; }; -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -type UArr = [[stride(16)]] array; +type UArr = @stride(16) array; struct U { a : UArr; }; -[[group(1), binding(0)]] var u : U; +@group(1) @binding(0) var u : U; fn f() { // Signed @@ -876,15 +876,15 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -type UArr = [[stride(16)]] array; +type UArr = @stride(16) array; struct U { a : UArr; } -[[group(1), binding(0)]] var u : U; +@group(1) @binding(0) var u : U; fn f() { var i32_sa1 : f32 = s.a[3]; @@ -939,15 +939,15 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -type UArr = [[stride(16)]] array; +type UArr = @stride(16) array; struct U { a : UArr; } -[[group(1), binding(0)]] var u : U; +@group(1) @binding(0) var u : U; fn f() { var i32_sa1 : f32 = s.a[4]; @@ -1004,15 +1004,15 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -type UArr = [[stride(16)]] array; +type UArr = @stride(16) array; struct U { a : UArr; } -[[group(1), binding(0)]] var u : U; +@group(1) @binding(0) var u : U; fn f() { var i32_sa1 : f32 = s.a[3]; @@ -1069,15 +1069,15 @@ struct S { b : array; } -[[group(0), binding(0)]] var s : S; +@group(0) @binding(0) var s : S; -type UArr = [[stride(16)]] array; +type UArr = @stride(16) array; struct U { a : UArr; } -[[group(1), binding(0)]] var u : U; +@group(1) @binding(0) var u : U; fn f() { var i32_sa1 : f32 = s.a[4]; diff --git a/src/transform/simplify_pointers_test.cc b/src/transform/simplify_pointers_test.cc index 6b55d32694..a9cce891ad 100644 --- a/src/transform/simplify_pointers_test.cc +++ b/src/transform/simplify_pointers_test.cc @@ -249,7 +249,7 @@ fn foo() -> i32 { return 1; } -[[stage(fragment)]] +@stage(fragment) fn main() { var arr = array(); for (let a = &arr[foo()]; ;) { @@ -264,7 +264,7 @@ fn foo() -> i32 { return 1; } -[[stage(fragment)]] +@stage(fragment) fn main() { var arr = array(); let a_save = foo(); @@ -350,7 +350,7 @@ TEST_F(SimplifyPointersTest, ShadowPointer) { auto* src = R"( var a : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = &a; var a : i32 = (*x)[0]; @@ -363,7 +363,7 @@ fn main() { auto* expect = R"( var a : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var a_1 : i32 = a[0]; { diff --git a/src/transform/single_entry_point_test.cc b/src/transform/single_entry_point_test.cc index b2193b1391..6b950fed1c 100644 --- a/src/transform/single_entry_point_test.cc +++ b/src/transform/single_entry_point_test.cc @@ -49,8 +49,8 @@ TEST_F(SingleEntryPointTest, Error_NoEntryPoints) { TEST_F(SingleEntryPointTest, Error_InvalidEntryPoint) { auto* src = R"( -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(); } )"; @@ -70,7 +70,7 @@ TEST_F(SingleEntryPointTest, Error_NotAnEntryPoint) { auto* src = R"( fn foo() {} -[[stage(fragment)]] +@stage(fragment) fn main() {} )"; @@ -87,7 +87,7 @@ fn main() {} TEST_F(SingleEntryPointTest, SingleEntryPoint) { auto* src = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } )"; @@ -103,26 +103,26 @@ fn main() { TEST_F(SingleEntryPointTest, MultipleEntryPoints) { auto* src = R"( -[[stage(vertex)]] -fn vert_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main() -> @builtin(position) vec4 { return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { } )"; auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { } )"; @@ -146,23 +146,23 @@ var c : f32; var d : f32; -[[stage(vertex)]] -fn vert_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main() -> @builtin(position) vec4 { a = 0.0; return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { b = 0.0; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { c = 0.0; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { d = 0.0; } @@ -171,7 +171,7 @@ fn comp_main2() { auto* expect = R"( var c : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { c = 0.0; } @@ -196,23 +196,23 @@ let c : f32 = 1.0; let d : f32 = 1.0; -[[stage(vertex)]] -fn vert_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main() -> @builtin(position) vec4 { let local_a : f32 = a; return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn frag_main() { let local_b : f32 = b; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { let local_c : f32 = c; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { let local_d : f32 = d; } @@ -221,7 +221,7 @@ fn comp_main2() { auto* expect = R"( let c : f32 = 1.0; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { let local_c : f32 = c; } @@ -240,7 +240,7 @@ TEST_F(SingleEntryPointTest, WorkgroupSizeLetPreserved) { auto* src = R"( let size : i32 = 1; -[[stage(compute), workgroup_size(size)]] +@stage(compute) @workgroup_size(size) fn main() { } )"; @@ -258,32 +258,32 @@ fn main() { TEST_F(SingleEntryPointTest, OverridableConstants) { auto* src = R"( -[[override(1001)]] let c1 : u32 = 1u; +@override(1001) let c1 : u32 = 1u; [[override]] let c2 : u32 = 1u; -[[override(0)]] let c3 : u32 = 1u; -[[override(9999)]] let c4 : u32 = 1u; +@override(0) let c3 : u32 = 1u; +@override(9999) let c4 : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { let local_d = c1; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { let local_d = c2; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main3() { let local_d = c3; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main4() { let local_d = c4; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main5() { let local_d = 1u; } @@ -292,9 +292,9 @@ fn comp_main5() { { SingleEntryPoint::Config cfg("comp_main1"); auto* expect = R"( -[[override(1001)]] let c1 : u32 = 1u; +@override(1001) let c1 : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { let local_d = c1; } @@ -310,9 +310,9 @@ fn comp_main1() { // The decorator is replaced with the one with explicit id // And should not be affected by other constants stripped away auto* expect = R"( -[[override(1)]] let c2 : u32 = 1u; +@override(1) let c2 : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { let local_d = c2; } @@ -326,9 +326,9 @@ fn comp_main2() { { SingleEntryPoint::Config cfg("comp_main3"); auto* expect = R"( -[[override(0)]] let c3 : u32 = 1u; +@override(0) let c3 : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main3() { let local_d = c3; } @@ -342,9 +342,9 @@ fn comp_main3() { { SingleEntryPoint::Config cfg("comp_main4"); auto* expect = R"( -[[override(9999)]] let c4 : u32 = 1u; +@override(9999) let c4 : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main4() { let local_d = c4; } @@ -358,7 +358,7 @@ fn comp_main4() { { SingleEntryPoint::Config cfg("comp_main5"); auto* expect = R"( -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main5() { let local_d = 1u; } @@ -391,12 +391,12 @@ fn outer2() { inner_shared(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { outer1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { outer2(); } @@ -414,7 +414,7 @@ fn outer1() { inner_shared(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { outer1(); } @@ -465,12 +465,12 @@ fn outer2() { outer2_var = 0.0; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { outer1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main2() { outer2(); } @@ -497,7 +497,7 @@ fn outer1() { outer1_var = 0.0; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main1() { outer1(); } diff --git a/src/transform/vectorize_scalar_matrix_constructors_test.cc b/src/transform/vectorize_scalar_matrix_constructors_test.cc index c603ee2582..7e72e4cfb6 100644 --- a/src/transform/vectorize_scalar_matrix_constructors_test.cc +++ b/src/transform/vectorize_scalar_matrix_constructors_test.cc @@ -54,7 +54,7 @@ TEST_P(VectorizeScalarMatrixConstructorsTest, Basic) { } std::string tmpl = R"( -[[stage(fragment)]] +@stage(fragment) fn main() { let m = ${matrix}(${values}); } @@ -83,7 +83,7 @@ TEST_P(VectorizeScalarMatrixConstructorsTest, NonScalarConstructors) { } std::string tmpl = R"( -[[stage(fragment)]] +@stage(fragment) fn main() { let m = ${matrix}(${columns}); } diff --git a/src/transform/vertex_pulling_test.cc b/src/transform/vertex_pulling_test.cc index 10b8ee8cd2..b2482af084 100644 --- a/src/transform/vertex_pulling_test.cc +++ b/src/transform/vertex_pulling_test.cc @@ -38,8 +38,8 @@ TEST_F(VertexPullingTest, Error_NoEntryPoint) { TEST_F(VertexPullingTest, Error_InvalidEntryPoint) { auto* src = R"( -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(); } )"; @@ -58,7 +58,7 @@ fn main() -> [[builtin(position)]] vec4 { TEST_F(VertexPullingTest, Error_EntryPointWrongStage) { auto* src = R"( -[[stage(fragment)]] +@stage(fragment) fn main() {} )"; @@ -76,8 +76,8 @@ fn main() {} TEST_F(VertexPullingTest, Error_BadStride) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32) -> @builtin(position) vec4 { return vec4(var_a, 0.0, 0.0, 1.0); } )"; @@ -100,19 +100,19 @@ fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4 { TEST_F(VertexPullingTest, BasicModule) { auto* src = R"( -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(); } )"; @@ -129,21 +129,21 @@ fn main() -> [[builtin(position)]] vec4 { TEST_F(VertexPullingTest, OneAttribute) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32) -> @builtin(position) vec4 { return vec4(var_a, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var var_a : f32; { let buffer_array_base_0 = tint_pulling_vertex_index; @@ -167,21 +167,21 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, OneInstancedAttribute) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32) -> @builtin(position) vec4 { return vec4(var_a, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(instance_index)]] tint_pulling_instance_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(instance_index) tint_pulling_instance_index : u32) -> @builtin(position) vec4 { var var_a : f32; { let buffer_array_base_0 = tint_pulling_instance_index; @@ -205,21 +205,21 @@ fn main([[builtin(instance_index)]] tint_pulling_instance_index : u32) -> [[buil TEST_F(VertexPullingTest, OneAttributeDifferentOutputSet) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32) -> @builtin(position) vec4 { return vec4(var_a, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(5)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(5) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var var_a : f32; { let buffer_array_base_0 = tint_pulling_vertex_index; @@ -245,29 +245,29 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, OneAttribute_Struct) { auto* src = R"( struct Inputs { - [[location(0)]] var_a : f32; + @location(0) var_a : f32; }; -[[stage(vertex)]] -fn main(inputs : Inputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : Inputs) -> @builtin(position) vec4 { return vec4(inputs.var_a, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; struct Inputs { - [[location(0)]] + @location(0) var_a : f32; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var inputs : Inputs; { let buffer_array_base_0 = tint_pulling_vertex_index; @@ -292,27 +292,27 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( // We expect the transform to use an existing builtin variables if it finds them TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32, - [[location(1)]] var_b : f32, - [[builtin(vertex_index)]] custom_vertex_index : u32, - [[builtin(instance_index)]] custom_instance_index : u32 - ) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32, + @location(1) var_b : f32, + @builtin(vertex_index) custom_vertex_index : u32, + @builtin(instance_index) custom_instance_index : u32 + ) -> @builtin(position) vec4 { return vec4(var_a, var_b, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[binding(1), group(4)]] var tint_pulling_vertex_buffer_1 : TintVertexData; +@binding(1) @group(4) var tint_pulling_vertex_buffer_1 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] custom_vertex_index : u32, [[builtin(instance_index)]] custom_instance_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) custom_vertex_index : u32, @builtin(instance_index) custom_instance_index : u32) -> @builtin(position) vec4 { var var_a : f32; var var_b : f32; { @@ -350,47 +350,47 @@ fn main([[builtin(vertex_index)]] custom_vertex_index : u32, [[builtin(instance_ TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex_Struct) { auto* src = R"( struct Inputs { - [[location(0)]] var_a : f32; - [[location(1)]] var_b : f32; - [[builtin(vertex_index)]] custom_vertex_index : u32; - [[builtin(instance_index)]] custom_instance_index : u32; + @location(0) var_a : f32; + @location(1) var_b : f32; + @builtin(vertex_index) custom_vertex_index : u32; + @builtin(instance_index) custom_instance_index : u32; }; -[[stage(vertex)]] -fn main(inputs : Inputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : Inputs) -> @builtin(position) vec4 { return vec4(inputs.var_a, inputs.var_b, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[binding(1), group(4)]] var tint_pulling_vertex_buffer_1 : TintVertexData; +@binding(1) @group(4) var tint_pulling_vertex_buffer_1 : TintVertexData; struct tint_symbol { - [[builtin(vertex_index)]] + @builtin(vertex_index) custom_vertex_index : u32; - [[builtin(instance_index)]] + @builtin(instance_index) custom_instance_index : u32; } struct Inputs { - [[location(0)]] + @location(0) var_a : f32; - [[location(1)]] + @location(1) var_b : f32; - [[builtin(vertex_index)]] + @builtin(vertex_index) custom_vertex_index : u32; - [[builtin(instance_index)]] + @builtin(instance_index) custom_instance_index : u32; } -[[stage(vertex)]] -fn main(tint_symbol_1 : tint_symbol) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(tint_symbol_1 : tint_symbol) -> @builtin(position) vec4 { var inputs : Inputs; inputs.custom_vertex_index = tint_symbol_1.custom_vertex_index; inputs.custom_instance_index = tint_symbol_1.custom_instance_index; @@ -429,46 +429,46 @@ fn main(tint_symbol_1 : tint_symbol) -> [[builtin(position)]] vec4 { TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex_SeparateStruct) { auto* src = R"( struct Inputs { - [[location(0)]] var_a : f32; - [[location(1)]] var_b : f32; + @location(0) var_a : f32; + @location(1) var_b : f32; }; struct Indices { - [[builtin(vertex_index)]] custom_vertex_index : u32; - [[builtin(instance_index)]] custom_instance_index : u32; + @builtin(vertex_index) custom_vertex_index : u32; + @builtin(instance_index) custom_instance_index : u32; }; -[[stage(vertex)]] -fn main(inputs : Inputs, indices : Indices) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : Inputs, indices : Indices) -> @builtin(position) vec4 { return vec4(inputs.var_a, inputs.var_b, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[binding(1), group(4)]] var tint_pulling_vertex_buffer_1 : TintVertexData; +@binding(1) @group(4) var tint_pulling_vertex_buffer_1 : TintVertexData; struct Inputs { - [[location(0)]] + @location(0) var_a : f32; - [[location(1)]] + @location(1) var_b : f32; } struct Indices { - [[builtin(vertex_index)]] + @builtin(vertex_index) custom_vertex_index : u32; - [[builtin(instance_index)]] + @builtin(instance_index) custom_instance_index : u32; } -[[stage(vertex)]] -fn main(indices : Indices) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(indices : Indices) -> @builtin(position) vec4 { var inputs : Inputs; { let buffer_array_base_0 = indices.custom_vertex_index; @@ -504,22 +504,22 @@ fn main(indices : Indices) -> [[builtin(position)]] vec4 { TEST_F(VertexPullingTest, TwoAttributesSameBuffer) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32, - [[location(1)]] var_b : vec4) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32, + @location(1) var_b : vec4) -> @builtin(position) vec4 { return vec4(); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var var_a : f32; var var_b : vec4; { @@ -547,28 +547,28 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, FloatVectorAttributes) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : vec2, - [[location(1)]] var_b : vec3, - [[location(2)]] var_c : vec4 - ) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : vec2, + @location(1) var_b : vec3, + @location(2) var_c : vec4 + ) -> @builtin(position) vec4 { return vec4(); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[binding(1), group(4)]] var tint_pulling_vertex_buffer_1 : TintVertexData; +@binding(1) @group(4) var tint_pulling_vertex_buffer_1 : TintVertexData; -[[binding(2), group(4)]] var tint_pulling_vertex_buffer_2 : TintVertexData; +@binding(2) @group(4) var tint_pulling_vertex_buffer_2 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var var_a : vec2; var var_b : vec3; var var_c : vec4; @@ -601,9 +601,9 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, AttemptSymbolCollision) { auto* src = R"( -[[stage(vertex)]] -fn main([[location(0)]] var_a : f32, - [[location(1)]] var_b : vec4) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) var_a : f32, + @location(1) var_b : vec4) -> @builtin(position) vec4 { var tint_pulling_vertex_index : i32; var tint_pulling_vertex_buffer_0 : i32; var tint_vertex_data : i32; @@ -614,13 +614,13 @@ fn main([[location(0)]] var_a : f32, auto* expect = R"( struct TintVertexData { - tint_vertex_data_1 : [[stride(4)]] array; + tint_vertex_data_1 : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0_1 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0_1 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index_1 : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index_1 : u32) -> @builtin(position) vec4 { var var_a : f32; var var_b : vec4; { @@ -652,52 +652,52 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index_1 : u32) -> [[builti TEST_F(VertexPullingTest, FormatsAligned) { auto* src = R"( -[[stage(vertex)]] +@stage(vertex) fn main( - [[location(0)]] uint8x2 : vec2, - [[location(1)]] uint8x4 : vec4, - [[location(2)]] sint8x2 : vec2, - [[location(3)]] sint8x4 : vec4, - [[location(4)]] unorm8x2 : vec2, - [[location(5)]] unorm8x4 : vec4, - [[location(6)]] snorm8x2 : vec2, - [[location(7)]] snorm8x4 : vec4, - [[location(8)]] uint16x2 : vec2, - [[location(9)]] uint16x4 : vec4, - [[location(10)]] sint16x2 : vec2, - [[location(11)]] sint16x4 : vec4, - [[location(12)]] unorm16x2 : vec2, - [[location(13)]] unorm16x4 : vec4, - [[location(14)]] snorm16x2 : vec2, - [[location(15)]] snorm16x4 : vec4, - [[location(16)]] float16x2 : vec2, - [[location(17)]] float16x4 : vec4, - [[location(18)]] float32 : f32, - [[location(19)]] float32x2 : vec2, - [[location(20)]] float32x3 : vec3, - [[location(21)]] float32x4 : vec4, - [[location(22)]] uint32 : u32, - [[location(23)]] uint32x2 : vec2, - [[location(24)]] uint32x3 : vec3, - [[location(25)]] uint32x4 : vec4, - [[location(26)]] sint32 : i32, - [[location(27)]] sint32x2 : vec2, - [[location(28)]] sint32x3 : vec3, - [[location(29)]] sint32x4 : vec4 - ) -> [[builtin(position)]] vec4 { + @location(0) uint8x2 : vec2, + @location(1) uint8x4 : vec4, + @location(2) sint8x2 : vec2, + @location(3) sint8x4 : vec4, + @location(4) unorm8x2 : vec2, + @location(5) unorm8x4 : vec4, + @location(6) snorm8x2 : vec2, + @location(7) snorm8x4 : vec4, + @location(8) uint16x2 : vec2, + @location(9) uint16x4 : vec4, + @location(10) sint16x2 : vec2, + @location(11) sint16x4 : vec4, + @location(12) unorm16x2 : vec2, + @location(13) unorm16x4 : vec4, + @location(14) snorm16x2 : vec2, + @location(15) snorm16x4 : vec4, + @location(16) float16x2 : vec2, + @location(17) float16x4 : vec4, + @location(18) float32 : f32, + @location(19) float32x2 : vec2, + @location(20) float32x3 : vec3, + @location(21) float32x4 : vec4, + @location(22) uint32 : u32, + @location(23) uint32x2 : vec2, + @location(24) uint32x3 : vec3, + @location(25) uint32x4 : vec4, + @location(26) sint32 : i32, + @location(27) sint32x2 : vec2, + @location(28) sint32x3 : vec3, + @location(29) sint32x4 : vec4 + ) -> @builtin(position) vec4 { return vec4(0.0, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var uint8x2 : vec2; var uint8x4 : vec4; var sint8x2 : vec2; @@ -811,39 +811,39 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, FormatsStrideUnaligned) { auto* src = R"( -[[stage(vertex)]] +@stage(vertex) fn main( - [[location(0)]] uint8x2 : vec2, - [[location(1)]] uint8x4 : vec4, - [[location(2)]] sint8x2 : vec2, - [[location(3)]] sint8x4 : vec4, - [[location(4)]] unorm8x2 : vec2, - [[location(5)]] unorm8x4 : vec4, - [[location(6)]] snorm8x2 : vec2, - [[location(7)]] snorm8x4 : vec4, - [[location(8)]] uint16x2 : vec2, - [[location(9)]] uint16x4 : vec4, - [[location(10)]] sint16x2 : vec2, - [[location(11)]] sint16x4 : vec4, - [[location(12)]] unorm16x2 : vec2, - [[location(13)]] unorm16x4 : vec4, - [[location(14)]] snorm16x2 : vec2, - [[location(15)]] snorm16x4 : vec4, - [[location(16)]] float16x2 : vec2, - [[location(17)]] float16x4 : vec4, - [[location(18)]] float32 : f32, - [[location(19)]] float32x2 : vec2, - [[location(20)]] float32x3 : vec3, - [[location(21)]] float32x4 : vec4, - [[location(22)]] uint32 : u32, - [[location(23)]] uint32x2 : vec2, - [[location(24)]] uint32x3 : vec3, - [[location(25)]] uint32x4 : vec4, - [[location(26)]] sint32 : i32, - [[location(27)]] sint32x2 : vec2, - [[location(28)]] sint32x3 : vec3, - [[location(29)]] sint32x4 : vec4 - ) -> [[builtin(position)]] vec4 { + @location(0) uint8x2 : vec2, + @location(1) uint8x4 : vec4, + @location(2) sint8x2 : vec2, + @location(3) sint8x4 : vec4, + @location(4) unorm8x2 : vec2, + @location(5) unorm8x4 : vec4, + @location(6) snorm8x2 : vec2, + @location(7) snorm8x4 : vec4, + @location(8) uint16x2 : vec2, + @location(9) uint16x4 : vec4, + @location(10) sint16x2 : vec2, + @location(11) sint16x4 : vec4, + @location(12) unorm16x2 : vec2, + @location(13) unorm16x4 : vec4, + @location(14) snorm16x2 : vec2, + @location(15) snorm16x4 : vec4, + @location(16) float16x2 : vec2, + @location(17) float16x4 : vec4, + @location(18) float32 : f32, + @location(19) float32x2 : vec2, + @location(20) float32x3 : vec3, + @location(21) float32x4 : vec4, + @location(22) uint32 : u32, + @location(23) uint32x2 : vec2, + @location(24) uint32x3 : vec3, + @location(25) uint32x4 : vec4, + @location(26) sint32 : i32, + @location(27) sint32x2 : vec2, + @location(28) sint32x3 : vec3, + @location(29) sint32x4 : vec4 + ) -> @builtin(position) vec4 { return vec4(0.0, 0.0, 0.0, 1.0); } )"; @@ -851,13 +851,13 @@ fn main( auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var uint8x2 : vec2; var uint8x4 : vec4; var sint8x2 : vec2; @@ -971,52 +971,52 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin( TEST_F(VertexPullingTest, FormatsWithVectorsResized) { auto* src = R"( -[[stage(vertex)]] +@stage(vertex) fn main( - [[location(0)]] uint8x2 : vec3, - [[location(1)]] uint8x4 : vec2, - [[location(2)]] sint8x2 : i32, - [[location(3)]] sint8x4 : vec2, - [[location(4)]] unorm8x2 : vec4, - [[location(5)]] unorm8x4 : f32, - [[location(6)]] snorm8x2 : vec3, - [[location(7)]] snorm8x4 : f32, - [[location(8)]] uint16x2 : vec3, - [[location(9)]] uint16x4 : vec2, - [[location(10)]] sint16x2 : vec4, - [[location(11)]] sint16x4 : i32, - [[location(12)]] unorm16x2 : vec3, - [[location(13)]] unorm16x4 : f32, - [[location(14)]] snorm16x2 : vec4, - [[location(15)]] snorm16x4 : vec3, - [[location(16)]] float16x2 : vec4, - [[location(17)]] float16x4 : f32, - [[location(18)]] float32 : vec4, - [[location(19)]] float32x2 : vec4, - [[location(20)]] float32x3 : vec2, - [[location(21)]] float32x4 : vec3, - [[location(22)]] uint32 : vec3, - [[location(23)]] uint32x2 : vec4, - [[location(24)]] uint32x3 : vec4, - [[location(25)]] uint32x4 : vec2, - [[location(26)]] sint32 : vec4, - [[location(27)]] sint32x2 : vec3, - [[location(28)]] sint32x3 : i32, - [[location(29)]] sint32x4 : vec2 - ) -> [[builtin(position)]] vec4 { + @location(0) uint8x2 : vec3, + @location(1) uint8x4 : vec2, + @location(2) sint8x2 : i32, + @location(3) sint8x4 : vec2, + @location(4) unorm8x2 : vec4, + @location(5) unorm8x4 : f32, + @location(6) snorm8x2 : vec3, + @location(7) snorm8x4 : f32, + @location(8) uint16x2 : vec3, + @location(9) uint16x4 : vec2, + @location(10) sint16x2 : vec4, + @location(11) sint16x4 : i32, + @location(12) unorm16x2 : vec3, + @location(13) unorm16x4 : f32, + @location(14) snorm16x2 : vec4, + @location(15) snorm16x4 : vec3, + @location(16) float16x2 : vec4, + @location(17) float16x4 : f32, + @location(18) float32 : vec4, + @location(19) float32x2 : vec4, + @location(20) float32x3 : vec2, + @location(21) float32x4 : vec3, + @location(22) uint32 : vec3, + @location(23) uint32x2 : vec4, + @location(24) uint32x3 : vec4, + @location(25) uint32x4 : vec2, + @location(26) sint32 : vec4, + @location(27) sint32x2 : vec3, + @location(28) sint32x3 : i32, + @location(29) sint32x4 : vec2 + ) -> @builtin(position) vec4 { return vec4(0.0, 0.0, 0.0, 1.0); } )"; auto* expect = R"( struct TintVertexData { - tint_vertex_data : [[stride(4)]] array; + tint_vertex_data : @stride(4) array; } -[[binding(0), group(4)]] var tint_pulling_vertex_buffer_0 : TintVertexData; +@binding(0) @group(4) var tint_pulling_vertex_buffer_0 : TintVertexData; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) tint_pulling_vertex_index : u32) -> @builtin(position) vec4 { var uint8x2 : vec3; var uint8x4 : vec2; var sint8x2 : i32; diff --git a/src/transform/zero_init_workgroup_memory_test.cc b/src/transform/zero_init_workgroup_memory_test.cc index 166036e320..d23e0af56f 100644 --- a/src/transform/zero_init_workgroup_memory_test.cc +++ b/src/transform/zero_init_workgroup_memory_test.cc @@ -60,7 +60,7 @@ fn unreferenced() { b = c; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { } )"; @@ -75,16 +75,16 @@ TEST_F(ZeroInitWorkgroupMemoryTest, SingleWorkgroupVar_ExistingLocalIndex) { auto* src = R"( var v : i32; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { ignore(v); // Initialization should be inserted above this statement } )"; auto* expect = R"( var v : i32; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { { v = i32(); } @@ -104,10 +104,10 @@ TEST_F(ZeroInitWorkgroupMemoryTest, var v : i32; struct Params { - [[builtin(local_invocation_index)]] local_idx : u32; + @builtin(local_invocation_index) local_idx : u32; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f(params : Params) { ignore(v); // Initialization should be inserted above this statement } @@ -116,11 +116,11 @@ fn f(params : Params) { var v : i32; struct Params { - [[builtin(local_invocation_index)]] + @builtin(local_invocation_index) local_idx : u32; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f(params : Params) { { v = i32(); @@ -139,7 +139,7 @@ TEST_F(ZeroInitWorkgroupMemoryTest, SingleWorkgroupVar_InjectedLocalIndex) { auto* src = R"( var v : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ignore(v); // Initialization should be inserted above this statement } @@ -147,8 +147,8 @@ fn f() { auto* expect = R"( var v : i32; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_invocation_index : u32) { { v = i32(); } @@ -176,8 +176,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { ignore(a); // Initialization should be inserted above this statement ignore(b); ignore(c); @@ -195,8 +195,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { { a = i32(); b.x = i32(); @@ -240,8 +240,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(2, 3)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(2, 3) +fn f(@builtin(local_invocation_index) local_idx : u32) { ignore(a); // Initialization should be inserted above this statement ignore(b); ignore(c); @@ -259,8 +259,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(2, 3)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(2, 3) +fn f(@builtin(local_invocation_index) local_idx : u32) { if ((local_idx < 1u)) { a = i32(); b.x = i32(); @@ -304,10 +304,10 @@ var b : S; var c : array; -[[override(1)]] let X : i32; +@override(1) let X : i32; -[[stage(compute), workgroup_size(2, 3, X)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(2, 3, X) +fn f(@builtin(local_invocation_index) local_idx : u32) { ignore(a); // Initialization should be inserted above this statement ignore(b); ignore(c); @@ -326,10 +326,10 @@ var b : S; var c : array; -[[override(1)]] let X : i32; +@override(1) let X : i32; -[[stage(compute), workgroup_size(2, 3, X)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(2, 3, X) +fn f(@builtin(local_invocation_index) local_idx : u32) { for(var idx : u32 = local_idx; (idx < 1u); idx = (idx + (u32(X) * 6u))) { a = i32(); b.x = i32(); @@ -374,10 +374,10 @@ var b : S; var c : array; -[[override(1)]] let X : u32; +@override(1) let X : u32; -[[stage(compute), workgroup_size(5u, X, 10u)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(5u, X, 10u) +fn f(@builtin(local_invocation_index) local_idx : u32) { ignore(a); // Initialization should be inserted above this statement ignore(b); ignore(c); @@ -397,10 +397,10 @@ var b : S; var c : array; -[[override(1)]] let X : u32; +@override(1) let X : u32; -[[stage(compute), workgroup_size(5u, X, 10u)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(5u, X, 10u) +fn f(@builtin(local_invocation_index) local_idx : u32) { for(var idx : u32 = local_idx; (idx < 1u); idx = (idx + (X * 50u))) { a = i32(); } @@ -462,8 +462,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_id)]] local_invocation_id : vec3) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_id) local_invocation_id : vec3) { ignore(a); // Initialization should be inserted above this statement ignore(b); ignore(c); @@ -481,8 +481,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_id)]] local_invocation_id : vec3, [[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_id) local_invocation_id : vec3, @builtin(local_invocation_index) local_invocation_index : u32) { { a = i32(); b.x = i32(); @@ -525,18 +525,18 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f1() { ignore(a); // Initialization should be inserted above this statement ignore(c); } -[[stage(compute), workgroup_size(1, 2, 3)]] -fn f2([[builtin(local_invocation_id)]] local_invocation_id : vec3) { +@stage(compute) @workgroup_size(1, 2, 3) +fn f2(@builtin(local_invocation_id) local_invocation_id : vec3) { ignore(b); // Initialization should be inserted above this statement } -[[stage(compute), workgroup_size(4, 5, 6)]] +@stage(compute) @workgroup_size(4, 5, 6) fn f3() { ignore(c); // Initialization should be inserted above this statement ignore(a); @@ -554,8 +554,8 @@ var b : S; var c : array; -[[stage(compute), workgroup_size(1)]] -fn f1([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f1(@builtin(local_invocation_index) local_invocation_index : u32) { { a = i32(); } @@ -573,8 +573,8 @@ fn f1([[builtin(local_invocation_index)]] local_invocation_index : u32) { ignore(c); } -[[stage(compute), workgroup_size(1, 2, 3)]] -fn f2([[builtin(local_invocation_id)]] local_invocation_id : vec3, [[builtin(local_invocation_index)]] local_invocation_index_1 : u32) { +@stage(compute) @workgroup_size(1, 2, 3) +fn f2(@builtin(local_invocation_id) local_invocation_id : vec3, @builtin(local_invocation_index) local_invocation_index_1 : u32) { if ((local_invocation_index_1 < 1u)) { b.x = i32(); } @@ -586,8 +586,8 @@ fn f2([[builtin(local_invocation_id)]] local_invocation_id : vec3, [[builti ignore(b); } -[[stage(compute), workgroup_size(4, 5, 6)]] -fn f3([[builtin(local_invocation_index)]] local_invocation_index_2 : u32) { +@stage(compute) @workgroup_size(4, 5, 6) +fn f3(@builtin(local_invocation_index) local_invocation_index_2 : u32) { if ((local_invocation_index_2 < 1u)) { a = i32(); } @@ -623,8 +623,8 @@ fn call_use_v() { use_v(); } -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { call_use_v(); // Initialization should be inserted above this statement } )"; @@ -639,8 +639,8 @@ fn call_use_v() { use_v(); } -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_idx : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_idx : u32) { { v = i32(); } @@ -659,7 +659,7 @@ TEST_F(ZeroInitWorkgroupMemoryTest, WorkgroupAtomics) { var i : atomic; var u : atomic; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ignore(i); // Initialization should be inserted above this statement ignore(u); @@ -670,8 +670,8 @@ var i : atomic; var u : atomic; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_invocation_index : u32) { { atomicStore(&(i), i32()); atomicStore(&(u), u32()); @@ -699,7 +699,7 @@ struct S { var w : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ignore(w); // Initialization should be inserted above this statement } @@ -715,8 +715,8 @@ struct S { var w : S; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_invocation_index : u32) { { w.a = i32(); atomicStore(&(w.i), i32()); @@ -738,7 +738,7 @@ TEST_F(ZeroInitWorkgroupMemoryTest, WorkgroupArrayOfAtomics) { auto* src = R"( var w : array, 4>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ignore(w); // Initialization should be inserted above this statement } @@ -746,8 +746,8 @@ fn f() { auto* expect = R"( var w : array, 4>; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_invocation_index : u32) { for(var idx : u32 = local_invocation_index; (idx < 4u); idx = (idx + 1u)) { let i : u32 = idx; atomicStore(&(w[i]), u32()); @@ -774,7 +774,7 @@ struct S { var w : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ignore(w); // Initialization should be inserted above this statement } @@ -790,8 +790,8 @@ struct S { var w : array; -[[stage(compute), workgroup_size(1)]] -fn f([[builtin(local_invocation_index)]] local_invocation_index : u32) { +@stage(compute) @workgroup_size(1) +fn f(@builtin(local_invocation_index) local_invocation_index : u32) { for(var idx : u32 = local_invocation_index; (idx < 4u); idx = (idx + 1u)) { let i_1 : u32 = idx; w[i_1].a = i32(); diff --git a/src/writer/glsl/generator_impl_function_test.cc b/src/writer/glsl/generator_impl_function_test.cc index 3d710f46f6..19aae8889f 100644 --- a/src/writer/glsl/generator_impl_function_test.cc +++ b/src/writer/glsl/generator_impl_function_test.cc @@ -127,7 +127,7 @@ TEST_F(GlslGeneratorImplTest_Function, PtrParameter) { TEST_F(GlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_WithInOutVars) { - // fn frag_main([[location(0)]] foo : f32) -> [[location(1)]] f32 { + // fn frag_main(@location(0) foo : f32) -> @location(1) f32 { // return foo; // } auto* foo_in = Param("foo", ty.f32(), {Location(0)}); @@ -173,7 +173,7 @@ void main() { TEST_F(GlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_WithInOut_Builtins) { - // fn frag_main([[position(0)]] coord : vec4) -> [[frag_depth]] f32 { + // fn frag_main(@position(0) coord : vec4) -> @frag_depth f32 { // return coord.x; // } auto* coord_in = @@ -221,9 +221,9 @@ void main() { TEST_F(GlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_SharedStruct_DifferentStages) { // struct Interface { - // [[builtin(position)]] pos : vec4; - // [[location(1)]] col1 : f32; - // [[location(2)]] col2 : f32; + // @builtin(position) pos : vec4; + // @location(1) col1 : f32; + // @location(2) col2 : f32; // }; // fn vert_main() -> Interface { // return Interface(vec4(), 0.4, 0.6); @@ -332,7 +332,7 @@ void main() { TEST_F(GlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_SharedStruct_HelperFunction) { // struct VertexOutput { - // [[builtin(position)]] pos : vec4; + // @builtin(position) pos : vec4; // }; // fn foo(x : f32) -> VertexOutput { // return VertexOutput(vec4(x, x, x, 1.0)); @@ -1032,15 +1032,15 @@ TEST_F(GlslGeneratorImplTest_Function, // [[block]] struct Data { // d : f32; // }; - // [[binding(0), group(0)]] var data : Data; + // @binding(0) @group(0) var data : Data; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn a() { // var v = data.d; // return; // } // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn b() { // var v = data.d; // return; diff --git a/src/writer/glsl/generator_impl_member_accessor_test.cc b/src/writer/glsl/generator_impl_member_accessor_test.cc index 36809b355d..07eeaa423b 100644 --- a/src/writer/glsl/generator_impl_member_accessor_test.cc +++ b/src/writer/glsl/generator_impl_member_accessor_test.cc @@ -372,7 +372,7 @@ void main() { TEST_F(GlslGeneratorImplTest_MemberAccessor, EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[2]; @@ -420,7 +420,7 @@ void main() { TEST_F(GlslGeneratorImplTest_MemberAccessor, EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray_ExprIdx) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[(2 + 4) - 3]; @@ -468,7 +468,7 @@ void main() { TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_ToArray) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[2] = 2; @@ -518,7 +518,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_MultiLevel) { // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -578,7 +578,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -640,7 +640,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -702,7 +702,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -763,7 +763,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_MultiLevel) { // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -822,7 +822,7 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; diff --git a/src/writer/hlsl/generator_impl_function_test.cc b/src/writer/hlsl/generator_impl_function_test.cc index 3af0f4f344..7688e8519b 100644 --- a/src/writer/hlsl/generator_impl_function_test.cc +++ b/src/writer/hlsl/generator_impl_function_test.cc @@ -113,7 +113,7 @@ TEST_F(HlslGeneratorImplTest_Function, PtrParameter) { TEST_F(HlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_WithInOutVars) { - // fn frag_main([[location(0)]] foo : f32) -> [[location(1)]] f32 { + // fn frag_main(@location(0) foo : f32) -> @location(1) f32 { // return foo; // } auto* foo_in = Param("foo", ty.f32(), {Location(0)}); @@ -145,7 +145,7 @@ tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) { TEST_F(HlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_WithInOut_Builtins) { - // fn frag_main([[position(0)]] coord : vec4) -> [[frag_depth]] f32 { + // fn frag_main(@position(0) coord : vec4) -> @frag_depth f32 { // return coord.x; // } auto* coord_in = @@ -181,9 +181,9 @@ tint_symbol_2 frag_main(tint_symbol_1 tint_symbol) { TEST_F(HlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_SharedStruct_DifferentStages) { // struct Interface { - // [[builtin(position)]] pos : vec4; - // [[location(1)]] col1 : f32; - // [[location(2)]] col2 : f32; + // @builtin(position) pos : vec4; + // @location(1) col1 : f32; + // @location(2) col2 : f32; // }; // fn vert_main() -> Interface { // return Interface(vec4(), 0.4, 0.6); @@ -265,7 +265,7 @@ void frag_main(tint_symbol_2 tint_symbol_1) { TEST_F(HlslGeneratorImplTest_Function, Emit_Decoration_EntryPoint_SharedStruct_HelperFunction) { // struct VertexOutput { - // [[builtin(position)]] pos : vec4; + // @builtin(position) pos : vec4; // }; // fn foo(x : f32) -> VertexOutput { // return VertexOutput(vec4(x, x, x, 1.0)); @@ -860,15 +860,15 @@ TEST_F(HlslGeneratorImplTest_Function, // [[block]] struct Data { // d : f32; // }; - // [[binding(0), group(0)]] var data : Data; + // @binding(0) @group(0) var data : Data; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn a() { // var v = data.d; // return; // } // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn b() { // var v = data.d; // return; diff --git a/src/writer/hlsl/generator_impl_member_accessor_test.cc b/src/writer/hlsl/generator_impl_member_accessor_test.cc index 195a16022f..03cf4944ba 100644 --- a/src/writer/hlsl/generator_impl_member_accessor_test.cc +++ b/src/writer/hlsl/generator_impl_member_accessor_test.cc @@ -393,7 +393,7 @@ void main() { TEST_F(HlslGeneratorImplTest_MemberAccessor, EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[2]; @@ -425,7 +425,7 @@ void main() { TEST_F(HlslGeneratorImplTest_MemberAccessor, EmitExpression_IndexAccessor_StorageBuffer_Load_Int_FromArray_ExprIdx) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[(2 + 4) - 3]; @@ -457,7 +457,7 @@ void main() { TEST_F(HlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_ToArray) { // struct Data { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; // var data : Data; // data.a[2] = 2; @@ -491,7 +491,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, StorageBuffer_Load_MultiLevel) { // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -533,7 +533,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -577,7 +577,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -621,7 +621,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -664,7 +664,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_MultiLevel) { // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; @@ -705,7 +705,7 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, // b : vec3; // }; // struct Data { - // var c : [[stride(32)]] array; + // var c : @stride(32) array; // }; // // var data : Pre; diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc index 6ecef9a320..7e0e576a22 100644 --- a/src/writer/msl/generator_impl_function_test.cc +++ b/src/writer/msl/generator_impl_function_test.cc @@ -91,7 +91,7 @@ fragment void main() { } TEST_F(MslGeneratorImplTest, Emit_Decoration_EntryPoint_WithInOutVars) { - // fn frag_main([[location(0)]] foo : f32) -> [[location(1)]] f32 { + // fn frag_main(@location(0) foo : f32) -> @location(1) f32 { // return foo; // } auto* foo_in = Param("foo", ty.f32(), {Location(0)}); @@ -126,7 +126,7 @@ fragment tint_symbol_2 frag_main(tint_symbol_1 tint_symbol [[stage_in]]) { } TEST_F(MslGeneratorImplTest, Emit_Decoration_EntryPoint_WithInOut_Builtins) { - // fn frag_main([[position(0)]] coord : vec4) -> [[frag_depth]] f32 { + // fn frag_main(@position(0) coord : vec4) -> @frag_depth f32 { // return coord.x; // } auto* coord_in = @@ -163,9 +163,9 @@ fragment tint_symbol frag_main(float4 coord [[position]]) { TEST_F(MslGeneratorImplTest, Emit_Decoration_EntryPoint_SharedStruct_DifferentStages) { // struct Interface { - // [[location(1)]] col1 : f32; - // [[location(2)]] col2 : f32; - // [[builtin(position)]] pos : vec4; + // @location(1) col1 : f32; + // @location(2) col2 : f32; + // @builtin(position) pos : vec4; // }; // fn vert_main() -> Interface { // return Interface(0.4, 0.6, vec4()); @@ -248,7 +248,7 @@ fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[s TEST_F(MslGeneratorImplTest, Emit_Decoration_EntryPoint_SharedStruct_HelperFunction) { // struct VertexOutput { - // [[builtin(position)]] pos : vec4; + // @builtin(position) pos : vec4; // }; // fn foo(x : f32) -> VertexOutput { // return VertexOutput(vec4(x, x, x, 1.0)); @@ -643,14 +643,14 @@ TEST_F(MslGeneratorImplTest, // [[block]] struct Data { // d : f32; // }; - // [[binding(0), group(0)]] var data : Data; + // @binding(0) @group(0) var data : Data; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn a() { // return; // } // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn b() { // return; // } diff --git a/src/writer/spirv/builder_entry_point_test.cc b/src/writer/spirv/builder_entry_point_test.cc index 57d4eae470..46d6745a48 100644 --- a/src/writer/spirv/builder_entry_point_test.cc +++ b/src/writer/spirv/builder_entry_point_test.cc @@ -37,9 +37,9 @@ namespace { using BuilderTest = TestHelper; TEST_F(BuilderTest, EntryPoint_Parameters) { - // [[stage(fragment)]] - // fn frag_main([[builtin(position)]] coord : vec4, - // [[location(1)]] loc1 : f32) { + // @stage(fragment) + // fn frag_main(@builtin(position) coord : vec4, + // @location(1) loc1 : f32) { // var col : f32 = (coord.x * loc1); // } auto* coord = @@ -106,8 +106,8 @@ OpFunctionEnd } TEST_F(BuilderTest, EntryPoint_ReturnValue) { - // [[stage(fragment)]] - // fn frag_main([[location(0)]] loc_in : u32) -> [[location(0)]] f32 { + // @stage(fragment) + // fn frag_main(@location(0) loc_in : u32) -> @location(0) f32 { // if (loc_in > 10) { // return 0.5; // } @@ -183,17 +183,17 @@ OpFunctionEnd TEST_F(BuilderTest, EntryPoint_SharedStruct) { // struct Interface { - // [[location(1)]] value : f32; - // [[builtin(position)]] pos : vec4; + // @location(1) value : f32; + // @builtin(position) pos : vec4; // }; // - // [[stage(vertex)]] + // @stage(vertex) // fn vert_main() -> Interface { // return Interface(42.0, vec4()); // } // - // [[stage(fragment)]] - // fn frag_main(inputs : Interface) -> [[builtin(frag_depth)]] f32 { + // @stage(fragment) + // fn frag_main(inputs : Interface) -> @builtin(frag_depth) f32 { // return inputs.value; // } diff --git a/src/writer/spirv/builder_function_test.cc b/src/writer/spirv/builder_function_test.cc index 8a9ff940ec..b86bb4bcd8 100644 --- a/src/writer/spirv/builder_function_test.cc +++ b/src/writer/spirv/builder_function_test.cc @@ -189,14 +189,14 @@ TEST_F(BuilderTest, Emit_Multiple_EntryPoint_With_Same_ModuleVar) { // [[block]] struct Data { // d : f32; // }; - // [[binding(0), group(0)]] var data : Data; + // @binding(0) @group(0) var data : Data; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn a() { // return; // } // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn b() { // return; // } diff --git a/src/writer/spirv/builder_intrinsic_test.cc b/src/writer/spirv/builder_intrinsic_test.cc index e5da1153bb..114885b06a 100644 --- a/src/writer/spirv/builder_intrinsic_test.cc +++ b/src/writer/spirv/builder_intrinsic_test.cc @@ -1846,9 +1846,9 @@ OpReturn TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) { // [[block]] struct my_struct { - // a : [[stride(4)]] array; + // a : @stride(4) array; // }; - // [[binding(1), group(2)]] var b : my_struct; + // @binding(1) @group(2) var b : my_struct; // // fn a_func() { // let p = &*&b; @@ -1913,7 +1913,7 @@ TEST_F(IntrinsicBuilderTest, Call_AtomicLoad) { // i : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // let u : u32 = atomicLoad(&b.u); @@ -1979,7 +1979,7 @@ TEST_F(IntrinsicBuilderTest, Call_AtomicStore) { // i : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // var u = 1u; @@ -2059,7 +2059,7 @@ TEST_P(Intrinsic_Builtin_AtomicRMW_i32, Test) { // v : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // var v = 10; @@ -2137,7 +2137,7 @@ TEST_P(Intrinsic_Builtin_AtomicRMW_u32, Test) { // v : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // var v = 10u; @@ -2213,7 +2213,7 @@ TEST_F(IntrinsicBuilderTest, Call_AtomicExchange) { // i : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // var u = 10u; @@ -2295,7 +2295,7 @@ TEST_F(IntrinsicBuilderTest, Call_AtomicCompareExchangeWeak) { // i : atomic; // } // - // [[binding(1), group(2)]] var b : S; + // @binding(1) @group(2) var b : S; // // fn a_func() { // let u : vec2 = atomicCompareExchangeWeak(&b.u, 10u); diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc index 1295c76620..13fd5618d8 100644 --- a/src/writer/wgsl/generator_impl.cc +++ b/src/writer/wgsl/generator_impl.cc @@ -369,7 +369,7 @@ bool GeneratorImpl::EmitType(std::ostream& out, const ast::Type* ty) { if (auto* ary = ty->As()) { for (auto* deco : ary->decorations) { if (auto* stride = deco->As()) { - out << "[[stride(" << stride->stride << ")]] "; + out << "@stride(" << stride->stride << ") "; } } @@ -526,7 +526,7 @@ bool GeneratorImpl::EmitStructType(const ast::Struct* str) { line() << "struct " << program_->Symbols().NameFor(str->name) << " {"; auto add_padding = [&](uint32_t size) { - line() << "[[size(" << size << ")]]"; + line() << "@size(" << size << ")"; // Note: u32 is the smallest primitive we currently support. When WGSL // supports smaller types, this will need to be updated. @@ -536,7 +536,7 @@ bool GeneratorImpl::EmitStructType(const ast::Struct* str) { increment_indent(); uint32_t offset = 0; for (auto* mem : str->members) { - // TODO(crbug.com/tint/798) move the [[offset]] decoration handling to the + // TODO(crbug.com/tint/798) move the @offset decoration handling to the // transform::Wgsl sanitizer. if (auto* mem_sem = program_->Sem().Get(mem)) { offset = utils::RoundUp(mem_sem->Align(), offset); @@ -625,14 +625,13 @@ bool GeneratorImpl::EmitVariable(std::ostream& out, const ast::Variable* var) { bool GeneratorImpl::EmitDecorations(std::ostream& out, const ast::DecorationList& decos) { - out << "[["; bool first = true; for (auto* deco : decos) { if (!first) { - out << ", "; + out << " "; } first = false; - + out << "@"; if (auto* workgroup = deco->As()) { auto values = workgroup->Values(); out << "workgroup_size("; @@ -686,7 +685,6 @@ bool GeneratorImpl::EmitDecorations(std::ostream& out, return false; } } - out << "]]"; return true; } diff --git a/src/writer/wgsl/generator_impl_function_test.cc b/src/writer/wgsl/generator_impl_function_test.cc index 3aebf94b86..d8843db05c 100644 --- a/src/writer/wgsl/generator_impl_function_test.cc +++ b/src/writer/wgsl/generator_impl_function_test.cc @@ -76,7 +76,7 @@ TEST_F(WgslGeneratorImplTest, Emit_Function_WithDecoration_WorkgroupSize) { gen.increment_indent(); ASSERT_TRUE(gen.EmitFunction(func)); - EXPECT_EQ(gen.result(), R"( [[stage(compute), workgroup_size(2, 4, 6)]] + EXPECT_EQ(gen.result(), R"( @stage(compute) @workgroup_size(2, 4, 6) fn my_func() { return; } @@ -98,7 +98,7 @@ TEST_F(WgslGeneratorImplTest, gen.increment_indent(); ASSERT_TRUE(gen.EmitFunction(func)); - EXPECT_EQ(gen.result(), R"( [[stage(compute), workgroup_size(2, height)]] + EXPECT_EQ(gen.result(), R"( @stage(compute) @workgroup_size(2, height) fn my_func() { return; } @@ -120,8 +120,8 @@ TEST_F(WgslGeneratorImplTest, Emit_Function_EntryPoint_Parameters) { gen.increment_indent(); ASSERT_TRUE(gen.EmitFunction(func)); - EXPECT_EQ(gen.result(), R"( [[stage(fragment)]] - fn frag_main([[builtin(position)]] coord : vec4, [[location(1)]] loc1 : f32) { + EXPECT_EQ(gen.result(), R"( @stage(fragment) + fn frag_main(@builtin(position) coord : vec4, @location(1) loc1 : f32) { } )"); } @@ -143,8 +143,8 @@ TEST_F(WgslGeneratorImplTest, Emit_Function_EntryPoint_ReturnValue) { gen.increment_indent(); ASSERT_TRUE(gen.EmitFunction(func)); - EXPECT_EQ(gen.result(), R"( [[stage(fragment)]] - fn frag_main() -> [[location(1)]] f32 { + EXPECT_EQ(gen.result(), R"( @stage(fragment) + fn frag_main() -> @location(1) f32 { return 1.0; } )"); @@ -156,14 +156,14 @@ TEST_F(WgslGeneratorImplTest, // [[block]] struct Data { // d : f32; // }; - // [[binding(0), group(0)]] var data : Data; + // @binding(0) @group(0) var data : Data; // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn a() { // return; // } // - // [[stage(compute), workgroup_size(1)]] + // @stage(compute) @workgroup_size(1) // fn b() { // return; // } @@ -210,20 +210,20 @@ TEST_F(WgslGeneratorImplTest, GeneratorImpl& gen = Build(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), R"([[block]] + EXPECT_EQ(gen.result(), R"(@block struct Data { d : f32; } -[[binding(0), group(0)]] var data : Data; +@binding(0) @group(0) var data : Data; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn a() { var v : f32 = data.d; return; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn b() { var v : f32 = data.d; return; diff --git a/src/writer/wgsl/generator_impl_global_decl_test.cc b/src/writer/wgsl/generator_impl_global_decl_test.cc index e22a75e675..36645343ed 100644 --- a/src/writer/wgsl/generator_impl_global_decl_test.cc +++ b/src/writer/wgsl/generator_impl_global_decl_test.cc @@ -35,7 +35,7 @@ TEST_F(WgslGeneratorImplTest, Emit_GlobalDeclAfterFunction) { gen.increment_indent(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), R"( [[stage(compute), workgroup_size(1, 1, 1)]] + EXPECT_EQ(gen.result(), R"( @stage(compute) @workgroup_size(1, 1, 1) fn test_function() { var a : f32; } @@ -91,7 +91,7 @@ TEST_F(WgslGeneratorImplTest, Emit_GlobalsInterleaved) { a : i32; } - [[stage(compute), workgroup_size(1)]] + @stage(compute) @workgroup_size(1) fn main() { var s0 : S0; var s1 : S1; @@ -112,7 +112,7 @@ TEST_F(WgslGeneratorImplTest, Emit_Global_Sampler) { gen.increment_indent(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), " [[group(0), binding(0)]] var s : sampler;\n"); + EXPECT_EQ(gen.result(), " @group(0) @binding(0) var s : sampler;\n"); } TEST_F(WgslGeneratorImplTest, Emit_Global_Texture) { @@ -128,8 +128,7 @@ TEST_F(WgslGeneratorImplTest, Emit_Global_Texture) { gen.increment_indent(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), - " [[group(0), binding(0)]] var t : texture_1d;\n"); + EXPECT_EQ(gen.result(), " @group(0) @binding(0) var t : texture_1d;\n"); } TEST_F(WgslGeneratorImplTest, Emit_OverridableConstants) { @@ -141,9 +140,9 @@ TEST_F(WgslGeneratorImplTest, Emit_OverridableConstants) { gen.increment_indent(); ASSERT_TRUE(gen.Generate()) << gen.error(); - EXPECT_EQ(gen.result(), R"( [[override]] let a : f32; + EXPECT_EQ(gen.result(), R"( @override let a : f32; - [[override(7)]] let b : f32; + @override(7) let b : f32; )"); } diff --git a/src/writer/wgsl/generator_impl_type_test.cc b/src/writer/wgsl/generator_impl_type_test.cc index dd1355e154..22dfc4b67f 100644 --- a/src/writer/wgsl/generator_impl_type_test.cc +++ b/src/writer/wgsl/generator_impl_type_test.cc @@ -56,7 +56,7 @@ TEST_F(WgslGeneratorImplTest, EmitType_Array_Decoration) { std::stringstream out; ASSERT_TRUE(gen.EmitType(out, a)) << gen.error(); - EXPECT_EQ(out.str(), "[[stride(16)]] array"); + EXPECT_EQ(out.str(), "@stride(16) array"); } TEST_F(WgslGeneratorImplTest, EmitType_RuntimeArray) { @@ -162,10 +162,10 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructOffsetDecl) { ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); EXPECT_EQ(gen.result(), R"(struct S { - [[size(8)]] + @size(8) padding : u32; a : i32; - [[size(4)]] + @size(4) padding_1 : u32; b : f32; } @@ -183,10 +183,10 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructOffsetDecl_WithSymbolCollisions) { ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); EXPECT_EQ(gen.result(), R"(struct S { - [[size(8)]] + @size(8) padding : u32; tint_0_padding : i32; - [[size(4)]] + @size(4) padding_1 : u32; tint_2_padding : f32; } @@ -203,9 +203,9 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructAlignDecl) { ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); EXPECT_EQ(gen.result(), R"(struct S { - [[align(8)]] + @align(8) a : i32; - [[align(16)]] + @align(16) b : f32; } )"); @@ -221,9 +221,9 @@ TEST_F(WgslGeneratorImplTest, EmitType_StructSizeDecl) { ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); EXPECT_EQ(gen.result(), R"(struct S { - [[size(16)]] + @size(16) a : i32; - [[size(32)]] + @size(32) b : f32; } )"); @@ -240,10 +240,10 @@ TEST_F(WgslGeneratorImplTest, EmitType_Struct_WithDecoration) { GeneratorImpl& gen = Build(); ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); - EXPECT_EQ(gen.result(), R"([[block]] + EXPECT_EQ(gen.result(), R"(@block struct S { a : i32; - [[align(8)]] + @align(8) b : f32; } )"); @@ -263,11 +263,11 @@ TEST_F(WgslGeneratorImplTest, EmitType_Struct_WithEntryPointDecorations) { GeneratorImpl& gen = Build(); ASSERT_TRUE(gen.EmitStructType(s)) << gen.error(); - EXPECT_EQ(gen.result(), R"([[block]] + EXPECT_EQ(gen.result(), R"(@block struct S { - [[builtin(vertex_index)]] + @builtin(vertex_index) a : u32; - [[location(2)]] + @location(2) b : f32; } )"); diff --git a/src/writer/wgsl/generator_impl_variable_test.cc b/src/writer/wgsl/generator_impl_variable_test.cc index 7e54432b92..6e073fac77 100644 --- a/src/writer/wgsl/generator_impl_variable_test.cc +++ b/src/writer/wgsl/generator_impl_variable_test.cc @@ -57,7 +57,7 @@ TEST_F(WgslGeneratorImplTest, EmitVariable_Access_Read) { std::stringstream out; ASSERT_TRUE(gen.EmitVariable(out, v)) << gen.error(); - EXPECT_EQ(out.str(), R"([[binding(0), group(0)]] var a : S;)"); + EXPECT_EQ(out.str(), R"(@binding(0) @group(0) var a : S;)"); } TEST_F(WgslGeneratorImplTest, EmitVariable_Access_Write) { @@ -74,8 +74,7 @@ TEST_F(WgslGeneratorImplTest, EmitVariable_Access_Write) { std::stringstream out; ASSERT_TRUE(gen.EmitVariable(out, v)) << gen.error(); - EXPECT_EQ(out.str(), - R"([[binding(0), group(0)]] var a : S;)"); + EXPECT_EQ(out.str(), R"(@binding(0) @group(0) var a : S;)"); } TEST_F(WgslGeneratorImplTest, EmitVariable_Access_ReadWrite) { @@ -93,7 +92,7 @@ TEST_F(WgslGeneratorImplTest, EmitVariable_Access_ReadWrite) { std::stringstream out; ASSERT_TRUE(gen.EmitVariable(out, v)) << gen.error(); EXPECT_EQ(out.str(), - R"([[binding(0), group(0)]] var a : S;)"); + R"(@binding(0) @group(0) var a : S;)"); } TEST_F(WgslGeneratorImplTest, EmitVariable_Decorated) { @@ -108,7 +107,7 @@ TEST_F(WgslGeneratorImplTest, EmitVariable_Decorated) { std::stringstream out; ASSERT_TRUE(gen.EmitVariable(out, v)) << gen.error(); - EXPECT_EQ(out.str(), R"([[group(1), binding(2)]] var a : sampler;)"); + EXPECT_EQ(out.str(), R"(@group(1) @binding(2) var a : sampler;)"); } TEST_F(WgslGeneratorImplTest, EmitVariable_Constructor) { diff --git a/test/access/let/matrix.spvasm.expected.wgsl b/test/access/let/matrix.spvasm.expected.wgsl index e779e9fcea..b7b9fcfea5 100644 --- a/test/access/let/matrix.spvasm.expected.wgsl +++ b/test/access/let/matrix.spvasm.expected.wgsl @@ -3,7 +3,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/access/let/matrix.wgsl b/test/access/let/matrix.wgsl index 12af9c2542..b4c77cfb3c 100644 --- a/test/access/let/matrix.wgsl +++ b/test/access/let/matrix.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let m : mat3x3 = mat3x3(vec3(1., 2., 3.), vec3(4., 5., 6.), vec3(7., 8., 9.)); let v : vec3 = m[1]; diff --git a/test/access/let/matrix.wgsl.expected.wgsl b/test/access/let/matrix.wgsl.expected.wgsl index 546b0f3fc3..f5dbdfb808 100644 --- a/test/access/let/matrix.wgsl.expected.wgsl +++ b/test/access/let/matrix.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let m : mat3x3 = mat3x3(vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0)); let v : vec3 = m[1]; diff --git a/test/access/let/vector.spvasm.expected.wgsl b/test/access/let/vector.spvasm.expected.wgsl index b341f302cd..77bc6a2213 100644 --- a/test/access/let/vector.spvasm.expected.wgsl +++ b/test/access/let/vector.spvasm.expected.wgsl @@ -5,7 +5,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/access/let/vector.wgsl b/test/access/let/vector.wgsl index c7689526c4..3589c6b445 100644 --- a/test/access/let/vector.wgsl +++ b/test/access/let/vector.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let v : vec3 = vec3(1., 2., 3.); let scalar : f32 = v.y; diff --git a/test/access/let/vector.wgsl.expected.wgsl b/test/access/let/vector.wgsl.expected.wgsl index b661cf43b7..d7d7a2de0c 100644 --- a/test/access/let/vector.wgsl.expected.wgsl +++ b/test/access/let/vector.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let v : vec3 = vec3(1.0, 2.0, 3.0); let scalar : f32 = v.y; diff --git a/test/access/var/matrix.spvasm.expected.wgsl b/test/access/var/matrix.spvasm.expected.wgsl index 527abf6699..d415abd49d 100644 --- a/test/access/var/matrix.spvasm.expected.wgsl +++ b/test/access/var/matrix.spvasm.expected.wgsl @@ -5,7 +5,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/access/var/matrix.wgsl b/test/access/var/matrix.wgsl index 0bd99dca9a..d511bd42d0 100644 --- a/test/access/var/matrix.wgsl +++ b/test/access/var/matrix.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m : mat3x3; let v : vec3 = m[1]; diff --git a/test/access/var/matrix.wgsl.expected.wgsl b/test/access/var/matrix.wgsl.expected.wgsl index 0bd99dca9a..d511bd42d0 100644 --- a/test/access/var/matrix.wgsl.expected.wgsl +++ b/test/access/var/matrix.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m : mat3x3; let v : vec3 = m[1]; diff --git a/test/access/var/vector.spvasm.expected.wgsl b/test/access/var/vector.spvasm.expected.wgsl index 3a3bfdf604..310560a960 100644 --- a/test/access/var/vector.spvasm.expected.wgsl +++ b/test/access/var/vector.spvasm.expected.wgsl @@ -8,7 +8,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/access/var/vector.wgsl b/test/access/var/vector.wgsl index 8197419fc0..078f82e453 100644 --- a/test/access/var/vector.wgsl +++ b/test/access/var/vector.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : vec3; let scalar : f32 = v.y; diff --git a/test/access/var/vector.wgsl.expected.wgsl b/test/access/var/vector.wgsl.expected.wgsl index 8197419fc0..078f82e453 100644 --- a/test/access/var/vector.wgsl.expected.wgsl +++ b/test/access/var/vector.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : vec3; let scalar : f32 = v.y; diff --git a/test/array/assign_to_function_var.wgsl b/test/array/assign_to_function_var.wgsl index aeb1ab95d5..d5ccaa26f2 100644 --- a/test/array/assign_to_function_var.wgsl +++ b/test/array/assign_to_function_var.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -6,8 +6,8 @@ struct S { var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(0) var src_uniform : S; +@group(0) @binding(1) var src_storage : S; fn ret_arr() -> ArrayType { return ArrayType(); diff --git a/test/array/assign_to_function_var.wgsl.expected.wgsl b/test/array/assign_to_function_var.wgsl.expected.wgsl index 3951d8534b..0033bea13d 100644 --- a/test/array/assign_to_function_var.wgsl.expected.wgsl +++ b/test/array/assign_to_function_var.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -8,9 +8,9 @@ var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; +@group(0) @binding(0) var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(1) var src_storage : S; fn ret_arr() -> ArrayType { return ArrayType(); diff --git a/test/array/assign_to_private_var.wgsl b/test/array/assign_to_private_var.wgsl index b8b342c20f..510da193e7 100644 --- a/test/array/assign_to_private_var.wgsl +++ b/test/array/assign_to_private_var.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -6,8 +6,8 @@ struct S { var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(0) var src_uniform : S; +@group(0) @binding(1) var src_storage : S; var dst : ArrayType; var dst_nested : array, 3>, 4>; diff --git a/test/array/assign_to_private_var.wgsl.expected.wgsl b/test/array/assign_to_private_var.wgsl.expected.wgsl index 56f7ba5473..fd2057beee 100644 --- a/test/array/assign_to_private_var.wgsl.expected.wgsl +++ b/test/array/assign_to_private_var.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -8,9 +8,9 @@ var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; +@group(0) @binding(0) var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(1) var src_storage : S; var dst : ArrayType; diff --git a/test/array/assign_to_storage_var.wgsl b/test/array/assign_to_storage_var.wgsl index 9bc068ac5f..6d001d8dc8 100644 --- a/test/array/assign_to_storage_var.wgsl +++ b/test/array/assign_to_storage_var.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -10,11 +10,11 @@ struct S_nested { var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(0) var src_uniform : S; +@group(0) @binding(1) var src_storage : S; -[[group(0), binding(2)]] var dst : S; -[[group(0), binding(3)]] var dst_nested : S_nested; +@group(0) @binding(2) var dst : S; +@group(0) @binding(3) var dst_nested : S_nested; fn ret_arr() -> ArrayType { return ArrayType(); diff --git a/test/array/assign_to_storage_var.wgsl.expected.wgsl b/test/array/assign_to_storage_var.wgsl.expected.wgsl index dce03ab62d..88902fadba 100644 --- a/test/array/assign_to_storage_var.wgsl.expected.wgsl +++ b/test/array/assign_to_storage_var.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -12,13 +12,13 @@ var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; +@group(0) @binding(0) var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(1) var src_storage : S; -[[group(0), binding(2)]] var dst : S; +@group(0) @binding(2) var dst : S; -[[group(0), binding(3)]] var dst_nested : S_nested; +@group(0) @binding(3) var dst_nested : S_nested; fn ret_arr() -> ArrayType { return ArrayType(); diff --git a/test/array/assign_to_workgroup_var.wgsl b/test/array/assign_to_workgroup_var.wgsl index 225f2f2911..9fb94eb9dd 100644 --- a/test/array/assign_to_workgroup_var.wgsl +++ b/test/array/assign_to_workgroup_var.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -6,8 +6,8 @@ struct S { var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(0) var src_uniform : S; +@group(0) @binding(1) var src_storage : S; var dst : ArrayType; var dst_nested : array, 3>, 4>; diff --git a/test/array/assign_to_workgroup_var.wgsl.expected.wgsl b/test/array/assign_to_workgroup_var.wgsl.expected.wgsl index a5a27e359d..4fecbc8115 100644 --- a/test/array/assign_to_workgroup_var.wgsl.expected.wgsl +++ b/test/array/assign_to_workgroup_var.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -type ArrayType = [[stride(16)]] array; +type ArrayType = @stride(16) array; struct S { arr : ArrayType; @@ -8,9 +8,9 @@ var src_private : ArrayType; var src_workgroup : ArrayType; -[[group(0), binding(0)]] var src_uniform : S; +@group(0) @binding(0) var src_uniform : S; -[[group(0), binding(1)]] var src_storage : S; +@group(0) @binding(1) var src_storage : S; var dst : ArrayType; diff --git a/test/array/function_parameter.wgsl b/test/array/function_parameter.wgsl index e50418bddc..23de855764 100644 --- a/test/array/function_parameter.wgsl +++ b/test/array/function_parameter.wgsl @@ -10,7 +10,7 @@ fn f3(a : array, 3>, 2>) -> f32 { return a[1][2][3]; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a1 : array = array(); let a2 : array, 3> = array, 3>(); diff --git a/test/array/function_parameter.wgsl.expected.wgsl b/test/array/function_parameter.wgsl.expected.wgsl index e50418bddc..23de855764 100644 --- a/test/array/function_parameter.wgsl.expected.wgsl +++ b/test/array/function_parameter.wgsl.expected.wgsl @@ -10,7 +10,7 @@ fn f3(a : array, 3>, 2>) -> f32 { return a[1][2][3]; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a1 : array = array(); let a2 : array, 3> = array, 3>(); diff --git a/test/array/function_return_type.wgsl b/test/array/function_return_type.wgsl index 407302f5fb..749124546a 100644 --- a/test/array/function_return_type.wgsl +++ b/test/array/function_return_type.wgsl @@ -10,7 +10,7 @@ fn f3() -> array, 3>, 2> { return array, 3>, 2>(f2(), f2()); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a1 : array = f1(); let a2 : array, 3> = f2(); diff --git a/test/array/function_return_type.wgsl.expected.wgsl b/test/array/function_return_type.wgsl.expected.wgsl index 407302f5fb..749124546a 100644 --- a/test/array/function_return_type.wgsl.expected.wgsl +++ b/test/array/function_return_type.wgsl.expected.wgsl @@ -10,7 +10,7 @@ fn f3() -> array, 3>, 2> { return array, 3>, 2>(f2(), f2()); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a1 : array = f1(); let a2 : array, 3> = f2(); diff --git a/test/array/size.wgsl b/test/array/size.wgsl index c5ebee4531..60721dbf6e 100644 --- a/test/array/size.wgsl +++ b/test/array/size.wgsl @@ -1,7 +1,7 @@ let slen = 4; let ulen = 4u; -[[stage(fragment)]] +@stage(fragment) fn main() { var signed_literal : array; var unsigned_literal : array; diff --git a/test/array/size.wgsl.expected.wgsl b/test/array/size.wgsl.expected.wgsl index f0df1f00b6..0998407a21 100644 --- a/test/array/size.wgsl.expected.wgsl +++ b/test/array/size.wgsl.expected.wgsl @@ -2,7 +2,7 @@ let slen = 4; let ulen = 4u; -[[stage(fragment)]] +@stage(fragment) fn main() { var signed_literal : array; var unsigned_literal : array; diff --git a/test/array/type_constructor.wgsl b/test/array/type_constructor.wgsl index 2870b12e39..8a07f39a83 100644 --- a/test/array/type_constructor.wgsl +++ b/test/array/type_constructor.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x : i32 = 42; diff --git a/test/array/type_constructor.wgsl.expected.wgsl b/test/array/type_constructor.wgsl.expected.wgsl index 39eaafdede..4381ec8741 100644 --- a/test/array/type_constructor.wgsl.expected.wgsl +++ b/test/array/type_constructor.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x : i32 = 42; let empty : array = array(); diff --git a/test/benchmark/particles.wgsl b/test/benchmark/particles.wgsl index 4734a371ec..10bfb00cbf 100644 --- a/test/benchmark/particles.wgsl +++ b/test/benchmark/particles.wgsl @@ -17,21 +17,21 @@ struct RenderParams { right : vec3; up : vec3; }; -[[binding(0), group(0)]] var render_params : RenderParams; +@binding(0) @group(0) var render_params : RenderParams; struct VertexInput { - [[location(0)]] position : vec3; - [[location(1)]] color : vec4; - [[location(2)]] quad_pos : vec2; // -1..+1 + @location(0) position : vec3; + @location(1) color : vec4; + @location(2) quad_pos : vec2; // -1..+1 }; struct VertexOutput { - [[builtin(position)]] position : vec4; - [[location(0)]] color : vec4; - [[location(1)]] quad_pos : vec2; // -1..+1 + @builtin(position) position : vec4; + @location(0) color : vec4; + @location(1) quad_pos : vec2; // -1..+1 }; -[[stage(vertex)]] +@stage(vertex) fn vs_main(in : VertexInput) -> VertexOutput { var quad_pos = mat2x3(render_params.right, render_params.up) * in.quad_pos; var position = in.position + quad_pos * 0.01; @@ -45,8 +45,8 @@ fn vs_main(in : VertexInput) -> VertexOutput { //////////////////////////////////////////////////////////////////////////////// // Fragment shader //////////////////////////////////////////////////////////////////////////////// -[[stage(fragment)]] -fn fs_main(in : VertexOutput) -> [[location(0)]] vec4 { +@stage(fragment) +fn fs_main(in : VertexOutput) -> @location(0) vec4 { var color = in.color; // Apply a circular particle alpha mask color.a = color.a * max(1.0 - length(in.quad_pos), 0.0); @@ -72,12 +72,12 @@ struct Particles { particles : array; }; -[[binding(0), group(0)]] var sim_params : SimulationParams; -[[binding(1), group(0)]] var data : Particles; -[[binding(2), group(0)]] var texture : texture_2d; +@binding(0) @group(0) var sim_params : SimulationParams; +@binding(1) @group(0) var data : Particles; +@binding(2) @group(0) var texture : texture_2d; -[[stage(compute), workgroup_size(64)]] -fn simulate([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(64) +fn simulate(@builtin(global_invocation_id) GlobalInvocationID : vec3) { rand_seed = (sim_params.seed.xy + vec2(GlobalInvocationID.xy)) * sim_params.seed.zw; let idx = GlobalInvocationID.x; @@ -136,11 +136,11 @@ struct Buffer { weights : array; }; -[[binding(3), group(0)]] var ubo : UBO; -[[binding(4), group(0)]] var buf_in : Buffer; -[[binding(5), group(0)]] var buf_out : Buffer; -[[binding(6), group(0)]] var tex_in : texture_2d; -[[binding(7), group(0)]] var tex_out : texture_storage_2d; +@binding(3) @group(0) var ubo : UBO; +@binding(4) @group(0) var buf_in : Buffer; +@binding(5) @group(0) var buf_out : Buffer; +@binding(6) @group(0) var tex_in : texture_2d; +@binding(7) @group(0) var tex_out : texture_storage_2d; //////////////////////////////////////////////////////////////////////////////// // import_level @@ -148,8 +148,8 @@ struct Buffer { // Loads the alpha channel from a texel of the source image, and writes it to // the buf_out.weights. //////////////////////////////////////////////////////////////////////////////// -[[stage(compute), workgroup_size(64)]] -fn import_level([[builtin(global_invocation_id)]] coord : vec3) { +@stage(compute) @workgroup_size(64) +fn import_level(@builtin(global_invocation_id) coord : vec3) { _ = &buf_in; let offset = coord.x + coord.y * ubo.width; buf_out.weights[offset] = textureLoad(tex_in, vec2(coord.xy), 0).w; @@ -163,8 +163,8 @@ fn import_level([[builtin(global_invocation_id)]] coord : vec3) { // mip level of tex_out. See simulate() in particle.wgsl to understand the // probability logic. //////////////////////////////////////////////////////////////////////////////// -[[stage(compute), workgroup_size(64)]] -fn export_level([[builtin(global_invocation_id)]] coord : vec3) { +@stage(compute) @workgroup_size(64) +fn export_level(@builtin(global_invocation_id) coord : vec3) { if (all(coord.xy < vec2(textureDimensions(tex_out)))) { let dst_offset = coord.x + coord.y * ubo.width; let src_offset = coord.x*2u + coord.y*2u * ubo.width; diff --git a/test/benchmark/particles.wgsl.expected.wgsl b/test/benchmark/particles.wgsl.expected.wgsl index 0ab3f503da..ad07dc5735 100644 --- a/test/benchmark/particles.wgsl.expected.wgsl +++ b/test/benchmark/particles.wgsl.expected.wgsl @@ -12,27 +12,27 @@ struct RenderParams { up : vec3; } -[[binding(0), group(0)]] var render_params : RenderParams; +@binding(0) @group(0) var render_params : RenderParams; struct VertexInput { - [[location(0)]] + @location(0) position : vec3; - [[location(1)]] + @location(1) color : vec4; - [[location(2)]] + @location(2) quad_pos : vec2; } struct VertexOutput { - [[builtin(position)]] + @builtin(position) position : vec4; - [[location(0)]] + @location(0) color : vec4; - [[location(1)]] + @location(1) quad_pos : vec2; } -[[stage(vertex)]] +@stage(vertex) fn vs_main(in : VertexInput) -> VertexOutput { var quad_pos = (mat2x3(render_params.right, render_params.up) * in.quad_pos); var position = (in.position + (quad_pos * 0.01)); @@ -43,8 +43,8 @@ fn vs_main(in : VertexInput) -> VertexOutput { return out; } -[[stage(fragment)]] -fn fs_main(in : VertexOutput) -> [[location(0)]] vec4 { +@stage(fragment) +fn fs_main(in : VertexOutput) -> @location(0) vec4 { var color = in.color; color.a = (color.a * max((1.0 - length(in.quad_pos)), 0.0)); return color; @@ -66,14 +66,14 @@ struct Particles { particles : array; } -[[binding(0), group(0)]] var sim_params : SimulationParams; +@binding(0) @group(0) var sim_params : SimulationParams; -[[binding(1), group(0)]] var data : Particles; +@binding(1) @group(0) var data : Particles; -[[binding(2), group(0)]] var texture : texture_2d; +@binding(2) @group(0) var texture : texture_2d; -[[stage(compute), workgroup_size(64)]] -fn simulate([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(64) +fn simulate(@builtin(global_invocation_id) GlobalInvocationID : vec3) { rand_seed = ((sim_params.seed.xy + vec2(GlobalInvocationID.xy)) * sim_params.seed.zw); let idx = GlobalInvocationID.x; var particle = data.particles[idx]; @@ -110,25 +110,25 @@ struct Buffer { weights : array; } -[[binding(3), group(0)]] var ubo : UBO; +@binding(3) @group(0) var ubo : UBO; -[[binding(4), group(0)]] var buf_in : Buffer; +@binding(4) @group(0) var buf_in : Buffer; -[[binding(5), group(0)]] var buf_out : Buffer; +@binding(5) @group(0) var buf_out : Buffer; -[[binding(6), group(0)]] var tex_in : texture_2d; +@binding(6) @group(0) var tex_in : texture_2d; -[[binding(7), group(0)]] var tex_out : texture_storage_2d; +@binding(7) @group(0) var tex_out : texture_storage_2d; -[[stage(compute), workgroup_size(64)]] -fn import_level([[builtin(global_invocation_id)]] coord : vec3) { +@stage(compute) @workgroup_size(64) +fn import_level(@builtin(global_invocation_id) coord : vec3) { _ = &(buf_in); let offset = (coord.x + (coord.y * ubo.width)); buf_out.weights[offset] = textureLoad(tex_in, vec2(coord.xy), 0).w; } -[[stage(compute), workgroup_size(64)]] -fn export_level([[builtin(global_invocation_id)]] coord : vec3) { +@stage(compute) @workgroup_size(64) +fn export_level(@builtin(global_invocation_id) coord : vec3) { if (all((coord.xy < vec2(textureDimensions(tex_out))))) { let dst_offset = (coord.x + (coord.y * ubo.width)); let src_offset = ((coord.x * 2u) + ((coord.y * 2u) * ubo.width)); diff --git a/test/benchmark/simple_compute.wgsl b/test/benchmark/simple_compute.wgsl index f5b883ad71..605bfee803 100644 --- a/test/benchmark/simple_compute.wgsl +++ b/test/benchmark/simple_compute.wgsl @@ -2,9 +2,9 @@ struct SB { data : array; }; -[[group(0), binding(0)]] var buffer : SB; +@group(0) @binding(0) var buffer : SB; -[[stage(compute), workgroup_size(1, 2, 3)]] -fn main([[builtin(global_invocation_id)]] id : vec3) { +@stage(compute) @workgroup_size(1, 2, 3) +fn main(@builtin(global_invocation_id) id : vec3) { buffer.data[id.x] = buffer.data[id.x] + 1; } diff --git a/test/benchmark/simple_compute.wgsl.expected.wgsl b/test/benchmark/simple_compute.wgsl.expected.wgsl index a83b28f9cc..458c08c436 100644 --- a/test/benchmark/simple_compute.wgsl.expected.wgsl +++ b/test/benchmark/simple_compute.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct SB { data : array; } -[[group(0), binding(0)]] var buffer : SB; +@group(0) @binding(0) var buffer : SB; -[[stage(compute), workgroup_size(1, 2, 3)]] -fn main([[builtin(global_invocation_id)]] id : vec3) { +@stage(compute) @workgroup_size(1, 2, 3) +fn main(@builtin(global_invocation_id) id : vec3) { buffer.data[id.x] = (buffer.data[id.x] + 1); } diff --git a/test/benchmark/simple_fragment.wgsl b/test/benchmark/simple_fragment.wgsl index bb5ed9490a..3fe67bfdae 100644 --- a/test/benchmark/simple_fragment.wgsl +++ b/test/benchmark/simple_fragment.wgsl @@ -1,12 +1,12 @@ struct Input { - [[location(0)]] color: vec4; + @location(0) color: vec4; }; struct Output { - [[location(0)]] color: vec4; + @location(0) color: vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main(in : Input) -> Output { return Output(in.color); } diff --git a/test/benchmark/simple_fragment.wgsl.expected.wgsl b/test/benchmark/simple_fragment.wgsl.expected.wgsl index 7236de2885..19b9e9985a 100644 --- a/test/benchmark/simple_fragment.wgsl.expected.wgsl +++ b/test/benchmark/simple_fragment.wgsl.expected.wgsl @@ -1,14 +1,14 @@ struct Input { - [[location(0)]] + @location(0) color : vec4; } struct Output { - [[location(0)]] + @location(0) color : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main(in : Input) -> Output { return Output(in.color); } diff --git a/test/benchmark/simple_vertex.wgsl b/test/benchmark/simple_vertex.wgsl index 8f9a07b1dc..fb13fe28b2 100644 --- a/test/benchmark/simple_vertex.wgsl +++ b/test/benchmark/simple_vertex.wgsl @@ -1,12 +1,12 @@ struct Input { - [[location(0)]] position: vec4; + @location(0) position: vec4; }; struct Output { - [[builtin(position)]] position : vec4; + @builtin(position) position : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main(in : Input) -> Output { return Output(in.position); } diff --git a/test/benchmark/simple_vertex.wgsl.expected.wgsl b/test/benchmark/simple_vertex.wgsl.expected.wgsl index fdce23ed1c..41368eba97 100644 --- a/test/benchmark/simple_vertex.wgsl.expected.wgsl +++ b/test/benchmark/simple_vertex.wgsl.expected.wgsl @@ -1,14 +1,14 @@ struct Input { - [[location(0)]] + @location(0) position : vec4; } struct Output { - [[builtin(position)]] + @builtin(position) position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main(in : Input) -> Output { return Output(in.position); } diff --git a/test/buffer/storage/dynamic_index/read.wgsl b/test/buffer/storage/dynamic_index/read.wgsl index 633b1be1e3..94c2c1f8ee 100644 --- a/test/buffer/storage/dynamic_index/read.wgsl +++ b/test/buffer/storage/dynamic_index/read.wgsl @@ -7,17 +7,17 @@ struct Inner { f : f32; g : mat2x3; h : mat3x2; - i : [[stride(16)]] array, 4>; + i : @stride(16) array, 4>; }; struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { let a = s.arr[idx].a; let b = s.arr[idx].b; let c = s.arr[idx].c; diff --git a/test/buffer/storage/dynamic_index/read.wgsl.expected.wgsl b/test/buffer/storage/dynamic_index/read.wgsl.expected.wgsl index bd24ab0516..fd0c451cf7 100644 --- a/test/buffer/storage/dynamic_index/read.wgsl.expected.wgsl +++ b/test/buffer/storage/dynamic_index/read.wgsl.expected.wgsl @@ -7,17 +7,17 @@ struct Inner { f : f32; g : mat2x3; h : mat3x2; - i : [[stride(16)]] array, 4>; + i : @stride(16) array, 4>; } struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { let a = s.arr[idx].a; let b = s.arr[idx].b; let c = s.arr[idx].c; diff --git a/test/buffer/storage/dynamic_index/write.wgsl b/test/buffer/storage/dynamic_index/write.wgsl index 836c018f49..3770015432 100644 --- a/test/buffer/storage/dynamic_index/write.wgsl +++ b/test/buffer/storage/dynamic_index/write.wgsl @@ -7,17 +7,17 @@ struct Inner { f : f32; g : mat2x3; h : mat3x2; - i : [[stride(16)]] array, 4>; + i : @stride(16) array, 4>; }; struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { s.arr[idx].a = vec3(); s.arr[idx].b = i32(); s.arr[idx].c = vec3(); @@ -26,5 +26,5 @@ fn main([[builtin(local_invocation_index)]] idx : u32) { s.arr[idx].f = f32(); s.arr[idx].g = mat2x3(); s.arr[idx].h = mat3x2(); - s.arr[idx].i = [[stride(16)]] array, 4>(); + s.arr[idx].i = @stride(16) array, 4>(); } diff --git a/test/buffer/storage/dynamic_index/write.wgsl.expected.wgsl b/test/buffer/storage/dynamic_index/write.wgsl.expected.wgsl index b015519c7a..d51db2197c 100644 --- a/test/buffer/storage/dynamic_index/write.wgsl.expected.wgsl +++ b/test/buffer/storage/dynamic_index/write.wgsl.expected.wgsl @@ -7,17 +7,17 @@ struct Inner { f : f32; g : mat2x3; h : mat3x2; - i : [[stride(16)]] array, 4>; + i : @stride(16) array, 4>; } struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { s.arr[idx].a = vec3(); s.arr[idx].b = i32(); s.arr[idx].c = vec3(); @@ -26,5 +26,5 @@ fn main([[builtin(local_invocation_index)]] idx : u32) { s.arr[idx].f = f32(); s.arr[idx].g = mat2x3(); s.arr[idx].h = mat3x2(); - s.arr[idx].i = [[stride(16)]] array, 4>(); + s.arr[idx].i = @stride(16) array, 4>(); } diff --git a/test/buffer/storage/static_index/read.wgsl b/test/buffer/storage/static_index/read.wgsl index c0824b3594..773fbbb49c 100644 --- a/test/buffer/storage/static_index/read.wgsl +++ b/test/buffer/storage/static_index/read.wgsl @@ -12,12 +12,12 @@ struct S { g : mat2x3; h : mat3x2; i : Inner; - j : [[stride(16)]] array; + j : @stride(16) array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a = s.a; let b = s.b; diff --git a/test/buffer/storage/static_index/read.wgsl.expected.wgsl b/test/buffer/storage/static_index/read.wgsl.expected.wgsl index 56187c5484..3413a96e30 100644 --- a/test/buffer/storage/static_index/read.wgsl.expected.wgsl +++ b/test/buffer/storage/static_index/read.wgsl.expected.wgsl @@ -12,12 +12,12 @@ struct S { g : mat2x3; h : mat3x2; i : Inner; - j : [[stride(16)]] array; + j : @stride(16) array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a = s.a; let b = s.b; diff --git a/test/buffer/storage/static_index/write.wgsl b/test/buffer/storage/static_index/write.wgsl index 7b4affb495..ff18cbc1d1 100644 --- a/test/buffer/storage/static_index/write.wgsl +++ b/test/buffer/storage/static_index/write.wgsl @@ -12,12 +12,12 @@ struct S { g : mat2x3; h : mat3x2; i : Inner; - j : [[stride(16)]] array; + j : @stride(16) array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { s.a = vec3(); s.b = i32(); @@ -28,5 +28,5 @@ fn main() { s.g = mat2x3(); s.h = mat3x2(); s.i = Inner(); - s.j = [[stride(16)]] array(); + s.j = @stride(16) array(); } diff --git a/test/buffer/storage/static_index/write.wgsl.expected.wgsl b/test/buffer/storage/static_index/write.wgsl.expected.wgsl index 46cdde8fd3..595efcecef 100644 --- a/test/buffer/storage/static_index/write.wgsl.expected.wgsl +++ b/test/buffer/storage/static_index/write.wgsl.expected.wgsl @@ -12,12 +12,12 @@ struct S { g : mat2x3; h : mat3x2; i : Inner; - j : [[stride(16)]] array; + j : @stride(16) array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { s.a = vec3(); s.b = i32(); @@ -28,5 +28,5 @@ fn main() { s.g = mat2x3(); s.h = mat3x2(); s.i = Inner(); - s.j = [[stride(16)]] array(); + s.j = @stride(16) array(); } diff --git a/test/buffer/storage/types/array.wgsl b/test/buffer/storage/types/array.wgsl index 6105a26727..ae79369091 100644 --- a/test/buffer/storage/types/array.wgsl +++ b/test/buffer/storage/types/array.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : array; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/array.wgsl.expected.wgsl b/test/buffer/storage/types/array.wgsl.expected.wgsl index 0aaacaedd2..7cfa5a3ed2 100644 --- a/test/buffer/storage/types/array.wgsl.expected.wgsl +++ b/test/buffer/storage/types/array.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : array; +@group(0) @binding(0) var in : array; -[[group(0), binding(1)]] var out : array; +@group(0) @binding(1) var out : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/f32.wgsl b/test/buffer/storage/types/f32.wgsl index d66cdb0cea..d8d60afb26 100644 --- a/test/buffer/storage/types/f32.wgsl +++ b/test/buffer/storage/types/f32.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : f32; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/f32.wgsl.expected.wgsl b/test/buffer/storage/types/f32.wgsl.expected.wgsl index a385a75d5e..fc61aa9c81 100644 --- a/test/buffer/storage/types/f32.wgsl.expected.wgsl +++ b/test/buffer/storage/types/f32.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : f32; +@group(0) @binding(0) var in : f32; -[[group(0), binding(1)]] var out : f32; +@group(0) @binding(1) var out : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/i32.wgsl b/test/buffer/storage/types/i32.wgsl index 2ffd35fe0f..fa63f1dce5 100644 --- a/test/buffer/storage/types/i32.wgsl +++ b/test/buffer/storage/types/i32.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : i32; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/i32.wgsl.expected.wgsl b/test/buffer/storage/types/i32.wgsl.expected.wgsl index 3424f2e6f1..f4b6b78ee3 100644 --- a/test/buffer/storage/types/i32.wgsl.expected.wgsl +++ b/test/buffer/storage/types/i32.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : i32; +@group(0) @binding(0) var in : i32; -[[group(0), binding(1)]] var out : i32; +@group(0) @binding(1) var out : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat2x2.wgsl b/test/buffer/storage/types/mat2x2.wgsl index 60ff548adb..0fece1843d 100644 --- a/test/buffer/storage/types/mat2x2.wgsl +++ b/test/buffer/storage/types/mat2x2.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : mat2x2; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : mat2x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat2x2.wgsl.expected.wgsl b/test/buffer/storage/types/mat2x2.wgsl.expected.wgsl index 8d2cbae323..5d3e65083b 100644 --- a/test/buffer/storage/types/mat2x2.wgsl.expected.wgsl +++ b/test/buffer/storage/types/mat2x2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : mat2x2; +@group(0) @binding(0) var in : mat2x2; -[[group(0), binding(1)]] var out : mat2x2; +@group(0) @binding(1) var out : mat2x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat2x3.wgsl b/test/buffer/storage/types/mat2x3.wgsl index 151db83808..7d64f7ba4c 100644 --- a/test/buffer/storage/types/mat2x3.wgsl +++ b/test/buffer/storage/types/mat2x3.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : mat2x3; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat2x3.wgsl.expected.wgsl b/test/buffer/storage/types/mat2x3.wgsl.expected.wgsl index ab3a5fd966..48eda48043 100644 --- a/test/buffer/storage/types/mat2x3.wgsl.expected.wgsl +++ b/test/buffer/storage/types/mat2x3.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : mat2x3; +@group(0) @binding(0) var in : mat2x3; -[[group(0), binding(1)]] var out : mat2x3; +@group(0) @binding(1) var out : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat3x2.wgsl b/test/buffer/storage/types/mat3x2.wgsl index d77ac81d22..e3f972f456 100644 --- a/test/buffer/storage/types/mat3x2.wgsl +++ b/test/buffer/storage/types/mat3x2.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : mat3x2; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : mat3x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat3x2.wgsl.expected.wgsl b/test/buffer/storage/types/mat3x2.wgsl.expected.wgsl index 4c87f4ac1e..d5db4366c9 100644 --- a/test/buffer/storage/types/mat3x2.wgsl.expected.wgsl +++ b/test/buffer/storage/types/mat3x2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : mat3x2; +@group(0) @binding(0) var in : mat3x2; -[[group(0), binding(1)]] var out : mat3x2; +@group(0) @binding(1) var out : mat3x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat4x4.wgsl b/test/buffer/storage/types/mat4x4.wgsl index bf18a256f9..673d9d3e3f 100644 --- a/test/buffer/storage/types/mat4x4.wgsl +++ b/test/buffer/storage/types/mat4x4.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : mat4x4; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : mat4x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/mat4x4.wgsl.expected.wgsl b/test/buffer/storage/types/mat4x4.wgsl.expected.wgsl index 7c1ebe9e7a..402743f69b 100644 --- a/test/buffer/storage/types/mat4x4.wgsl.expected.wgsl +++ b/test/buffer/storage/types/mat4x4.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : mat4x4; +@group(0) @binding(0) var in : mat4x4; -[[group(0), binding(1)]] var out : mat4x4; +@group(0) @binding(1) var out : mat4x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/runtime_array.wgsl b/test/buffer/storage/types/runtime_array.wgsl index f403fd377d..083ea116e6 100644 --- a/test/buffer/storage/types/runtime_array.wgsl +++ b/test/buffer/storage/types/runtime_array.wgsl @@ -2,13 +2,13 @@ struct S { f : f32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var in : array; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out[0] = in[0]; } diff --git a/test/buffer/storage/types/runtime_array.wgsl.expected.wgsl b/test/buffer/storage/types/runtime_array.wgsl.expected.wgsl index 2aca9cd0df..4b87ea6f12 100644 --- a/test/buffer/storage/types/runtime_array.wgsl.expected.wgsl +++ b/test/buffer/storage/types/runtime_array.wgsl.expected.wgsl @@ -2,11 +2,11 @@ struct S { f : f32; } -[[group(0), binding(0)]] var in : array; +@group(0) @binding(0) var in : array; -[[group(0), binding(1)]] var out : array; +@group(0) @binding(1) var out : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out[0] = in[0]; } diff --git a/test/buffer/storage/types/struct.wgsl b/test/buffer/storage/types/struct.wgsl index 42acfbce5e..993b052427 100644 --- a/test/buffer/storage/types/struct.wgsl +++ b/test/buffer/storage/types/struct.wgsl @@ -5,13 +5,13 @@ struct S { inner : Inner; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var in : S; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/struct.wgsl.expected.wgsl b/test/buffer/storage/types/struct.wgsl.expected.wgsl index dd840d4072..59d3bc9457 100644 --- a/test/buffer/storage/types/struct.wgsl.expected.wgsl +++ b/test/buffer/storage/types/struct.wgsl.expected.wgsl @@ -6,11 +6,11 @@ struct S { inner : Inner; } -[[group(0), binding(0)]] var in : S; +@group(0) @binding(0) var in : S; -[[group(0), binding(1)]] var out : S; +@group(0) @binding(1) var out : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/u32.wgsl b/test/buffer/storage/types/u32.wgsl index 4664d29d6c..0b875101d6 100644 --- a/test/buffer/storage/types/u32.wgsl +++ b/test/buffer/storage/types/u32.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : u32; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/u32.wgsl.expected.wgsl b/test/buffer/storage/types/u32.wgsl.expected.wgsl index 46dc9d383e..2cebf5e9da 100644 --- a/test/buffer/storage/types/u32.wgsl.expected.wgsl +++ b/test/buffer/storage/types/u32.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : u32; +@group(0) @binding(0) var in : u32; -[[group(0), binding(1)]] var out : u32; +@group(0) @binding(1) var out : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec2.wgsl b/test/buffer/storage/types/vec2.wgsl index 9841fd4181..d1466d5d1b 100644 --- a/test/buffer/storage/types/vec2.wgsl +++ b/test/buffer/storage/types/vec2.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : vec2; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : vec2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec2.wgsl.expected.wgsl b/test/buffer/storage/types/vec2.wgsl.expected.wgsl index a945b3228b..806600b8cd 100644 --- a/test/buffer/storage/types/vec2.wgsl.expected.wgsl +++ b/test/buffer/storage/types/vec2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : vec2; +@group(0) @binding(0) var in : vec2; -[[group(0), binding(1)]] var out : vec2; +@group(0) @binding(1) var out : vec2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec3.wgsl b/test/buffer/storage/types/vec3.wgsl index 5335059754..38e25d074d 100644 --- a/test/buffer/storage/types/vec3.wgsl +++ b/test/buffer/storage/types/vec3.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : vec3; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec3.wgsl.expected.wgsl b/test/buffer/storage/types/vec3.wgsl.expected.wgsl index 71377b0d4d..a3fcf3a70f 100644 --- a/test/buffer/storage/types/vec3.wgsl.expected.wgsl +++ b/test/buffer/storage/types/vec3.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : vec3; +@group(0) @binding(0) var in : vec3; -[[group(0), binding(1)]] var out : vec3; +@group(0) @binding(1) var out : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec4.wgsl b/test/buffer/storage/types/vec4.wgsl index 494a89abdc..b9bf279e75 100644 --- a/test/buffer/storage/types/vec4.wgsl +++ b/test/buffer/storage/types/vec4.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var in : vec4; -[[group(0), binding(1)]] +@group(0) @binding(1) var out : vec4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/storage/types/vec4.wgsl.expected.wgsl b/test/buffer/storage/types/vec4.wgsl.expected.wgsl index 7b278bd0fc..22065c76cd 100644 --- a/test/buffer/storage/types/vec4.wgsl.expected.wgsl +++ b/test/buffer/storage/types/vec4.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var in : vec4; +@group(0) @binding(0) var in : vec4; -[[group(0), binding(1)]] var out : vec4; +@group(0) @binding(1) var out : vec4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { out = in; } diff --git a/test/buffer/uniform/dynamic_index/read.wgsl b/test/buffer/uniform/dynamic_index/read.wgsl index 2e79833789..3e9142baa9 100644 --- a/test/buffer/uniform/dynamic_index/read.wgsl +++ b/test/buffer/uniform/dynamic_index/read.wgsl @@ -8,18 +8,18 @@ struct Inner { g : vec2; h : vec2; i : mat2x3; - [[align(16)]] j : mat3x2; - [[align(16)]] k : [[stride(16)]] array, 4>; + @align(16) j : mat3x2; + @align(16) k : @stride(16) array, 4>; }; struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { let a = s.arr[idx].a; let b = s.arr[idx].b; let c = s.arr[idx].c; diff --git a/test/buffer/uniform/dynamic_index/read.wgsl.expected.wgsl b/test/buffer/uniform/dynamic_index/read.wgsl.expected.wgsl index 0dc8fdfdae..1bee6266de 100644 --- a/test/buffer/uniform/dynamic_index/read.wgsl.expected.wgsl +++ b/test/buffer/uniform/dynamic_index/read.wgsl.expected.wgsl @@ -8,20 +8,20 @@ struct Inner { g : vec2; h : vec2; i : mat2x3; - [[align(16)]] + @align(16) j : mat3x2; - [[align(16)]] - k : [[stride(16)]] array, 4>; + @align(16) + k : @stride(16) array, 4>; } struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { let a = s.arr[idx].a; let b = s.arr[idx].b; let c = s.arr[idx].c; diff --git a/test/buffer/uniform/static_index/read.wgsl b/test/buffer/uniform/static_index/read.wgsl index a735ccfecc..e1d10e8f2d 100644 --- a/test/buffer/uniform/static_index/read.wgsl +++ b/test/buffer/uniform/static_index/read.wgsl @@ -13,13 +13,13 @@ struct S { h : vec2; i : mat2x3; j : mat3x2; - [[align(16)]] k : Inner; - [[align(16)]] l : [[stride(16)]] array; + @align(16) k : Inner; + @align(16) l : @stride(16) array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a = s.a; let b = s.b; diff --git a/test/buffer/uniform/static_index/read.wgsl.expected.wgsl b/test/buffer/uniform/static_index/read.wgsl.expected.wgsl index f43ae3bbcb..b790c19d0c 100644 --- a/test/buffer/uniform/static_index/read.wgsl.expected.wgsl +++ b/test/buffer/uniform/static_index/read.wgsl.expected.wgsl @@ -13,15 +13,15 @@ struct S { h : vec2; i : mat2x3; j : mat3x2; - [[align(16)]] + @align(16) k : Inner; - [[align(16)]] - l : [[stride(16)]] array; + @align(16) + l : @stride(16) array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let a = s.a; let b = s.b; diff --git a/test/buffer/uniform/types/array.wgsl b/test/buffer/uniform/types/array.wgsl index 7151b53956..01a7138b51 100644 --- a/test/buffer/uniform/types/array.wgsl +++ b/test/buffer/uniform/types/array.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : array, 4>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/array.wgsl.expected.wgsl b/test/buffer/uniform/types/array.wgsl.expected.wgsl index 3cfa21e32d..43d91c8c5c 100644 --- a/test/buffer/uniform/types/array.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/array.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : array, 4>; +@group(0) @binding(0) var u : array, 4>; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/f32.wgsl b/test/buffer/uniform/types/f32.wgsl index 1f3fbfa74c..bd785bb963 100644 --- a/test/buffer/uniform/types/f32.wgsl +++ b/test/buffer/uniform/types/f32.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/f32.wgsl.expected.wgsl b/test/buffer/uniform/types/f32.wgsl.expected.wgsl index 6bd2751aaf..ef2fa27baa 100644 --- a/test/buffer/uniform/types/f32.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : f32; +@group(0) @binding(0) var u : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/i32.wgsl b/test/buffer/uniform/types/i32.wgsl index ca165b4601..9d6e5d4ce2 100644 --- a/test/buffer/uniform/types/i32.wgsl +++ b/test/buffer/uniform/types/i32.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/i32.wgsl.expected.wgsl b/test/buffer/uniform/types/i32.wgsl.expected.wgsl index 0cf7b04a61..794f018acb 100644 --- a/test/buffer/uniform/types/i32.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : i32; +@group(0) @binding(0) var u : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat2x2.wgsl b/test/buffer/uniform/types/mat2x2.wgsl index d1cc3d3d93..5522accced 100644 --- a/test/buffer/uniform/types/mat2x2.wgsl +++ b/test/buffer/uniform/types/mat2x2.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : mat2x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat2x2.wgsl.expected.wgsl b/test/buffer/uniform/types/mat2x2.wgsl.expected.wgsl index 8c42684b4f..49ce708690 100644 --- a/test/buffer/uniform/types/mat2x2.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/mat2x2.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : mat2x2; +@group(0) @binding(0) var u : mat2x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat2x3.wgsl b/test/buffer/uniform/types/mat2x3.wgsl index 0fb978d61f..5179d281bf 100644 --- a/test/buffer/uniform/types/mat2x3.wgsl +++ b/test/buffer/uniform/types/mat2x3.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat2x3.wgsl.expected.wgsl b/test/buffer/uniform/types/mat2x3.wgsl.expected.wgsl index 5a74e9478a..e7f00733d4 100644 --- a/test/buffer/uniform/types/mat2x3.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/mat2x3.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : mat2x3; +@group(0) @binding(0) var u : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat3x2.wgsl b/test/buffer/uniform/types/mat3x2.wgsl index 59b1b8059c..0a308b4775 100644 --- a/test/buffer/uniform/types/mat3x2.wgsl +++ b/test/buffer/uniform/types/mat3x2.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : mat3x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat3x2.wgsl.expected.wgsl b/test/buffer/uniform/types/mat3x2.wgsl.expected.wgsl index 5f16f764b7..874cf97757 100644 --- a/test/buffer/uniform/types/mat3x2.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/mat3x2.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : mat3x2; +@group(0) @binding(0) var u : mat3x2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat4x4.wgsl b/test/buffer/uniform/types/mat4x4.wgsl index 7d2a57b0b1..a9bf3ca73d 100644 --- a/test/buffer/uniform/types/mat4x4.wgsl +++ b/test/buffer/uniform/types/mat4x4.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : mat4x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/mat4x4.wgsl.expected.wgsl b/test/buffer/uniform/types/mat4x4.wgsl.expected.wgsl index a1188d409b..aa2f714c26 100644 --- a/test/buffer/uniform/types/mat4x4.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/mat4x4.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : mat4x4; +@group(0) @binding(0) var u : mat4x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/struct.wgsl b/test/buffer/uniform/types/struct.wgsl index 135bcab6fd..2c6547cb18 100644 --- a/test/buffer/uniform/types/struct.wgsl +++ b/test/buffer/uniform/types/struct.wgsl @@ -5,10 +5,10 @@ struct S { inner : Inner; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/struct.wgsl.expected.wgsl b/test/buffer/uniform/types/struct.wgsl.expected.wgsl index 0e74bf8418..f5648329a8 100644 --- a/test/buffer/uniform/types/struct.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/struct.wgsl.expected.wgsl @@ -6,9 +6,9 @@ struct S { inner : Inner; } -[[group(0), binding(0)]] var u : S; +@group(0) @binding(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/u32.wgsl b/test/buffer/uniform/types/u32.wgsl index a1c80a397b..3afc920224 100644 --- a/test/buffer/uniform/types/u32.wgsl +++ b/test/buffer/uniform/types/u32.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/u32.wgsl.expected.wgsl b/test/buffer/uniform/types/u32.wgsl.expected.wgsl index 6751a05e52..d5d7e7ff8b 100644 --- a/test/buffer/uniform/types/u32.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : u32; +@group(0) @binding(0) var u : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec2.wgsl b/test/buffer/uniform/types/vec2.wgsl index 8f2debec27..89e888916a 100644 --- a/test/buffer/uniform/types/vec2.wgsl +++ b/test/buffer/uniform/types/vec2.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : vec2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec2.wgsl.expected.wgsl b/test/buffer/uniform/types/vec2.wgsl.expected.wgsl index 61695c1daf..44de55f4ec 100644 --- a/test/buffer/uniform/types/vec2.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/vec2.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : vec2; +@group(0) @binding(0) var u : vec2; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec3.wgsl b/test/buffer/uniform/types/vec3.wgsl index 012d269fa4..e571c47ee3 100644 --- a/test/buffer/uniform/types/vec3.wgsl +++ b/test/buffer/uniform/types/vec3.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec3.wgsl.expected.wgsl b/test/buffer/uniform/types/vec3.wgsl.expected.wgsl index d8d99e8ea4..be459f763e 100644 --- a/test/buffer/uniform/types/vec3.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/vec3.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : vec3; +@group(0) @binding(0) var u : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec4.wgsl b/test/buffer/uniform/types/vec4.wgsl index 24d63f09fc..f15e971f8f 100644 --- a/test/buffer/uniform/types/vec4.wgsl +++ b/test/buffer/uniform/types/vec4.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] +@group(0) @binding(0) var u : vec4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/buffer/uniform/types/vec4.wgsl.expected.wgsl b/test/buffer/uniform/types/vec4.wgsl.expected.wgsl index fe83de0469..41a4f37939 100644 --- a/test/buffer/uniform/types/vec4.wgsl.expected.wgsl +++ b/test/buffer/uniform/types/vec4.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var u : vec4; +@group(0) @binding(0) var u : vec4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x = u; } diff --git a/test/bug/chromium/1251009.wgsl b/test/bug/chromium/1251009.wgsl index 4abe77eaa8..7a057c00a2 100644 --- a/test/bug/chromium/1251009.wgsl +++ b/test/bug/chromium/1251009.wgsl @@ -1,19 +1,19 @@ struct VertexInputs0 { - [[builtin(vertex_index)]] vertex_index : u32; - [[location(0)]] loc0 : i32; + @builtin(vertex_index) vertex_index : u32; + @location(0) loc0 : i32; }; struct VertexInputs1 { - [[location(2)]] loc1 : u32; - [[location(3)]] loc3 : vec4; + @location(2) loc1 : u32; + @location(3) loc3 : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main( inputs0 : VertexInputs0, - [[location(1)]] loc1 : u32, - [[builtin(instance_index)]] instance_index : u32, + @location(1) loc1 : u32, + @builtin(instance_index) instance_index : u32, inputs1 : VertexInputs1, -) -> [[builtin(position)]] vec4 { +) -> @builtin(position) vec4 { let foo : u32 = inputs0.vertex_index + instance_index; return vec4(); } diff --git a/test/bug/chromium/1251009.wgsl.expected.wgsl b/test/bug/chromium/1251009.wgsl.expected.wgsl index c82715d8b8..f761f69457 100644 --- a/test/bug/chromium/1251009.wgsl.expected.wgsl +++ b/test/bug/chromium/1251009.wgsl.expected.wgsl @@ -1,19 +1,19 @@ struct VertexInputs0 { - [[builtin(vertex_index)]] + @builtin(vertex_index) vertex_index : u32; - [[location(0)]] + @location(0) loc0 : i32; } struct VertexInputs1 { - [[location(2)]] + @location(2) loc1 : u32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(vertex)]] -fn main(inputs0 : VertexInputs0, [[location(1)]] loc1 : u32, [[builtin(instance_index)]] instance_index : u32, inputs1 : VertexInputs1) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs0 : VertexInputs0, @location(1) loc1 : u32, @builtin(instance_index) instance_index : u32, inputs1 : VertexInputs1) -> @builtin(position) vec4 { let foo : u32 = (inputs0.vertex_index + instance_index); return vec4(); } diff --git a/test/bug/chromium/1273230.wgsl b/test/bug/chromium/1273230.wgsl index a2152ff5b7..90ed840827 100644 --- a/test/bug/chromium/1273230.wgsl +++ b/test/bug/chromium/1273230.wgsl @@ -1,6 +1,6 @@ // /fallthroUgh] fn marg8uintin() { - _ = (0 ); + _ = (0 ); _ = isNormal(4.); _ = (vec4( 2.)); @@ -37,36 +37,36 @@ struct Dbg { }; struct F32s { - values : [[stride(4)]] array; + values : @stride(4) array; }; struct U32s { - values : [[stride(4)]] array; + values : @stride(4) array; }; struct I32s { - values : [[stride(4)]] array; + values : @stride(4) array; }; struct AU32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; }; struct AI32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; }; -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; -[[binding(10), group(0)]] var indices : U32s; +@binding(10) @group(0) var indices : U32s; -[[binding(11), group(0)]] var positions : F32s; +@binding(11) @group(0) var positions : F32s; -[[binding(20), group(0)]] var counters : AU32s; +@binding(20) @group(0) var counters : AU32s; -[[binding(21), group(0)]] var LUT : AI32s; +@binding(21) @group(0) var LUT : AI32s; -[[binding(50), group(0)]] var dbg : Dbg; +@binding(50) @group(0) var dbg : Dbg; fn toVoxelPos(position : vec3) -> vec3 { var bbMin = vec3(uniforms.bbMin.x, uniforms.bbMin.y, uniforms.bbMin.z); @@ -106,8 +106,8 @@ fn doIgnore() { var g55 = atomicLoad(&(LUT.values[0])); } -[[stage(compute), workgroup_size(128)]] -fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_count(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; if ((triangleIndex >= uniforms.numTriangles)) { return; diff --git a/test/bug/chromium/1273230.wgsl.expected.wgsl b/test/bug/chromium/1273230.wgsl.expected.wgsl index 4708e0b0aa..3cdfc2b9da 100644 --- a/test/bug/chromium/1273230.wgsl.expected.wgsl +++ b/test/bug/chromium/1273230.wgsl.expected.wgsl @@ -54,36 +54,36 @@ struct Dbg { } struct F32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct U32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct I32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct AU32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; } struct AI32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; } -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; -[[binding(10), group(0)]] var indices : U32s; +@binding(10) @group(0) var indices : U32s; -[[binding(11), group(0)]] var positions : F32s; +@binding(11) @group(0) var positions : F32s; -[[binding(20), group(0)]] var counters : AU32s; +@binding(20) @group(0) var counters : AU32s; -[[binding(21), group(0)]] var LUT : AI32s; +@binding(21) @group(0) var LUT : AI32s; -[[binding(50), group(0)]] var dbg : Dbg; +@binding(50) @group(0) var dbg : Dbg; fn toVoxelPos(position : vec3) -> vec3 { var bbMin = vec3(uniforms.bbMin.x, uniforms.bbMin.y, uniforms.bbMin.z); @@ -123,8 +123,8 @@ fn doIgnore() { var g55 = atomicLoad(&(LUT.values[0])); } -[[stage(compute), workgroup_size(128)]] -fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_count(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; if ((triangleIndex >= uniforms.numTriangles)) { return; diff --git a/test/bug/dawn/947.wgsl b/test/bug/dawn/947.wgsl index 008d88a4d5..fe12948327 100644 --- a/test/bug/dawn/947.wgsl +++ b/test/bug/dawn/947.wgsl @@ -2,15 +2,15 @@ u_scale : vec2; u_offset : vec2; }; -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; struct VertexOutputs { - [[location(0)]] texcoords : vec2; - [[builtin(position)]] position : vec4; + @location(0) texcoords : vec2; + @builtin(position) position : vec4; }; -[[stage(vertex)]] fn vs_main( - [[builtin(vertex_index)]] VertexIndex : u32 +@stage(vertex) fn vs_main( + @builtin(vertex_index) VertexIndex : u32 ) -> VertexOutputs { var texcoord = array, 3>( vec2(-0.5, 0.0), @@ -43,12 +43,12 @@ struct VertexOutputs { return output; } -[[binding(1), group(0)]] var mySampler: sampler; -[[binding(2), group(0)]] var myTexture: texture_2d; +@binding(1) @group(0) var mySampler: sampler; +@binding(2) @group(0) var myTexture: texture_2d; -[[stage(fragment)]] fn fs_main( - [[location(0)]] texcoord : vec2 -) -> [[location(0)]] vec4 { +@stage(fragment) fn fs_main( + @location(0) texcoord : vec2 +) -> @location(0) vec4 { // Clamp the texcoord and discard the out-of-bound pixels. var clampedTexcoord = clamp(texcoord, vec2(0.0, 0.0), vec2(1.0, 1.0)); diff --git a/test/bug/dawn/947.wgsl.expected.wgsl b/test/bug/dawn/947.wgsl.expected.wgsl index a7e4f69a40..ff78e61264 100644 --- a/test/bug/dawn/947.wgsl.expected.wgsl +++ b/test/bug/dawn/947.wgsl.expected.wgsl @@ -3,17 +3,17 @@ struct Uniforms { u_offset : vec2; } -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; struct VertexOutputs { - [[location(0)]] + @location(0) texcoords : vec2; - [[builtin(position)]] + @builtin(position) position : vec4; } -[[stage(vertex)]] -fn vs_main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOutputs { +@stage(vertex) +fn vs_main(@builtin(vertex_index) VertexIndex : u32) -> VertexOutputs { var texcoord = array, 3>(vec2(-0.5, 0.0), vec2(1.5, 0.0), vec2(0.5, 2.0)); var output : VertexOutputs; output.position = vec4(((texcoord[VertexIndex] * 2.0) - vec2(1.0, 1.0)), 0.0, 1.0); @@ -26,12 +26,12 @@ fn vs_main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOutputs { return output; } -[[binding(1), group(0)]] var mySampler : sampler; +@binding(1) @group(0) var mySampler : sampler; -[[binding(2), group(0)]] var myTexture : texture_2d; +@binding(2) @group(0) var myTexture : texture_2d; -[[stage(fragment)]] -fn fs_main([[location(0)]] texcoord : vec2) -> [[location(0)]] vec4 { +@stage(fragment) +fn fs_main(@location(0) texcoord : vec2) -> @location(0) vec4 { var clampedTexcoord = clamp(texcoord, vec2(0.0, 0.0), vec2(1.0, 1.0)); if (!(all((clampedTexcoord == texcoord)))) { discard; diff --git a/test/bug/fxc/dyn_array_idx/read/function.wgsl b/test/bug/fxc/dyn_array_idx/read/function.wgsl index 5af006594d..55ce8a238c 100644 --- a/test/bug/fxc/dyn_array_idx/read/function.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/function.wgsl @@ -1,16 +1,16 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; result.out = s.data[ubo.dynamic_idx]; diff --git a/test/bug/fxc/dyn_array_idx/read/function.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/read/function.wgsl.expected.wgsl index 9487d560f0..bd5d8d793d 100644 --- a/test/bug/fxc/dyn_array_idx/read/function.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/function.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,9 +12,9 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; result.out = s.data[ubo.dynamic_idx]; diff --git a/test/bug/fxc/dyn_array_idx/read/private.wgsl b/test/bug/fxc/dyn_array_idx/read/private.wgsl index c7c0b7a585..2d7729b377 100644 --- a/test/bug/fxc/dyn_array_idx/read/private.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/private.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = s.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/private.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/read/private.wgsl.expected.wgsl index 352b5e2f0f..fd84a4689c 100644 --- a/test/bug/fxc/dyn_array_idx/read/private.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/private.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,11 +12,11 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = s.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/storage.wgsl b/test/bug/fxc/dyn_array_idx/read/storage.wgsl index 62908a2fb3..432c59c267 100644 --- a/test/bug/fxc/dyn_array_idx/read/storage.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/storage.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct Result { out: i32; }; -[[group(0), binding(2)]] var result: Result; +@group(0) @binding(2) var result: Result; struct SSBO { data: array; }; -[[group(0), binding(1)]] var ssbo: SSBO; +@group(0) @binding(1) var ssbo: SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = ssbo.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.wgsl index 5445952649..9fdea5ffef 100644 --- a/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.wgsl @@ -2,21 +2,21 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct Result { out : i32; } -[[group(0), binding(2)]] var result : Result; +@group(0) @binding(2) var result : Result; struct SSBO { data : array; } -[[group(0), binding(1)]] var ssbo : SSBO; +@group(0) @binding(1) var ssbo : SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = ssbo.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl index 22d11335f2..be2614639a 100644 --- a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl @@ -1,14 +1,14 @@ struct UBO { - data: [[stride(16)]] array; + data: @stride(16) array; dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct Result { out: i32; }; -[[group(0), binding(2)]] var result: Result; +@group(0) @binding(2) var result: Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = ubo.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.wgsl index d0f1e724fb..7f3ca0b9b8 100644 --- a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.wgsl @@ -1,17 +1,17 @@ struct UBO { - data : [[stride(16)]] array; + data : @stride(16) array; dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct Result { out : i32; } -[[group(0), binding(2)]] var result : Result; +@group(0) @binding(2) var result : Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = ubo.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl index 66450c2e3f..024506f0b9 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = s.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.wgsl index 80a812d3ae..9427391114 100644 --- a/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/read/workgroup.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,11 +12,11 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { result.out = s.data[ubo.dynamic_idx]; } diff --git a/test/bug/fxc/dyn_array_idx/write/function.wgsl b/test/bug/fxc/dyn_array_idx/write/function.wgsl index 3dea9fa56b..b183971ece 100644 --- a/test/bug/fxc/dyn_array_idx/write/function.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/function.wgsl @@ -1,16 +1,16 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; s.data[ubo.dynamic_idx] = 1; diff --git a/test/bug/fxc/dyn_array_idx/write/function.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/function.wgsl.expected.wgsl index 18b069c573..1504f928eb 100644 --- a/test/bug/fxc/dyn_array_idx/write/function.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/function.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,9 +12,9 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; s.data[ubo.dynamic_idx] = 1; diff --git a/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl b/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl index bf46f99a47..4a5bc5f8f3 100644 --- a/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl @@ -1,20 +1,20 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; fn x(p : ptr) { (*p).data[ubo.dynamic_idx] = 1; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; x(&s); diff --git a/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.wgsl index 57c8a26129..52bbcc4216 100644 --- a/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,13 +12,13 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; fn x(p : ptr) { (*(p)).data[ubo.dynamic_idx] = 1; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var s : S; x(&(s)); diff --git a/test/bug/fxc/dyn_array_idx/write/private.wgsl b/test/bug/fxc/dyn_array_idx/write/private.wgsl index c8fade0094..272042659e 100644 --- a/test/bug/fxc/dyn_array_idx/write/private.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/private.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.data[ubo.dynamic_idx] = 1; result.out = s.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/private.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/private.wgsl.expected.wgsl index 754400635b..d4c7b0effb 100644 --- a/test/bug/fxc/dyn_array_idx/write/private.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/private.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,11 +12,11 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.data[ubo.dynamic_idx] = 1; result.out = s.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl b/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl index 3c7cf567af..c123fe77a0 100644 --- a/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl @@ -1,14 +1,14 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; var s : S; @@ -16,7 +16,7 @@ fn x(p : ptr) { (*p).data[ubo.dynamic_idx] = 1; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { x(&s); result.out = s.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.wgsl index fd99ff2866..d4d329f566 100644 --- a/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,7 +12,7 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; var s : S; @@ -20,7 +20,7 @@ fn x(p : ptr) { (*(p)).data[ubo.dynamic_idx] = 1; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { x(&(s)); result.out = s.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/storage.wgsl b/test/bug/fxc/dyn_array_idx/write/storage.wgsl index 0ced96e86f..9e4babe6ca 100644 --- a/test/bug/fxc/dyn_array_idx/write/storage.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/storage.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct Result { out: i32; }; -[[group(0), binding(2)]] var result: Result; +@group(0) @binding(2) var result: Result; struct SSBO { data: array; }; -[[group(0), binding(1)]] var ssbo: SSBO; +@group(0) @binding(1) var ssbo: SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ssbo.data[ubo.dynamic_idx] = 1; result.out = ssbo.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.wgsl index b3d0217fcf..2f5ce76c49 100644 --- a/test/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.wgsl @@ -2,21 +2,21 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct Result { out : i32; } -[[group(0), binding(2)]] var result : Result; +@group(0) @binding(2) var result : Result; struct SSBO { data : array; } -[[group(0), binding(1)]] var ssbo : SSBO; +@group(0) @binding(1) var ssbo : SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { ssbo.data[ubo.dynamic_idx] = 1; result.out = ssbo.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl index 8f7e84b4f1..961f020ca2 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl @@ -1,18 +1,18 @@ struct UBO { dynamic_idx: i32; }; -[[group(0), binding(0)]] var ubo: UBO; +@group(0) @binding(0) var ubo: UBO; struct S { data: array; }; struct Result { out: i32; }; -[[group(0), binding(1)]] var result: Result; +@group(0) @binding(1) var result: Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.data[ubo.dynamic_idx] = 1; result.out = s.data[3]; diff --git a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.wgsl b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.wgsl index 7c122d1a73..f0026f9c36 100644 --- a/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.wgsl +++ b/test/bug/fxc/dyn_array_idx/write/workgroup.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct UBO { dynamic_idx : i32; } -[[group(0), binding(0)]] var ubo : UBO; +@group(0) @binding(0) var ubo : UBO; struct S { data : array; @@ -12,11 +12,11 @@ struct Result { out : i32; } -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { s.data[ubo.dynamic_idx] = 1; result.out = s.data[3]; diff --git a/test/bug/fxc/gradient_in_varying_loop/1112.wgsl b/test/bug/fxc/gradient_in_varying_loop/1112.wgsl index b4dff54cd5..bc9a36c5d9 100644 --- a/test/bug/fxc/gradient_in_varying_loop/1112.wgsl +++ b/test/bug/fxc/gradient_in_varying_loop/1112.wgsl @@ -1,10 +1,10 @@ // 1112.wgsl -[[group(0), binding(0)]] var Sampler: sampler; -[[group(0), binding(1)]] var randomTexture: texture_2d; -[[group(0), binding(2)]] var depthTexture: texture_2d; +@group(0) @binding(0) var Sampler: sampler; +@group(0) @binding(1) var randomTexture: texture_2d; +@group(0) @binding(2) var depthTexture: texture_2d; -[[stage(fragment)]] -fn main([[location(0)]] vUV : vec2) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) vUV : vec2) -> @location(0) vec4 { let random: vec3 = textureSample(randomTexture, Sampler, vUV).rgb; var i = 0; diff --git a/test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.wgsl b/test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.wgsl index 6728e4e74e..0998c72f76 100644 --- a/test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.wgsl +++ b/test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.wgsl @@ -1,11 +1,11 @@ -[[group(0), binding(0)]] var Sampler : sampler; +@group(0) @binding(0) var Sampler : sampler; -[[group(0), binding(1)]] var randomTexture : texture_2d; +@group(0) @binding(1) var randomTexture : texture_2d; -[[group(0), binding(2)]] var depthTexture : texture_2d; +@group(0) @binding(2) var depthTexture : texture_2d; -[[stage(fragment)]] -fn main([[location(0)]] vUV : vec2) -> [[location(0)]] vec4 { +@stage(fragment) +fn main(@location(0) vUV : vec2) -> @location(0) vec4 { let random : vec3 = textureSample(randomTexture, Sampler, vUV).rgb; var i = 0; loop { diff --git a/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl b/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl index df48e4ca1a..773dd61d94 100644 --- a/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl +++ b/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl @@ -13,10 +13,10 @@ struct Particles { p : array; }; -[[group(1), binding(3)]] var particles : Particles; -[[group(1), binding(4)]] var sim : Simulation; +@group(1) @binding(3) var particles : Particles; +@group(1) @binding(4) var sim : Simulation; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var particle = particles.p[0]; particle.position[sim.i] = particle.position[sim.i]; diff --git a/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.wgsl b/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.wgsl index 818e3b4134..df8979bde3 100644 --- a/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.wgsl +++ b/test/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.wgsl @@ -13,11 +13,11 @@ struct Particles { p : array; } -[[group(1), binding(3)]] var particles : Particles; +@group(1) @binding(3) var particles : Particles; -[[group(1), binding(4)]] var sim : Simulation; +@group(1) @binding(4) var sim : Simulation; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var particle = particles.p[0]; particle.position[sim.i] = particle.position[sim.i]; diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl index ea01de2a58..30627d87ff 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl @@ -3,9 +3,9 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i][0] = 1.0; diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.wgsl index 3b201def94..9f79724433 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i][0] = 1.0; diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl index aab333eccb..e72acfe3f8 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl @@ -3,9 +3,9 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i][uniforms.j] = 1.0; diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.wgsl index 8b37003eda..9847626638 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i][uniforms.j] = 1.0; diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl index f893f32345..87d95ad59e 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl @@ -3,11 +3,11 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[0][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.wgsl index 031f689aee..0bf7965143 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.wgsl @@ -3,11 +3,11 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[0][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl index e5ccc3d203..8db52b8611 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl @@ -3,9 +3,9 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i] = vec4(1.0); diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.wgsl index 4dc3783313..87cf58c16d 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m1 : mat2x4; m1[uniforms.i] = vec4(1.0); diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl index d12c19cdd3..ed33805475 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl @@ -3,11 +3,11 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i][0] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.wgsl index bc312b2e18..8f5c87a985 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.wgsl @@ -3,11 +3,11 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i][0] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl index 40b2bbb759..c7e750ed9e 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl @@ -3,11 +3,11 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.wgsl index f706b60a7d..6419eb2934 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.wgsl @@ -3,11 +3,11 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl index f893f32345..87d95ad59e 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl @@ -3,11 +3,11 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[0][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.wgsl index 031f689aee..0bf7965143 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.wgsl @@ -3,11 +3,11 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[0][uniforms.j] = 1.0; } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl index de3bcaa3c0..88338a563c 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl @@ -3,11 +3,11 @@ j : u32; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i] = vec4(1.0); } diff --git a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.wgsl b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.wgsl index b1c72550f9..3642ca8af5 100644 --- a/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.wgsl +++ b/test/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.wgsl @@ -3,11 +3,11 @@ struct Uniforms { j : u32; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; var m1 : mat2x4; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { m1[uniforms.i] = vec4(1.0); } diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl index a684c5675c..82fdac2ce1 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl @@ -12,7 +12,7 @@ fn foo() { } } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { for (var i : i32 = 0; i < 2; i = i + 1) { diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.wgsl index def10cbecd..be75b1848b 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.wgsl @@ -15,7 +15,7 @@ fn foo() { } } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { for(var i : i32 = 0; (i < 2); i = (i + 1)) { foo(); diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl index c85e301ac0..f7d64cdb94 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl @@ -11,7 +11,7 @@ fn foo() { v2b[i] = true; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { for (var i : i32 = 0; i < 2; i = i + 1) { diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.wgsl index 21db9dd7a7..8b055f2b13 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.wgsl @@ -14,7 +14,7 @@ fn foo() { v2b[i] = true; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { for(var i : i32 = 0; (i < 2); i = (i + 1)) { foo(); diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl index 5d428383a6..51460ebd1b 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.wgsl index 9f8f2e0aac..45acb5d00a 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl index 7b91e4887f..beeaa2cbe0 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v2f_2 : vec2; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.wgsl index 74950ca488..659db4954e 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v2f_2 : vec2; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl index d255bcc6bb..c48c1a8cd1 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.wgsl index 1fada7537e..01115a6b4d 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl b/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl index 276355c706..2ff69eb70a 100644 --- a/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.wgsl b/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.wgsl index 2d267744b5..72a4494bd9 100644 --- a/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.wgsl +++ b/test/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { var v2f : vec2; var v3f : vec3; diff --git a/test/bug/tint/1046.wgsl b/test/bug/tint/1046.wgsl index 8fdfe17366..a294edf20d 100644 --- a/test/bug/tint/1046.wgsl +++ b/test/bug/tint/1046.wgsl @@ -4,7 +4,7 @@ struct PointLight { }; struct PointLights { - values : [[stride(16)]] array; + values : @stride(16) array; }; struct Uniforms { @@ -15,21 +15,21 @@ struct PointLight { color : vec4; }; -[[binding(0), group(0)]] var uniforms : Uniforms; -[[binding(1), group(0)]] var pointLights : PointLights; -[[binding(2), group(0)]] var mySampler: sampler; -[[binding(3), group(0)]] var myTexture: texture_2d; +@binding(0) @group(0) var uniforms : Uniforms; +@binding(1) @group(0) var pointLights : PointLights; +@binding(2) @group(0) var mySampler: sampler; +@binding(3) @group(0) var myTexture: texture_2d; struct FragmentInput { - [[builtin(position)]] position : vec4; - [[location(0)]] view_position : vec4; - [[location(1)]] normal : vec4; - [[location(2)]] uv : vec2; - [[location(3)]] color : vec4; + @builtin(position) position : vec4; + @location(0) view_position : vec4; + @location(1) normal : vec4; + @location(2) uv : vec2; + @location(3) color : vec4; }; struct FragmentOutput { - [[location(0)]] color : vec4; + @location(0) color : vec4; }; fn getColor(fragment : FragmentInput) -> vec4{ @@ -63,7 +63,7 @@ fn getColor(fragment : FragmentInput) -> vec4{ return color; }; -[[stage(fragment)]] +@stage(fragment) fn main(fragment : FragmentInput) -> FragmentOutput { var output : FragmentOutput; diff --git a/test/bug/tint/1046.wgsl.expected.wgsl b/test/bug/tint/1046.wgsl.expected.wgsl index d67947b9b0..b7000e626b 100644 --- a/test/bug/tint/1046.wgsl.expected.wgsl +++ b/test/bug/tint/1046.wgsl.expected.wgsl @@ -3,7 +3,7 @@ struct PointLight { } struct PointLights { - values : [[stride(16)]] array; + values : @stride(16) array; } struct Uniforms { @@ -14,29 +14,29 @@ struct Uniforms { color : vec4; } -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; -[[binding(1), group(0)]] var pointLights : PointLights; +@binding(1) @group(0) var pointLights : PointLights; -[[binding(2), group(0)]] var mySampler : sampler; +@binding(2) @group(0) var mySampler : sampler; -[[binding(3), group(0)]] var myTexture : texture_2d; +@binding(3) @group(0) var myTexture : texture_2d; struct FragmentInput { - [[builtin(position)]] + @builtin(position) position : vec4; - [[location(0)]] + @location(0) view_position : vec4; - [[location(1)]] + @location(1) normal : vec4; - [[location(2)]] + @location(2) uv : vec2; - [[location(3)]] + @location(3) color : vec4; } struct FragmentOutput { - [[location(0)]] + @location(0) color : vec4; } @@ -55,7 +55,7 @@ fn getColor(fragment : FragmentInput) -> vec4 { return color; } -[[stage(fragment)]] +@stage(fragment) fn main(fragment : FragmentInput) -> FragmentOutput { var output : FragmentOutput; output.color = vec4(1.0, 0.0, 0.0, 1.0); diff --git a/test/bug/tint/1064.wgsl b/test/bug/tint/1064.wgsl index 782a564a7d..4ab5117d0f 100644 --- a/test/bug/tint/1064.wgsl +++ b/test/bug/tint/1064.wgsl @@ -1,4 +1,4 @@ -[[stage(fragment)]] +@stage(fragment) fn main() { loop { if (false) { diff --git a/test/bug/tint/1064.wgsl.expected.wgsl b/test/bug/tint/1064.wgsl.expected.wgsl index 27842dc0d4..581cb90764 100644 --- a/test/bug/tint/1064.wgsl.expected.wgsl +++ b/test/bug/tint/1064.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(fragment)]] +@stage(fragment) fn main() { loop { if (false) { diff --git a/test/bug/tint/1076.wgsl b/test/bug/tint/1076.wgsl index b854b18ede..efa85b87c7 100644 --- a/test/bug/tint/1076.wgsl +++ b/test/bug/tint/1076.wgsl @@ -1,10 +1,10 @@ struct FragIn { - [[location(0)]] a : f32; - [[builtin(sample_mask)]] mask : u32; + @location(0) a : f32; + @builtin(sample_mask) mask : u32; }; -[[stage(fragment)]] -fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn { +@stage(fragment) +fn main(in : FragIn, @location(1) b : f32) -> FragIn { if (in.mask == 0u) { return in; } diff --git a/test/bug/tint/1076.wgsl.expected.wgsl b/test/bug/tint/1076.wgsl.expected.wgsl index 8a91c0869b..4be185f88d 100644 --- a/test/bug/tint/1076.wgsl.expected.wgsl +++ b/test/bug/tint/1076.wgsl.expected.wgsl @@ -1,12 +1,12 @@ struct FragIn { - [[location(0)]] + @location(0) a : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) mask : u32; } -[[stage(fragment)]] -fn main(in : FragIn, [[location(1)]] b : f32) -> FragIn { +@stage(fragment) +fn main(in : FragIn, @location(1) b : f32) -> FragIn { if ((in.mask == 0u)) { return in; } diff --git a/test/bug/tint/1081.wgsl b/test/bug/tint/1081.wgsl index 7350e4cda2..591fb0482b 100644 --- a/test/bug/tint/1081.wgsl +++ b/test/bug/tint/1081.wgsl @@ -5,8 +5,8 @@ fn f(x : i32) -> i32 { return x; } -[[stage(fragment)]] -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { +@stage(fragment) +fn main(@location(1) x: vec3) -> @location(2) i32 { var y = x.x; loop { let r = f(y); diff --git a/test/bug/tint/1081.wgsl.expected.glsl b/test/bug/tint/1081.wgsl.expected.glsl index f86361ac91..dda1d6bad5 100644 --- a/test/bug/tint/1081.wgsl.expected.glsl +++ b/test/bug/tint/1081.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED bug/tint/1081.wgsl:9:25 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { +fn main(@location(1) x: vec3) -> @location(2) i32 { ^ #version 310 es @@ -51,7 +51,7 @@ void main() { Error parsing GLSL shader: ERROR: 0:35: 'int' : must be qualified as flat in -ERROR: 0:35: '' : compilation terminated +ERROR: 0:35: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/bug/tint/1081.wgsl.expected.hlsl b/test/bug/tint/1081.wgsl.expected.hlsl index 1aba907086..73e28307b0 100644 --- a/test/bug/tint/1081.wgsl.expected.hlsl +++ b/test/bug/tint/1081.wgsl.expected.hlsl @@ -1,6 +1,6 @@ -bug/tint/1081.wgsl:9:25 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { - ^ +bug/tint/1081.wgsl:9:22 warning: integral user-defined fragment inputs must have a flat interpolation attribute +fn main(@location(1) x: vec3) -> @location(2) i32 { + ^ int f(int x) { if (true) { diff --git a/test/bug/tint/1081.wgsl.expected.msl b/test/bug/tint/1081.wgsl.expected.msl index 0d57311f34..478e1a54b4 100644 --- a/test/bug/tint/1081.wgsl.expected.msl +++ b/test/bug/tint/1081.wgsl.expected.msl @@ -1,6 +1,6 @@ -bug/tint/1081.wgsl:9:25 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { - ^ +bug/tint/1081.wgsl:9:22 warning: integral user-defined fragment inputs must have a flat interpolation attribute +fn main(@location(1) x: vec3) -> @location(2) i32 { + ^ #include diff --git a/test/bug/tint/1081.wgsl.expected.spvasm b/test/bug/tint/1081.wgsl.expected.spvasm index 58810deb88..b17a7e645e 100644 --- a/test/bug/tint/1081.wgsl.expected.spvasm +++ b/test/bug/tint/1081.wgsl.expected.spvasm @@ -1,6 +1,6 @@ -bug/tint/1081.wgsl:9:25 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { - ^ +bug/tint/1081.wgsl:9:22 warning: integral user-defined fragment inputs must have a flat interpolation attribute +fn main(@location(1) x: vec3) -> @location(2) i32 { + ^ ; SPIR-V ; Version: 1.3 diff --git a/test/bug/tint/1081.wgsl.expected.wgsl b/test/bug/tint/1081.wgsl.expected.wgsl index ab2a38dbe8..34d78e1a94 100644 --- a/test/bug/tint/1081.wgsl.expected.wgsl +++ b/test/bug/tint/1081.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -bug/tint/1081.wgsl:9:25 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[location(1)]] x: vec3) -> [[location(2)]] i32 { - ^ +bug/tint/1081.wgsl:9:22 warning: integral user-defined fragment inputs must have a flat interpolation attribute +fn main(@location(1) x: vec3) -> @location(2) i32 { + ^ fn f(x : i32) -> i32 { if ((x == 10)) { @@ -9,8 +9,8 @@ fn f(x : i32) -> i32 { return x; } -[[stage(fragment)]] -fn main([[location(1)]] x : vec3) -> [[location(2)]] i32 { +@stage(fragment) +fn main(@location(1) x : vec3) -> @location(2) i32 { var y = x.x; loop { let r = f(y); diff --git a/test/bug/tint/1083.wgsl b/test/bug/tint/1083.wgsl index 3dc8fb23e1..12e985ff86 100644 --- a/test/bug/tint/1083.wgsl +++ b/test/bug/tint/1083.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/bug/tint/1083.wgsl.expected.wgsl b/test/bug/tint/1083.wgsl.expected.wgsl index 57303cb560..4d2024cace 100644 --- a/test/bug/tint/1083.wgsl.expected.wgsl +++ b/test/bug/tint/1083.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/bug/tint/1086.wgsl b/test/bug/tint/1086.wgsl index 62731350ec..a5c2982b05 100644 --- a/test/bug/tint/1086.wgsl +++ b/test/bug/tint/1086.wgsl @@ -8,7 +8,7 @@ fn g() { x(&v); } -[[stage(fragment)]] +@stage(fragment) fn f() { g(); } diff --git a/test/bug/tint/1086.wgsl.expected.wgsl b/test/bug/tint/1086.wgsl.expected.wgsl index dbc74bec5b..9c7a8fcfff 100644 --- a/test/bug/tint/1086.wgsl.expected.wgsl +++ b/test/bug/tint/1086.wgsl.expected.wgsl @@ -8,7 +8,7 @@ fn g() { x(&(v)); } -[[stage(fragment)]] +@stage(fragment) fn f() { g(); } diff --git a/test/bug/tint/1088.spvasm.expected.wgsl b/test/bug/tint/1088.spvasm.expected.wgsl index d31ca16343..c67da676d0 100644 --- a/test/bug/tint/1088.spvasm.expected.wgsl +++ b/test/bug/tint/1088.spvasm.expected.wgsl @@ -1,11 +1,11 @@ -type Arr = [[stride(64)]] array, 2u>; +type Arr = @stride(64) array, 2u>; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct LeftOver { worldViewProjection : mat4x4; time : f32; - [[size(12)]] + @size(12) padding : u32; test2 : Arr; test : Arr_1; @@ -13,7 +13,7 @@ struct LeftOver { var position : vec3; -[[group(2), binding(2)]] var x_14 : LeftOver; +@group(2) @binding(2) var x_14 : LeftOver; var vUV : vec2; @@ -49,14 +49,14 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; - [[location(0)]] + @location(0) vUV_1 : vec2; } -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec3, [[location(2)]] uv_param : vec2, [[location(1)]] normal_param : vec3) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec3, @location(2) uv_param : vec2, @location(1) normal_param : vec3) -> main_out { position = position_param; uv = uv_param; normal = normal_param; diff --git a/test/bug/tint/1113.wgsl b/test/bug/tint/1113.wgsl index 0e7874d980..f3a080a330 100644 --- a/test/bug/tint/1113.wgsl +++ b/test/bug/tint/1113.wgsl @@ -23,23 +23,23 @@ value_f32_3 : f32; }; - struct F32s { values : [[stride(4)]] array; }; - struct U32s { values : [[stride(4)]] array; }; - struct I32s { values : [[stride(4)]] array; }; - struct AU32s { values : [[stride(4)]] array>; }; - struct AI32s { values : [[stride(4)]] array>; }; + struct F32s { values : @stride(4) array; }; + struct U32s { values : @stride(4) array; }; + struct I32s { values : @stride(4) array; }; + struct AU32s { values : @stride(4) array>; }; + struct AI32s { values : @stride(4) array>; }; // IN -[[binding(0), group(0)]] var uniforms : Uniforms; -[[binding(10), group(0)]] var indices : U32s; -[[binding(11), group(0)]] var positions : F32s; +@binding(0) @group(0) var uniforms : Uniforms; +@binding(10) @group(0) var indices : U32s; +@binding(11) @group(0) var positions : F32s; // OUT -[[binding(20), group(0)]] var counters : AU32s; -[[binding(21), group(0)]] var LUT : AI32s; +@binding(20) @group(0) var counters : AU32s; +@binding(21) @group(0) var LUT : AI32s; // DEBUG -[[binding(50), group(0)]] var dbg : Dbg; +@binding(50) @group(0) var dbg : Dbg; fn toVoxelPos(position : vec3) -> vec3{ @@ -95,8 +95,8 @@ fn doIgnore(){ } -[[stage(compute), workgroup_size(128)]] -fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_count(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; @@ -132,8 +132,8 @@ fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) } -[[stage(compute), workgroup_size(128)]] -fn main_create_lut([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_create_lut(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var voxelIndex = GlobalInvocationID.x; @@ -155,8 +155,8 @@ fn main_create_lut([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_sort_triangles(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; diff --git a/test/bug/tint/1113.wgsl.expected.wgsl b/test/bug/tint/1113.wgsl.expected.wgsl index ce45595aa1..9eeb16c48f 100644 --- a/test/bug/tint/1113.wgsl.expected.wgsl +++ b/test/bug/tint/1113.wgsl.expected.wgsl @@ -23,36 +23,36 @@ struct Dbg { } struct F32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct U32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct I32s { - values : [[stride(4)]] array; + values : @stride(4) array; } struct AU32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; } struct AI32s { - values : [[stride(4)]] array>; + values : @stride(4) array>; } -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; -[[binding(10), group(0)]] var indices : U32s; +@binding(10) @group(0) var indices : U32s; -[[binding(11), group(0)]] var positions : F32s; +@binding(11) @group(0) var positions : F32s; -[[binding(20), group(0)]] var counters : AU32s; +@binding(20) @group(0) var counters : AU32s; -[[binding(21), group(0)]] var LUT : AI32s; +@binding(21) @group(0) var LUT : AI32s; -[[binding(50), group(0)]] var dbg : Dbg; +@binding(50) @group(0) var dbg : Dbg; fn toVoxelPos(position : vec3) -> vec3 { var bbMin = vec3(uniforms.bbMin.x, uniforms.bbMin.y, uniforms.bbMin.z); @@ -92,8 +92,8 @@ fn doIgnore() { var g55 = atomicLoad(&(LUT.values[0])); } -[[stage(compute), workgroup_size(128)]] -fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_count(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; if ((triangleIndex >= uniforms.numTriangles)) { return; @@ -117,8 +117,8 @@ fn main_count([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) } } -[[stage(compute), workgroup_size(128)]] -fn main_create_lut([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_create_lut(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var voxelIndex = GlobalInvocationID.x; doIgnore(); var maxVoxels = ((uniforms.gridSize * uniforms.gridSize) * uniforms.gridSize); @@ -133,8 +133,8 @@ fn main_create_lut([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(128) +fn main_sort_triangles(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var triangleIndex = GlobalInvocationID.x; doIgnore(); if ((triangleIndex >= uniforms.numTriangles)) { diff --git a/test/bug/tint/1121.wgsl b/test/bug/tint/1121.wgsl index c7fba35de4..24a125bdd1 100644 --- a/test/bug/tint/1121.wgsl +++ b/test/bug/tint/1121.wgsl @@ -15,7 +15,7 @@ struct LightData { struct LightsBuffer { lights: array; }; -[[group(0), binding(0)]] var lightsBuffer: LightsBuffer; +@group(0) @binding(0) var lightsBuffer: LightsBuffer; struct TileLightIdData { count: atomic; lightId: array; @@ -23,8 +23,8 @@ struct TileLightIdData { struct Tiles { data: array; }; -[[group(1), binding(0)]] var tileLightId: Tiles; - +@group(1) @binding(0) var tileLightId: Tiles; + struct Config { numLights : u32; numTiles : u32; @@ -33,7 +33,7 @@ struct TileLightIdData { numTileLightSlot : u32; tileSize : u32; }; -[[group(2), binding(0)]] var config: Config; +@group(2) @binding(0) var config: Config; struct Uniforms { min : vec4; max : vec4; @@ -43,16 +43,16 @@ struct TileLightIdData { // Tile info fullScreenSize : vec4; // width, height }; -[[group(3), binding(0)]] var uniforms: Uniforms; -[[stage(compute), workgroup_size(64, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@group(3) @binding(0) var uniforms: Uniforms; +@stage(compute) @workgroup_size(64, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var index = GlobalInvocationID.x; if (index >= config.numLights) { return; } // Light position updating lightsBuffer.lights[index].position.y = lightsBuffer.lights[index].position.y - 0.1 + 0.001 * (f32(index) - 64.0 * floor(f32(index) / 64.0)); - + if (lightsBuffer.lights[index].position.y < uniforms.min.y) { lightsBuffer.lights[index].position.y = uniforms.max.y; } diff --git a/test/bug/tint/1121.wgsl.expected.wgsl b/test/bug/tint/1121.wgsl.expected.wgsl index 262096765a..61d81e5652 100644 --- a/test/bug/tint/1121.wgsl.expected.wgsl +++ b/test/bug/tint/1121.wgsl.expected.wgsl @@ -8,7 +8,7 @@ struct LightsBuffer { lights : array; } -[[group(0), binding(0)]] var lightsBuffer : LightsBuffer; +@group(0) @binding(0) var lightsBuffer : LightsBuffer; struct TileLightIdData { count : atomic; @@ -19,7 +19,7 @@ struct Tiles { data : array; } -[[group(1), binding(0)]] var tileLightId : Tiles; +@group(1) @binding(0) var tileLightId : Tiles; struct Config { numLights : u32; @@ -30,7 +30,7 @@ struct Config { tileSize : u32; } -[[group(2), binding(0)]] var config : Config; +@group(2) @binding(0) var config : Config; struct Uniforms { min : vec4; @@ -40,10 +40,10 @@ struct Uniforms { fullScreenSize : vec4; } -[[group(3), binding(0)]] var uniforms : Uniforms; +@group(3) @binding(0) var uniforms : Uniforms; -[[stage(compute), workgroup_size(64, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(64, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var index = GlobalInvocationID.x; if ((index >= config.numLights)) { return; diff --git a/test/bug/tint/1136.wgsl b/test/bug/tint/1136.wgsl index ee73478d7f..2fd739e329 100644 --- a/test/bug/tint/1136.wgsl +++ b/test/bug/tint/1136.wgsl @@ -1,3 +1,3 @@ struct Buffer { data: u32; }; -[[group(0), binding(0)]] var buffer: Buffer; +@group(0) @binding(0) var buffer: Buffer; fn main() { buffer.data = buffer.data + 1u; } diff --git a/test/bug/tint/1136.wgsl.expected.wgsl b/test/bug/tint/1136.wgsl.expected.wgsl index 7bf2195ce6..d17771a58d 100644 --- a/test/bug/tint/1136.wgsl.expected.wgsl +++ b/test/bug/tint/1136.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct Buffer { data : u32; } -[[group(0), binding(0)]] var buffer : Buffer; +@group(0) @binding(0) var buffer : Buffer; fn main() { buffer.data = (buffer.data + 1u); diff --git a/test/bug/tint/1321.wgsl b/test/bug/tint/1321.wgsl index 0c2d7eca1a..1ab9e23e70 100644 --- a/test/bug/tint/1321.wgsl +++ b/test/bug/tint/1321.wgsl @@ -2,7 +2,7 @@ fn foo() -> i32 { return 1; } -[[stage(fragment)]] +@stage(fragment) fn main() { var arr = array(); for (let a = &arr[foo()]; ;) { diff --git a/test/bug/tint/1321.wgsl.expected.wgsl b/test/bug/tint/1321.wgsl.expected.wgsl index 8f7d2f79ca..21173939f1 100644 --- a/test/bug/tint/1321.wgsl.expected.wgsl +++ b/test/bug/tint/1321.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn foo() -> i32 { return 1; } -[[stage(fragment)]] +@stage(fragment) fn main() { var arr = array(); for(let a = &(arr[foo()]); ; ) { diff --git a/test/bug/tint/1369.wgsl b/test/bug/tint/1369.wgsl index 434bb2b37f..b90b8e31a1 100644 --- a/test/bug/tint/1369.wgsl +++ b/test/bug/tint/1369.wgsl @@ -3,7 +3,7 @@ fn call_discard() -> bool { return true; } -[[stage(fragment)]] +@stage(fragment) fn f() { var v = call_discard(); var also_unreachable : bool; diff --git a/test/bug/tint/1369.wgsl.expected.wgsl b/test/bug/tint/1369.wgsl.expected.wgsl index eb44227d81..2da3171c6b 100644 --- a/test/bug/tint/1369.wgsl.expected.wgsl +++ b/test/bug/tint/1369.wgsl.expected.wgsl @@ -11,7 +11,7 @@ fn call_discard() -> bool { return true; } -[[stage(fragment)]] +@stage(fragment) fn f() { var v = call_discard(); var also_unreachable : bool; diff --git a/test/bug/tint/1385.wgsl b/test/bug/tint/1385.wgsl index 6b4154a98a..78f402ed64 100644 --- a/test/bug/tint/1385.wgsl +++ b/test/bug/tint/1385.wgsl @@ -1,11 +1,11 @@ -[[group(0), binding(1)]] +@group(0) @binding(1) var data : array; fn foo() -> i32 { return data[0]; } -[[stage(compute), workgroup_size(16, 16, 1)]] +@stage(compute) @workgroup_size(16, 16, 1) fn main() { foo(); } diff --git a/test/bug/tint/1385.wgsl.expected.wgsl b/test/bug/tint/1385.wgsl.expected.wgsl index 98c9e904a3..3e522fd41b 100644 --- a/test/bug/tint/1385.wgsl.expected.wgsl +++ b/test/bug/tint/1385.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(1)]] var data : array; +@group(0) @binding(1) var data : array; fn foo() -> i32 { return data[0]; } -[[stage(compute), workgroup_size(16, 16, 1)]] +@stage(compute) @workgroup_size(16, 16, 1) fn main() { foo(); } diff --git a/test/bug/tint/219.spvasm.expected.wgsl b/test/bug/tint/219.spvasm.expected.wgsl index 0932553db2..3bc5263c69 100644 --- a/test/bug/tint/219.spvasm.expected.wgsl +++ b/test/bug/tint/219.spvasm.expected.wgsl @@ -9,7 +9,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/bug/tint/221.wgsl b/test/bug/tint/221.wgsl index 9c6a70f117..e38a666fa5 100644 --- a/test/bug/tint/221.wgsl +++ b/test/bug/tint/221.wgsl @@ -5,9 +5,9 @@ struct Buf{ data : Arr; }; -[[group(0), binding (0)]] var b : Buf; +@group(0) @binding(0) var b : Buf; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : u32 = 0u; loop { diff --git a/test/bug/tint/221.wgsl.expected.wgsl b/test/bug/tint/221.wgsl.expected.wgsl index 6173b616a7..a0e52510d2 100644 --- a/test/bug/tint/221.wgsl.expected.wgsl +++ b/test/bug/tint/221.wgsl.expected.wgsl @@ -5,9 +5,9 @@ struct Buf { data : Arr; } -[[group(0), binding(0)]] var b : Buf; +@group(0) @binding(0) var b : Buf; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : u32 = 0u; loop { diff --git a/test/bug/tint/292.wgsl b/test/bug/tint/292.wgsl index 78f469c826..daebb4f96f 100644 --- a/test/bug/tint/292.wgsl +++ b/test/bug/tint/292.wgsl @@ -1,5 +1,5 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { var light : vec3 = vec3(1.2, 1., 2.); var negative_light : vec3 = -light; return vec4(); diff --git a/test/bug/tint/292.wgsl.expected.wgsl b/test/bug/tint/292.wgsl.expected.wgsl index 08967d9f99..071b9da8dd 100644 --- a/test/bug/tint/292.wgsl.expected.wgsl +++ b/test/bug/tint/292.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { var light : vec3 = vec3(1.200000048, 1.0, 2.0); var negative_light : vec3 = -(light); return vec4(); diff --git a/test/bug/tint/294.wgsl b/test/bug/tint/294.wgsl index 83831c79ca..4917c47e70 100644 --- a/test/bug/tint/294.wgsl +++ b/test/bug/tint/294.wgsl @@ -3,6 +3,6 @@ struct Light { colour : vec3; }; struct Lights { - light : [[stride(32)]] array; + light : @stride(32) array; }; -[[group(0), binding(1)]] var lights : Lights; +@group(0) @binding(1) var lights : Lights; diff --git a/test/bug/tint/294.wgsl.expected.wgsl b/test/bug/tint/294.wgsl.expected.wgsl index f4c1358137..87f08def7d 100644 --- a/test/bug/tint/294.wgsl.expected.wgsl +++ b/test/bug/tint/294.wgsl.expected.wgsl @@ -4,7 +4,7 @@ struct Light { } struct Lights { - light : [[stride(32)]] array; + light : @stride(32) array; } -[[group(0), binding(1)]] var lights : Lights; +@group(0) @binding(1) var lights : Lights; diff --git a/test/bug/tint/369.wgsl b/test/bug/tint/369.wgsl index 05386cb449..00383ab22f 100644 --- a/test/bug/tint/369.wgsl +++ b/test/bug/tint/369.wgsl @@ -2,5 +2,5 @@ m : mat2x2; }; -[[group(0), binding(0)]] var SSBO : S; -[[group(0), binding(0)]] var UBO : S; +@group(0) @binding(0) var SSBO : S; +@group(0) @binding(0) var UBO : S; diff --git a/test/bug/tint/369.wgsl.expected.wgsl b/test/bug/tint/369.wgsl.expected.wgsl index f4192a7741..b361b1f2c2 100644 --- a/test/bug/tint/369.wgsl.expected.wgsl +++ b/test/bug/tint/369.wgsl.expected.wgsl @@ -2,6 +2,6 @@ struct S { m : mat2x2; } -[[group(0), binding(0)]] var SSBO : S; +@group(0) @binding(0) var SSBO : S; -[[group(0), binding(0)]] var UBO : S; +@group(0) @binding(0) var UBO : S; diff --git a/test/bug/tint/403.wgsl b/test/bug/tint/403.wgsl index 011fbf0076..82d5e91fa4 100644 --- a/test/bug/tint/403.wgsl +++ b/test/bug/tint/403.wgsl @@ -6,12 +6,12 @@ struct vertexUniformBuffer2 { transform2 : mat2x2; }; -[[group(0), binding(0)]] var x_20 : vertexUniformBuffer1; -[[group(1), binding(0)]] var x_26 : vertexUniformBuffer2; +@group(0) @binding(0) var x_20 : vertexUniformBuffer1; +@group(1) @binding(0) var x_26 : vertexUniformBuffer2; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] gl_VertexIndex : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) gl_VertexIndex : u32) -> @builtin(position) vec4 { var indexable : array, 3>; let x_23 : mat2x2 = x_20.transform1; let x_28 : mat2x2 = x_26.transform2; diff --git a/test/bug/tint/403.wgsl.expected.wgsl b/test/bug/tint/403.wgsl.expected.wgsl index 2fa1f18489..025e4a50e0 100644 --- a/test/bug/tint/403.wgsl.expected.wgsl +++ b/test/bug/tint/403.wgsl.expected.wgsl @@ -6,12 +6,12 @@ struct vertexUniformBuffer2 { transform2 : mat2x2; } -[[group(0), binding(0)]] var x_20 : vertexUniformBuffer1; +@group(0) @binding(0) var x_20 : vertexUniformBuffer1; -[[group(1), binding(0)]] var x_26 : vertexUniformBuffer2; +@group(1) @binding(0) var x_26 : vertexUniformBuffer2; -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] gl_VertexIndex : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) gl_VertexIndex : u32) -> @builtin(position) vec4 { var indexable : array, 3>; let x_23 : mat2x2 = x_20.transform1; let x_28 : mat2x2 = x_26.transform2; diff --git a/test/bug/tint/413.spvasm.expected.wgsl b/test/bug/tint/413.spvasm.expected.wgsl index 6ca1a05740..a9318dcfd9 100644 --- a/test/bug/tint/413.spvasm.expected.wgsl +++ b/test/bug/tint/413.spvasm.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var Src : texture_2d; +@group(0) @binding(0) var Src : texture_2d; -[[group(0), binding(1)]] var Dst : texture_storage_2d; +@group(0) @binding(1) var Dst : texture_storage_2d; fn main_1() { var srcValue : vec4; @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/bug/tint/453.wgsl b/test/bug/tint/453.wgsl index 588e7c2a89..99e53b4c19 100644 --- a/test/bug/tint/453.wgsl +++ b/test/bug/tint/453.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] var Src : texture_2d; -[[group(0), binding(1)]] var Dst : texture_storage_2d; +@group(0) @binding(0) var Src : texture_2d; +@group(0) @binding(1) var Dst : texture_storage_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var srcValue : vec4; let x_22 : vec4 = textureLoad(Src, vec2(0, 0), 0); diff --git a/test/bug/tint/453.wgsl.expected.wgsl b/test/bug/tint/453.wgsl.expected.wgsl index 92c30e7b1d..8fe57951c8 100644 --- a/test/bug/tint/453.wgsl.expected.wgsl +++ b/test/bug/tint/453.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var Src : texture_2d; +@group(0) @binding(0) var Src : texture_2d; -[[group(0), binding(1)]] var Dst : texture_storage_2d; +@group(0) @binding(1) var Dst : texture_storage_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var srcValue : vec4; let x_22 : vec4 = textureLoad(Src, vec2(0, 0), 0); diff --git a/test/bug/tint/492.wgsl b/test/bug/tint/492.wgsl index bbba0aa8a3..48ae3df84e 100644 --- a/test/bug/tint/492.wgsl +++ b/test/bug/tint/492.wgsl @@ -1,7 +1,7 @@ struct S { a : i32; }; -[[group(0), binding(0)]] var buf : S; +@group(0) @binding(0) var buf : S; -[[stage(compute), workgroup_size(1)]] fn main() { +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &buf.a; *p = 12; } diff --git a/test/bug/tint/492.wgsl.expected.wgsl b/test/bug/tint/492.wgsl.expected.wgsl index 6563f70603..181e7e6c8a 100644 --- a/test/bug/tint/492.wgsl.expected.wgsl +++ b/test/bug/tint/492.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : i32; } -[[group(0), binding(0)]] var buf : S; +@group(0) @binding(0) var buf : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &(buf.a); *(p) = 12; diff --git a/test/bug/tint/534.wgsl b/test/bug/tint/534.wgsl index 1aaf535536..782f193182 100644 --- a/test/bug/tint/534.wgsl +++ b/test/bug/tint/534.wgsl @@ -5,21 +5,21 @@ channelCount : u32; }; struct OutputBuf { - result : [[stride(4)]] array; + result : @stride(4) array; }; -[[group(0), binding(0)]] var src : texture_2d; -[[group(0), binding(1)]] var dst : texture_2d; -[[group(0), binding(2)]] var output : OutputBuf; -[[group(0), binding(3)]] var uniforms : Uniforms; -//[[builtin(global_invocation_id)]] var GlobalInvocationID : vec3; +@group(0) @binding(0) var src : texture_2d; +@group(0) @binding(1) var dst : texture_2d; +@group(0) @binding(2) var output : OutputBuf; +@group(0) @binding(3) var uniforms : Uniforms; +//@builtin(global_invocation_id) var GlobalInvocationID : vec3; // Fp16 logic // Infinity and NaN won't happen in this test case. fn ConvertToFp16FloatValue(fp32 : f32) -> u32 { return 1u; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var size : vec2 = textureDimensions(src); var dstTexCoord : vec2 = vec2(GlobalInvocationID.xy); var srcTexCoord : vec2 = dstTexCoord; diff --git a/test/bug/tint/534.wgsl.expected.wgsl b/test/bug/tint/534.wgsl.expected.wgsl index bc45f8a754..dfd0f173b6 100644 --- a/test/bug/tint/534.wgsl.expected.wgsl +++ b/test/bug/tint/534.wgsl.expected.wgsl @@ -6,23 +6,23 @@ struct Uniforms { } struct OutputBuf { - result : [[stride(4)]] array; + result : @stride(4) array; } -[[group(0), binding(0)]] var src : texture_2d; +@group(0) @binding(0) var src : texture_2d; -[[group(0), binding(1)]] var dst : texture_2d; +@group(0) @binding(1) var dst : texture_2d; -[[group(0), binding(2)]] var output : OutputBuf; +@group(0) @binding(2) var output : OutputBuf; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(3) var uniforms : Uniforms; fn ConvertToFp16FloatValue(fp32 : f32) -> u32 { return 1u; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var size : vec2 = textureDimensions(src); var dstTexCoord : vec2 = vec2(GlobalInvocationID.xy); var srcTexCoord : vec2 = dstTexCoord; diff --git a/test/bug/tint/744.wgsl b/test/bug/tint/744.wgsl index c8c8cd2e25..31daa13e77 100644 --- a/test/bug/tint/744.wgsl +++ b/test/bug/tint/744.wgsl @@ -7,13 +7,13 @@ numbers: array; }; -[[group(0), binding(0)]] var firstMatrix : Matrix; -[[group(0), binding(1)]] var secondMatrix : Matrix; -[[group(0), binding(2)]] var resultMatrix : Matrix; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(0) var firstMatrix : Matrix; +@group(0) @binding(1) var secondMatrix : Matrix; +@group(0) @binding(2) var resultMatrix : Matrix; +@group(0) @binding(3) var uniforms : Uniforms; -[[stage(compute), workgroup_size(2,2,1)]] -fn main([[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(2,2,1) +fn main(@builtin(global_invocation_id) global_id : vec3) { let resultCell : vec2 = vec2(global_id.y, global_id.x); let dimInner : u32 = uniforms.aShape.y; let dimOutter: u32 = uniforms.outShape.y; diff --git a/test/bug/tint/744.wgsl.expected.wgsl b/test/bug/tint/744.wgsl.expected.wgsl index 001dd88796..e670d8087c 100644 --- a/test/bug/tint/744.wgsl.expected.wgsl +++ b/test/bug/tint/744.wgsl.expected.wgsl @@ -8,16 +8,16 @@ struct Matrix { numbers : array; } -[[group(0), binding(0)]] var firstMatrix : Matrix; +@group(0) @binding(0) var firstMatrix : Matrix; -[[group(0), binding(1)]] var secondMatrix : Matrix; +@group(0) @binding(1) var secondMatrix : Matrix; -[[group(0), binding(2)]] var resultMatrix : Matrix; +@group(0) @binding(2) var resultMatrix : Matrix; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(3) var uniforms : Uniforms; -[[stage(compute), workgroup_size(2, 2, 1)]] -fn main([[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(2, 2, 1) +fn main(@builtin(global_invocation_id) global_id : vec3) { let resultCell : vec2 = vec2(global_id.y, global_id.x); let dimInner : u32 = uniforms.aShape.y; let dimOutter : u32 = uniforms.outShape.y; diff --git a/test/bug/tint/749.spvasm.expected.wgsl b/test/bug/tint/749.spvasm.expected.wgsl index 59e192045a..f23b4950c2 100644 --- a/test/bug/tint/749.spvasm.expected.wgsl +++ b/test/bug/tint/749.spvasm.expected.wgsl @@ -10,7 +10,7 @@ var obj : QuicksortObject; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_188 : buf0; +@group(0) @binding(0) var x_188 : buf0; var x_GLF_color : vec4; @@ -1474,12 +1474,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; } -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/bug/tint/757.wgsl b/test/bug/tint/757.wgsl index c5aca24e3b..b2a05dedaf 100644 --- a/test/bug/tint/757.wgsl +++ b/test/bug/tint/757.wgsl @@ -3,16 +3,16 @@ level : i32; }; -[[group(0), binding(0)]] var constants : Constants; -[[group(0), binding(1)]] var myTexture : texture_2d_array; +@group(0) @binding(0) var constants : Constants; +@group(0) @binding(1) var myTexture : texture_2d_array; struct Result { - values : [[stride(4)]] array; + values : @stride(4) array; }; -[[group(0), binding(3)]] var result : Result; +@group(0) @binding(3) var result : Result; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var flatIndex : u32 = 2u * 2u * GlobalInvocationID.z + 2u * GlobalInvocationID.y + diff --git a/test/bug/tint/757.wgsl.expected.wgsl b/test/bug/tint/757.wgsl.expected.wgsl index b19bb0cf78..b237cd58cf 100644 --- a/test/bug/tint/757.wgsl.expected.wgsl +++ b/test/bug/tint/757.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct Constants { level : i32; } -[[group(0), binding(0)]] var constants : Constants; +@group(0) @binding(0) var constants : Constants; -[[group(0), binding(1)]] var myTexture : texture_2d_array; +@group(0) @binding(1) var myTexture : texture_2d_array; struct Result { - values : [[stride(4)]] array; + values : @stride(4) array; } -[[group(0), binding(3)]] var result : Result; +@group(0) @binding(3) var result : Result; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { var flatIndex : u32 = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x); flatIndex = (flatIndex * 1u); var texel : vec4 = textureLoad(myTexture, vec2(GlobalInvocationID.xy), 0, 0); diff --git a/test/bug/tint/782.wgsl b/test/bug/tint/782.wgsl index dbfcb00785..3fe1f23266 100644 --- a/test/bug/tint/782.wgsl +++ b/test/bug/tint/782.wgsl @@ -1,4 +1,4 @@ -type ArrayExplicitStride = [[stride(4)]] array; +type ArrayExplicitStride = @stride(4) array; type ArrayImplicitStride = array; fn foo() { diff --git a/test/bug/tint/782.wgsl.expected.wgsl b/test/bug/tint/782.wgsl.expected.wgsl index 2719237d78..a4f37bcc44 100644 --- a/test/bug/tint/782.wgsl.expected.wgsl +++ b/test/bug/tint/782.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -type ArrayExplicitStride = [[stride(4)]] array; +type ArrayExplicitStride = @stride(4) array; type ArrayImplicitStride = array; diff --git a/test/bug/tint/804.spv.expected.glsl b/test/bug/tint/804.spv.expected.glsl index f94b4a6c78..85b35ecfe5 100644 --- a/test/bug/tint/804.spv.expected.glsl +++ b/test/bug/tint/804.spv.expected.glsl @@ -10,7 +10,7 @@ struct S { field1 : u32; }; -[[group(0), binding(0)]] var x_75 : buf0; +@group(0) @binding(0) var x_75 : buf0; var gl_FragCoord : vec4; diff --git a/test/bug/tint/804.spv.expected.hlsl b/test/bug/tint/804.spv.expected.hlsl index f94b4a6c78..85b35ecfe5 100644 --- a/test/bug/tint/804.spv.expected.hlsl +++ b/test/bug/tint/804.spv.expected.hlsl @@ -10,7 +10,7 @@ struct S { field1 : u32; }; -[[group(0), binding(0)]] var x_75 : buf0; +@group(0) @binding(0) var x_75 : buf0; var gl_FragCoord : vec4; diff --git a/test/bug/tint/824.wgsl b/test/bug/tint/824.wgsl index ed907e3702..68a7b66301 100644 --- a/test/bug/tint/824.wgsl +++ b/test/bug/tint/824.wgsl @@ -1,10 +1,10 @@ struct Output { - [[builtin(position)]] Position : vec4; - [[location(0)]] color : vec4; + @builtin(position) Position : vec4; + @location(0) color : vec4; }; -[[stage(vertex)]] fn main( - [[builtin(vertex_index)]] VertexIndex : u32, - [[builtin(instance_index)]] InstanceIndex : u32) -> Output { +@stage(vertex) fn main( + @builtin(vertex_index) VertexIndex : u32, + @builtin(instance_index) InstanceIndex : u32) -> Output { // TODO: remove workaround for Tint unary array access broke let zv : array, 4> = array, 4>( vec2(0.2, 0.2), diff --git a/test/bug/tint/824.wgsl.expected.wgsl b/test/bug/tint/824.wgsl.expected.wgsl index 2c795fe1bb..cb77758556 100644 --- a/test/bug/tint/824.wgsl.expected.wgsl +++ b/test/bug/tint/824.wgsl.expected.wgsl @@ -1,12 +1,12 @@ struct Output { - [[builtin(position)]] + @builtin(position) Position : vec4; - [[location(0)]] + @location(0) color : vec4; } -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] VertexIndex : u32, [[builtin(instance_index)]] InstanceIndex : u32) -> Output { +@stage(vertex) +fn main(@builtin(vertex_index) VertexIndex : u32, @builtin(instance_index) InstanceIndex : u32) -> Output { let zv : array, 4> = array, 4>(vec2(0.200000003, 0.200000003), vec2(0.300000012, 0.300000012), vec2(-0.100000001, -0.100000001), vec2(1.100000024, 1.100000024)); let z : f32 = zv[InstanceIndex].x; var output : Output; diff --git a/test/bug/tint/827.wgsl b/test/bug/tint/827.wgsl index 35fa8db488..8a1bbe8ae8 100644 --- a/test/bug/tint/827.wgsl +++ b/test/bug/tint/827.wgsl @@ -4,11 +4,11 @@ let width : u32 = 128u; -[[group(0), binding(0)]] var tex : texture_depth_2d; -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(0) var tex : texture_depth_2d; +@group(0) @binding(1) var result : Result; -[[stage(compute), workgroup_size(1)]] fn main( - [[builtin(global_invocation_id)]] GlobalInvocationId : vec3 +@stage(compute) @workgroup_size(1) fn main( + @builtin(global_invocation_id) GlobalInvocationId : vec3 ) { result.values[GlobalInvocationId.y * width + GlobalInvocationId.x] = textureLoad( tex, vec2(i32(GlobalInvocationId.x), i32(GlobalInvocationId.y)), 0); diff --git a/test/bug/tint/827.wgsl.expected.wgsl b/test/bug/tint/827.wgsl.expected.wgsl index af06757fc1..2f7d250fef 100644 --- a/test/bug/tint/827.wgsl.expected.wgsl +++ b/test/bug/tint/827.wgsl.expected.wgsl @@ -4,11 +4,11 @@ struct Result { let width : u32 = 128u; -[[group(0), binding(0)]] var tex : texture_depth_2d; +@group(0) @binding(0) var tex : texture_depth_2d; -[[group(0), binding(1)]] var result : Result; +@group(0) @binding(1) var result : Result; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationId : vec3) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(global_invocation_id) GlobalInvocationId : vec3) { result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = textureLoad(tex, vec2(i32(GlobalInvocationId.x), i32(GlobalInvocationId.y)), 0); } diff --git a/test/bug/tint/870.spvasm.expected.wgsl b/test/bug/tint/870.spvasm.expected.wgsl index 73a04d4589..4af74ac3d4 100644 --- a/test/bug/tint/870.spvasm.expected.wgsl +++ b/test/bug/tint/870.spvasm.expected.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(4)]] array; +type Arr = @stride(4) array; struct sspp962805860buildInformationS { footprint : vec4; @@ -11,7 +11,7 @@ struct x_B4_BuildInformation { passthru : sspp962805860buildInformationS; } -[[group(0), binding(2)]] var sspp962805860buildInformation : x_B4_BuildInformation; +@group(0) @binding(2) var sspp962805860buildInformation : x_B4_BuildInformation; fn main_1() { var orientation : array; @@ -25,7 +25,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/bug/tint/913.wgsl b/test/bug/tint/913.wgsl index 2df489fdca..8a49cedf83 100644 --- a/test/bug/tint/913.wgsl +++ b/test/bug/tint/913.wgsl @@ -8,16 +8,16 @@ struct OutputBuf { result : array; }; -[[group(0), binding(0)]] var src : texture_2d; -[[group(0), binding(1)]] var dst : texture_2d; -[[group(0), binding(2)]] var output : OutputBuf; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(0) var src : texture_2d; +@group(0) @binding(1) var dst : texture_2d; +@group(0) @binding(2) var output : OutputBuf; +@group(0) @binding(3) var uniforms : Uniforms; fn aboutEqual(value : f32, expect : f32) -> bool { // The value diff should be smaller than the hard coded tolerance. return abs(value - expect) < 0.001; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { let srcSize : vec2 = textureDimensions(src); let dstSize : vec2 = textureDimensions(dst); let dstTexCoord : vec2 = vec2(GlobalInvocationID.xy); @@ -67,4 +67,4 @@ fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { } else { output.result[outputIndex] = 0u; } -} \ No newline at end of file +} diff --git a/test/bug/tint/913.wgsl.expected.wgsl b/test/bug/tint/913.wgsl.expected.wgsl index 322d0b1c0f..9c302503d0 100644 --- a/test/bug/tint/913.wgsl.expected.wgsl +++ b/test/bug/tint/913.wgsl.expected.wgsl @@ -10,20 +10,20 @@ struct OutputBuf { result : array; } -[[group(0), binding(0)]] var src : texture_2d; +@group(0) @binding(0) var src : texture_2d; -[[group(0), binding(1)]] var dst : texture_2d; +@group(0) @binding(1) var dst : texture_2d; -[[group(0), binding(2)]] var output : OutputBuf; +@group(0) @binding(2) var output : OutputBuf; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(3) var uniforms : Uniforms; fn aboutEqual(value : f32, expect : f32) -> bool { return (abs((value - expect)) < 0.001); } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) GlobalInvocationID : vec3) { let srcSize : vec2 = textureDimensions(src); let dstSize : vec2 = textureDimensions(dst); let dstTexCoord : vec2 = vec2(GlobalInvocationID.xy); diff --git a/test/bug/tint/914.wgsl b/test/bug/tint/914.wgsl index 372e0d1f62..655c3ab584 100644 --- a/test/bug/tint/914.wgsl +++ b/test/bug/tint/914.wgsl @@ -7,10 +7,10 @@ numbers: array; }; -[[group(0), binding(0)]] var firstMatrix : Matrix; -[[group(0), binding(1)]] var secondMatrix : Matrix; -[[group(0), binding(2)]] var resultMatrix : Matrix; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(0) var firstMatrix : Matrix; +@group(0) @binding(1) var secondMatrix : Matrix; +@group(0) @binding(2) var resultMatrix : Matrix; +@group(0) @binding(3) var uniforms : Uniforms; fn mm_readA(row : u32, col : u32) -> f32 { if (row < uniforms.dimAOuter && col < uniforms.dimInner) @@ -45,9 +45,9 @@ let TileBOuter : u32 = 64u; let TileInner : u32 = 64u; var mm_Asub : array, 64>; var mm_Bsub : array, 64>; -[[stage(compute), workgroup_size(16, 16, 1)]] -fn main([[builtin(local_invocation_id)]] local_id : vec3, - [[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(16, 16, 1) +fn main(@builtin(local_invocation_id) local_id : vec3, + @builtin(global_invocation_id) global_id : vec3) { let tileRow : u32 = local_id.y * RowPerThread; let tileCol : u32 = local_id.x * ColPerThread; @@ -120,4 +120,4 @@ fn main([[builtin(local_invocation_id)]] local_id : vec3, acc[index]); } } -} \ No newline at end of file +} diff --git a/test/bug/tint/914.wgsl.expected.wgsl b/test/bug/tint/914.wgsl.expected.wgsl index bfa7c61a3e..7d88d77a7e 100644 --- a/test/bug/tint/914.wgsl.expected.wgsl +++ b/test/bug/tint/914.wgsl.expected.wgsl @@ -8,13 +8,13 @@ struct Matrix { numbers : array; } -[[group(0), binding(0)]] var firstMatrix : Matrix; +@group(0) @binding(0) var firstMatrix : Matrix; -[[group(0), binding(1)]] var secondMatrix : Matrix; +@group(0) @binding(1) var secondMatrix : Matrix; -[[group(0), binding(2)]] var resultMatrix : Matrix; +@group(0) @binding(2) var resultMatrix : Matrix; -[[group(0), binding(3)]] var uniforms : Uniforms; +@group(0) @binding(3) var uniforms : Uniforms; fn mm_readA(row : u32, col : u32) -> f32 { if (((row < uniforms.dimAOuter) && (col < uniforms.dimInner))) { @@ -53,8 +53,8 @@ var mm_Asub : array, 64>; var mm_Bsub : array, 64>; -[[stage(compute), workgroup_size(16, 16, 1)]] -fn main([[builtin(local_invocation_id)]] local_id : vec3, [[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(16, 16, 1) +fn main(@builtin(local_invocation_id) local_id : vec3, @builtin(global_invocation_id) global_id : vec3) { let tileRow : u32 = (local_id.y * RowPerThread); let tileCol : u32 = (local_id.x * ColPerThread); let globalRow : u32 = (global_id.y * RowPerThread); diff --git a/test/bug/tint/922.wgsl b/test/bug/tint/922.wgsl index 0d334f2b2a..450aba182b 100644 --- a/test/bug/tint/922.wgsl +++ b/test/bug/tint/922.wgsl @@ -21,25 +21,25 @@ struct ub_SceneParams { }; struct ub_MaterialParams { - u_TexMtx: [[stride(32)]] array; + u_TexMtx: @stride(32) array; u_Misc0_: vec4; }; struct ub_PacketParams { - u_PosMtx: [[stride(48)]] array; + u_PosMtx: @stride(48) array; }; struct VertexOutput { - [[location(0)]] v_Color: vec4; - [[location(1)]] v_TexCoord: vec2; - [[builtin(position)]] member: vec4; + @location(0) v_Color: vec4; + @location(1) v_TexCoord: vec2; + @builtin(position) member: vec4; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var global: ub_SceneParams; -[[group(0), binding(1)]] +@group(0) @binding(1) var global1: ub_MaterialParams; -[[group(0), binding(2)]] +@group(0) @binding(2) var global2: ub_PacketParams; var a_Position1: vec3; var a_UV1: vec2; @@ -283,8 +283,8 @@ fn main1() { } } -[[stage(vertex)]] -fn main([[location(0)]] a_Position: vec3, [[location(1)]] a_UV: vec2, [[location(2)]] a_Color: vec4, [[location(3)]] a_Normal: vec3, [[location(4)]] a_PosMtxIdx: f32) -> VertexOutput { +@stage(vertex) +fn main(@location(0) a_Position: vec3, @location(1) a_UV: vec2, @location(2) a_Color: vec4, @location(3) a_Normal: vec3, @location(4) a_PosMtxIdx: f32) -> VertexOutput { a_Position1 = a_Position; a_UV1 = a_UV; a_Color1 = a_Color; diff --git a/test/bug/tint/922.wgsl.expected.wgsl b/test/bug/tint/922.wgsl.expected.wgsl index 82929da447..ac8b48c438 100644 --- a/test/bug/tint/922.wgsl.expected.wgsl +++ b/test/bug/tint/922.wgsl.expected.wgsl @@ -21,28 +21,28 @@ struct ub_SceneParams { } struct ub_MaterialParams { - u_TexMtx : [[stride(32)]] array; + u_TexMtx : @stride(32) array; u_Misc0_ : vec4; } struct ub_PacketParams { - u_PosMtx : [[stride(48)]] array; + u_PosMtx : @stride(48) array; } struct VertexOutput { - [[location(0)]] + @location(0) v_Color : vec4; - [[location(1)]] + @location(1) v_TexCoord : vec2; - [[builtin(position)]] + @builtin(position) member : vec4; } -[[group(0), binding(0)]] var global : ub_SceneParams; +@group(0) @binding(0) var global : ub_SceneParams; -[[group(0), binding(1)]] var global1 : ub_MaterialParams; +@group(0) @binding(1) var global1 : ub_MaterialParams; -[[group(0), binding(2)]] var global2 : ub_PacketParams; +@group(0) @binding(2) var global2 : ub_PacketParams; var a_Position1 : vec3; @@ -279,8 +279,8 @@ fn main1() { } } -[[stage(vertex)]] -fn main([[location(0)]] a_Position : vec3, [[location(1)]] a_UV : vec2, [[location(2)]] a_Color : vec4, [[location(3)]] a_Normal : vec3, [[location(4)]] a_PosMtxIdx : f32) -> VertexOutput { +@stage(vertex) +fn main(@location(0) a_Position : vec3, @location(1) a_UV : vec2, @location(2) a_Color : vec4, @location(3) a_Normal : vec3, @location(4) a_PosMtxIdx : f32) -> VertexOutput { a_Position1 = a_Position; a_UV1 = a_UV; a_Color1 = a_Color; diff --git a/test/bug/tint/926.wgsl b/test/bug/tint/926.wgsl index b308f5a41c..652d19678d 100644 --- a/test/bug/tint/926.wgsl +++ b/test/bug/tint/926.wgsl @@ -1,12 +1,12 @@ struct DrawIndirectArgs { vertexCount : atomic; }; -[[group(0), binding(5)]] var drawOut : DrawIndirectArgs; +@group(0) @binding(5) var drawOut : DrawIndirectArgs; var cubeVerts : u32 = 0u; -[[stage(compute), workgroup_size(1)]] -fn computeMain([[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(1) +fn computeMain(@builtin(global_invocation_id) global_id : vec3) { // Increment cubeVerts based on some criteria... // This fails SPIR-V validation diff --git a/test/bug/tint/926.wgsl.expected.wgsl b/test/bug/tint/926.wgsl.expected.wgsl index 978979b6e0..6af7afb8de 100644 --- a/test/bug/tint/926.wgsl.expected.wgsl +++ b/test/bug/tint/926.wgsl.expected.wgsl @@ -2,11 +2,11 @@ struct DrawIndirectArgs { vertexCount : atomic; } -[[group(0), binding(5)]] var drawOut : DrawIndirectArgs; +@group(0) @binding(5) var drawOut : DrawIndirectArgs; var cubeVerts : u32 = 0u; -[[stage(compute), workgroup_size(1)]] -fn computeMain([[builtin(global_invocation_id)]] global_id : vec3) { +@stage(compute) @workgroup_size(1) +fn computeMain(@builtin(global_invocation_id) global_id : vec3) { let firstVertex : u32 = atomicAdd(&(drawOut.vertexCount), cubeVerts); } diff --git a/test/bug/tint/942.wgsl b/test/bug/tint/942.wgsl index eb2ae532af..273dc53207 100644 --- a/test/bug/tint/942.wgsl +++ b/test/bug/tint/942.wgsl @@ -3,15 +3,15 @@ blockDim : u32; }; -[[group(0), binding(0)]] var samp : sampler; -[[group(0), binding(1)]] var params : Params; -[[group(1), binding(1)]] var inputTex : texture_2d; -[[group(1), binding(2)]] var outputTex : texture_storage_2d; +@group(0) @binding(0) var samp : sampler; +@group(0) @binding(1) var params : Params; +@group(1) @binding(1) var inputTex : texture_2d; +@group(1) @binding(2) var outputTex : texture_storage_2d; struct Flip { value : u32; }; -[[group(1), binding(3)]] var flip : Flip; +@group(1) @binding(3) var flip : Flip; // This shader blurs the input texture in one direction, depending on whether // |flip.value| is 0 or 1. @@ -29,10 +29,10 @@ var tile : array, 256>, 4>; -[[stage(compute), workgroup_size(64, 1, 1)]] +@stage(compute) @workgroup_size(64, 1, 1) fn main( - [[builtin(workgroup_id)]] WorkGroupID : vec3, - [[builtin(local_invocation_id)]] LocalInvocationID : vec3 + @builtin(workgroup_id) WorkGroupID : vec3, + @builtin(local_invocation_id) LocalInvocationID : vec3 ) { let filterOffset : u32 = (params.filterDim - 1u) / 2u; let dims : vec2 = textureDimensions(inputTex, 0); diff --git a/test/bug/tint/942.wgsl.expected.wgsl b/test/bug/tint/942.wgsl.expected.wgsl index 827326f072..5fb7d1bafb 100644 --- a/test/bug/tint/942.wgsl.expected.wgsl +++ b/test/bug/tint/942.wgsl.expected.wgsl @@ -3,24 +3,24 @@ struct Params { blockDim : u32; } -[[group(0), binding(0)]] var samp : sampler; +@group(0) @binding(0) var samp : sampler; -[[group(0), binding(1)]] var params : Params; +@group(0) @binding(1) var params : Params; -[[group(1), binding(1)]] var inputTex : texture_2d; +@group(1) @binding(1) var inputTex : texture_2d; -[[group(1), binding(2)]] var outputTex : texture_storage_2d; +@group(1) @binding(2) var outputTex : texture_storage_2d; struct Flip { value : u32; } -[[group(1), binding(3)]] var flip : Flip; +@group(1) @binding(3) var flip : Flip; var tile : array, 256>, 4>; -[[stage(compute), workgroup_size(64, 1, 1)]] -fn main([[builtin(workgroup_id)]] WorkGroupID : vec3, [[builtin(local_invocation_id)]] LocalInvocationID : vec3) { +@stage(compute) @workgroup_size(64, 1, 1) +fn main(@builtin(workgroup_id) WorkGroupID : vec3, @builtin(local_invocation_id) LocalInvocationID : vec3) { let filterOffset : u32 = ((params.filterDim - 1u) / 2u); let dims : vec2 = textureDimensions(inputTex, 0); let baseIndex = (vec2(((WorkGroupID.xy * vec2(params.blockDim, 4u)) + (LocalInvocationID.xy * vec2(4u, 1u)))) - vec2(i32(filterOffset), 0)); diff --git a/test/bug/tint/943.spvasm.expected.wgsl b/test/bug/tint/943.spvasm.expected.wgsl index 04699ddd81..ea2d6ade12 100644 --- a/test/bug/tint/943.spvasm.expected.wgsl +++ b/test/bug/tint/943.spvasm.expected.wgsl @@ -1,28 +1,28 @@ struct Uniforms { NAN : f32; - [[size(12)]] + @size(12) padding : u32; aShape : vec3; - [[size(4)]] + @size(4) padding_1 : u32; bShape : vec3; - [[size(4)]] + @size(4) padding_2 : u32; outShape : vec3; - [[size(4)]] + @size(4) padding_3 : u32; outShapeStrides : vec2; } -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; -type RTArr_1 = [[stride(4)]] array; +type RTArr_1 = @stride(4) array; struct ssbOut { result : RTArr_1; } -type RTArr_2 = [[stride(4)]] array; +type RTArr_2 = @stride(4) array; struct ssbA { A : RTArr_1; @@ -34,13 +34,13 @@ struct ssbB { var dimAOuter_1 : i32; -[[group(0), binding(3)]] var x_48 : Uniforms; +@group(0) @binding(3) var x_48 : Uniforms; var dimInner_1 : i32; var dimBOuter_1 : i32; -[[group(0), binding(0)]] var x_54 : ssbOut; +@group(0) @binding(0) var x_54 : ssbOut; var gl_LocalInvocationID : vec3; @@ -50,11 +50,11 @@ var mm_Asub : array, 64u>; var mm_Bsub : array, 64u>; -[[group(0), binding(1)]] var x_165 : ssbA; +@group(0) @binding(1) var x_165 : ssbA; var batch : i32; -[[group(0), binding(2)]] var x_185 : ssbB; +@group(0) @binding(2) var x_185 : ssbB; fn coordsInBounds_vi2_vi2_(coord : ptr>, shape : ptr>) -> bool { var x_87 : bool; @@ -514,8 +514,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 64, 1)]] -fn main([[builtin(local_invocation_id)]] gl_LocalInvocationID_param : vec3, [[builtin(global_invocation_id)]] gl_GlobalInvocationID_param : vec3) { +@stage(compute) @workgroup_size(1, 64, 1) +fn main(@builtin(local_invocation_id) gl_LocalInvocationID_param : vec3, @builtin(global_invocation_id) gl_GlobalInvocationID_param : vec3) { gl_LocalInvocationID = gl_LocalInvocationID_param; gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); diff --git a/test/bug/tint/948.wgsl b/test/bug/tint/948.wgsl index 99056b4215..e07fab9d19 100644 --- a/test/bug/tint/948.wgsl +++ b/test/bug/tint/948.wgsl @@ -1,6 +1,6 @@ struct LeftOver { time : f32; - [[size(12)]] + @size(12) padding : u32; worldViewProjection : mat4x4; outputSize : vec2; @@ -11,29 +11,29 @@ struct LeftOver { colorMul : vec3; }; -[[group(2), binding(9)]] var x_20 : LeftOver; +@group(2) @binding(9) var x_20 : LeftOver; -[[group(2), binding(3)]] var frameMapTexture : texture_2d; +@group(2) @binding(3) var frameMapTexture : texture_2d; -[[group(2), binding(2)]] var frameMapSampler : sampler; +@group(2) @binding(2) var frameMapSampler : sampler; var tUV : vec2; -[[group(2), binding(5)]] var tileMapsTexture0 : texture_2d; +@group(2) @binding(5) var tileMapsTexture0 : texture_2d; -[[group(2), binding(4)]] var tileMapsSampler : sampler; +@group(2) @binding(4) var tileMapsSampler : sampler; -[[group(2), binding(6)]] var tileMapsTexture1 : texture_2d; +@group(2) @binding(6) var tileMapsTexture1 : texture_2d; -[[group(2), binding(8)]] var animationMapTexture : texture_2d; +@group(2) @binding(8) var animationMapTexture : texture_2d; -[[group(2), binding(7)]] var animationMapSampler : sampler; +@group(2) @binding(7) var animationMapSampler : sampler; var mt : f32; -[[group(2), binding(1)]] var spriteSheetTexture : texture_2d; +@group(2) @binding(1) var spriteSheetTexture : texture_2d; -[[group(2), binding(0)]] var spriteSheetSampler : sampler; +@group(2) @binding(0) var spriteSheetSampler : sampler; var glFragColor : vec4; @@ -211,12 +211,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) glFragColor_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(2)]] tUV_param : vec2, [[location(5)]] tileID_1_param : vec2, [[location(4)]] levelUnits_param : vec2, [[location(3)]] stageUnits_1_param : vec2, [[location(0)]] vPosition_param : vec3, [[location(1)]] vUV_param : vec2) -> main_out { +@stage(fragment) +fn main(@location(2) tUV_param : vec2, @location(5) tileID_1_param : vec2, @location(4) levelUnits_param : vec2, @location(3) stageUnits_1_param : vec2, @location(0) vPosition_param : vec3, @location(1) vUV_param : vec2) -> main_out { tUV = tUV_param; tileID_1 = tileID_1_param; levelUnits = levelUnits_param; @@ -225,4 +225,4 @@ fn main([[location(2)]] tUV_param : vec2, [[location(5)]] tileID_1_param : vUV = vUV_param; main_1(); return main_out(glFragColor); -} \ No newline at end of file +} diff --git a/test/bug/tint/948.wgsl.expected.wgsl b/test/bug/tint/948.wgsl.expected.wgsl index d6a66dbeb2..8a4fc7e9c3 100644 --- a/test/bug/tint/948.wgsl.expected.wgsl +++ b/test/bug/tint/948.wgsl.expected.wgsl @@ -1,6 +1,6 @@ struct LeftOver { time : f32; - [[size(12)]] + @size(12) padding : u32; worldViewProjection : mat4x4; outputSize : vec2; @@ -11,29 +11,29 @@ struct LeftOver { colorMul : vec3; } -[[group(2), binding(9)]] var x_20 : LeftOver; +@group(2) @binding(9) var x_20 : LeftOver; -[[group(2), binding(3)]] var frameMapTexture : texture_2d; +@group(2) @binding(3) var frameMapTexture : texture_2d; -[[group(2), binding(2)]] var frameMapSampler : sampler; +@group(2) @binding(2) var frameMapSampler : sampler; var tUV : vec2; -[[group(2), binding(5)]] var tileMapsTexture0 : texture_2d; +@group(2) @binding(5) var tileMapsTexture0 : texture_2d; -[[group(2), binding(4)]] var tileMapsSampler : sampler; +@group(2) @binding(4) var tileMapsSampler : sampler; -[[group(2), binding(6)]] var tileMapsTexture1 : texture_2d; +@group(2) @binding(6) var tileMapsTexture1 : texture_2d; -[[group(2), binding(8)]] var animationMapTexture : texture_2d; +@group(2) @binding(8) var animationMapTexture : texture_2d; -[[group(2), binding(7)]] var animationMapSampler : sampler; +@group(2) @binding(7) var animationMapSampler : sampler; var mt : f32; -[[group(2), binding(1)]] var spriteSheetTexture : texture_2d; +@group(2) @binding(1) var spriteSheetTexture : texture_2d; -[[group(2), binding(0)]] var spriteSheetSampler : sampler; +@group(2) @binding(0) var spriteSheetSampler : sampler; var glFragColor : vec4; @@ -211,12 +211,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) glFragColor_1 : vec4; } -[[stage(fragment)]] -fn main([[location(2)]] tUV_param : vec2, [[location(5)]] tileID_1_param : vec2, [[location(4)]] levelUnits_param : vec2, [[location(3)]] stageUnits_1_param : vec2, [[location(0)]] vPosition_param : vec3, [[location(1)]] vUV_param : vec2) -> main_out { +@stage(fragment) +fn main(@location(2) tUV_param : vec2, @location(5) tileID_1_param : vec2, @location(4) levelUnits_param : vec2, @location(3) stageUnits_1_param : vec2, @location(0) vPosition_param : vec3, @location(1) vUV_param : vec2) -> main_out { tUV = tUV_param; tileID_1 = tileID_1_param; levelUnits = levelUnits_param; diff --git a/test/bug/tint/949.wgsl b/test/bug/tint/949.wgsl index 2d52b91c98..86ca7fc28a 100644 --- a/test/bug/tint/949.wgsl +++ b/test/bug/tint/949.wgsl @@ -8,12 +8,12 @@ struct LeftOver { u_World : mat4x4; u_ViewProjection : mat4x4; u_bumpStrength : f32; - [[size(12)]] + @size(12) padding : u32; u_cameraPosition : vec3; u_parallaxScale : f32; textureInfoName : f32; - [[size(4)]] + @size(4) padding_1 : u32; tangentSpaceParameter0 : vec2; }; @@ -23,7 +23,7 @@ struct Light0 { vLightDiffuse : vec4; vLightSpecular : vec4; vLightGround : vec3; - [[size(4)]] + @size(4) padding_2 : u32; shadowsInfo : vec4; depthValues : vec2; @@ -33,13 +33,13 @@ var u_Float : f32; var u_Color : vec3; -[[group(2), binding(1)]] var TextureSamplerTexture : texture_2d; +@group(2) @binding(1) var TextureSamplerTexture : texture_2d; -[[group(2), binding(0)]] var TextureSamplerSampler : sampler; +@group(2) @binding(0) var TextureSamplerSampler : sampler; var vMainuv : vec2; -[[group(2), binding(6)]] var x_269 : LeftOver; +@group(2) @binding(6) var x_269 : LeftOver; var v_output1 : vec4; @@ -49,17 +49,17 @@ var v_uv : vec2; var v_output2 : vec4; -[[group(2), binding(3)]] var TextureSampler1Texture : texture_2d; +@group(2) @binding(3) var TextureSampler1Texture : texture_2d; -[[group(2), binding(2)]] var TextureSampler1Sampler : sampler; +@group(2) @binding(2) var TextureSampler1Sampler : sampler; -[[group(0), binding(5)]] var light0 : Light0; +@group(0) @binding(5) var light0 : Light0; var glFragColor : vec4; -[[group(2), binding(4)]] var bumpSamplerSampler : sampler; +@group(2) @binding(4) var bumpSamplerSampler : sampler; -[[group(2), binding(5)]] var bumpSamplerTexture : texture_2d; +@group(2) @binding(5) var bumpSamplerTexture : texture_2d; fn cotangent_frame_vf3_vf3_vf2_vf2_(normal_1 : ptr>, p : ptr>, uv : ptr>, tangentSpaceParams : ptr>) -> mat3x3 { var dp1 : vec3; @@ -437,12 +437,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) glFragColor_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(1)]] vMainuv_param : vec2, [[location(0)]] v_output1_param : vec4, [[builtin(front_facing)]] gl_FrontFacing_param : bool, [[location(3)]] v_uv_param : vec2, [[location(2)]] v_output2_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(1) vMainuv_param : vec2, @location(0) v_output1_param : vec4, @builtin(front_facing) gl_FrontFacing_param : bool, @location(3) v_uv_param : vec2, @location(2) v_output2_param : vec4) -> main_out { vMainuv = vMainuv_param; v_output1 = v_output1_param; gl_FrontFacing = gl_FrontFacing_param; @@ -450,4 +450,4 @@ fn main([[location(1)]] vMainuv_param : vec2, [[location(0)]] v_output1_par v_output2 = v_output2_param; main_1(); return main_out(glFragColor); -} \ No newline at end of file +} diff --git a/test/bug/tint/949.wgsl.expected.wgsl b/test/bug/tint/949.wgsl.expected.wgsl index 8bbc8076b6..e374119af8 100644 --- a/test/bug/tint/949.wgsl.expected.wgsl +++ b/test/bug/tint/949.wgsl.expected.wgsl @@ -7,12 +7,12 @@ struct LeftOver { u_World : mat4x4; u_ViewProjection : mat4x4; u_bumpStrength : f32; - [[size(12)]] + @size(12) padding : u32; u_cameraPosition : vec3; u_parallaxScale : f32; textureInfoName : f32; - [[size(4)]] + @size(4) padding_1 : u32; tangentSpaceParameter0 : vec2; } @@ -22,7 +22,7 @@ struct Light0 { vLightDiffuse : vec4; vLightSpecular : vec4; vLightGround : vec3; - [[size(4)]] + @size(4) padding_2 : u32; shadowsInfo : vec4; depthValues : vec2; @@ -32,13 +32,13 @@ var u_Float : f32; var u_Color : vec3; -[[group(2), binding(1)]] var TextureSamplerTexture : texture_2d; +@group(2) @binding(1) var TextureSamplerTexture : texture_2d; -[[group(2), binding(0)]] var TextureSamplerSampler : sampler; +@group(2) @binding(0) var TextureSamplerSampler : sampler; var vMainuv : vec2; -[[group(2), binding(6)]] var x_269 : LeftOver; +@group(2) @binding(6) var x_269 : LeftOver; var v_output1 : vec4; @@ -48,17 +48,17 @@ var v_uv : vec2; var v_output2 : vec4; -[[group(2), binding(3)]] var TextureSampler1Texture : texture_2d; +@group(2) @binding(3) var TextureSampler1Texture : texture_2d; -[[group(2), binding(2)]] var TextureSampler1Sampler : sampler; +@group(2) @binding(2) var TextureSampler1Sampler : sampler; -[[group(0), binding(5)]] var light0 : Light0; +@group(0) @binding(5) var light0 : Light0; var glFragColor : vec4; -[[group(2), binding(4)]] var bumpSamplerSampler : sampler; +@group(2) @binding(4) var bumpSamplerSampler : sampler; -[[group(2), binding(5)]] var bumpSamplerTexture : texture_2d; +@group(2) @binding(5) var bumpSamplerTexture : texture_2d; fn cotangent_frame_vf3_vf3_vf2_vf2_(normal_1 : ptr>, p : ptr>, uv : ptr>, tangentSpaceParams : ptr>) -> mat3x3 { var dp1 : vec3; @@ -436,12 +436,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) glFragColor_1 : vec4; } -[[stage(fragment)]] -fn main([[location(1)]] vMainuv_param : vec2, [[location(0)]] v_output1_param : vec4, [[builtin(front_facing)]] gl_FrontFacing_param : bool, [[location(3)]] v_uv_param : vec2, [[location(2)]] v_output2_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(1) vMainuv_param : vec2, @location(0) v_output1_param : vec4, @builtin(front_facing) gl_FrontFacing_param : bool, @location(3) v_uv_param : vec2, @location(2) v_output2_param : vec4) -> main_out { vMainuv = vMainuv_param; v_output1 = v_output1_param; gl_FrontFacing = gl_FrontFacing_param; diff --git a/test/bug/tint/951.spvasm.expected.wgsl b/test/bug/tint/951.spvasm.expected.wgsl index f80adea0e9..63fd79ea60 100644 --- a/test/bug/tint/951.spvasm.expected.wgsl +++ b/test/bug/tint/951.spvasm.expected.wgsl @@ -1,6 +1,6 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; -type RTArr_1 = [[stride(4)]] array; +type RTArr_1 = @stride(4) array; struct ssbOut { result : RTArr_1; @@ -18,13 +18,13 @@ struct Uniforms { size : i32; } -[[group(0), binding(0)]] var x_16 : ssbOut; +@group(0) @binding(0) var x_16 : ssbOut; -[[group(0), binding(1)]] var x_20 : ssbA; +@group(0) @binding(1) var x_20 : ssbA; var gl_GlobalInvocationID : vec3; -[[group(0), binding(2)]] var x_24 : Uniforms; +@group(0) @binding(2) var x_24 : Uniforms; fn getAAtOutCoords_() -> f32 { let x_42 : u32 = gl_GlobalInvocationID.x; @@ -72,8 +72,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(128, 1, 1)]] -fn main([[builtin(global_invocation_id)]] gl_GlobalInvocationID_param : vec3) { +@stage(compute) @workgroup_size(128, 1, 1) +fn main(@builtin(global_invocation_id) gl_GlobalInvocationID_param : vec3) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); } diff --git a/test/bug/tint/959.wgsl b/test/bug/tint/959.wgsl index f8feea2002..244775a116 100644 --- a/test/bug/tint/959.wgsl +++ b/test/bug/tint/959.wgsl @@ -7,58 +7,58 @@ struct S { a : f32; }; -[[group(0), binding(0)]] var b0 : S; -[[group(1), binding(0)]] var b1 : S; -[[group(2), binding(0)]] var b2 : S; -[[group(3), binding(0)]] var b3 : S; -[[group(4), binding(0)]] var b4 : S; -[[group(5), binding(0)]] var b5 : S; -[[group(6), binding(0)]] var b6 : S; -[[group(7), binding(0)]] var b7 : S; -[[group(9), binding(1)]] var b8 : S; -[[group(8), binding(1)]] var b9 : S; -[[group(10), binding(1)]] var b10 : S; -[[group(11), binding(1)]] var b11 : S; -[[group(12), binding(1)]] var b12 : S; -[[group(13), binding(1)]] var b13 : S; -[[group(14), binding(1)]] var b14 : S; -[[group(15), binding(1)]] var b15 : S; +@group(0) @binding(0) var b0 : S; +@group(1) @binding(0) var b1 : S; +@group(2) @binding(0) var b2 : S; +@group(3) @binding(0) var b3 : S; +@group(4) @binding(0) var b4 : S; +@group(5) @binding(0) var b5 : S; +@group(6) @binding(0) var b6 : S; +@group(7) @binding(0) var b7 : S; +@group(9) @binding(1) var b8 : S; +@group(8) @binding(1) var b9 : S; +@group(10) @binding(1) var b10 : S; +@group(11) @binding(1) var b11 : S; +@group(12) @binding(1) var b12 : S; +@group(13) @binding(1) var b13 : S; +@group(14) @binding(1) var b14 : S; +@group(15) @binding(1) var b15 : S; -[[group(0), binding(1)]] var t0 : texture_2d; -[[group(1), binding(1)]] var t1 : texture_2d; -[[group(2), binding(1)]] var t2 : texture_2d; -[[group(3), binding(1)]] var t3 : texture_2d; -[[group(4), binding(1)]] var t4 : texture_2d; -[[group(5), binding(1)]] var t5 : texture_2d; -[[group(6), binding(1)]] var t6 : texture_2d; -[[group(7), binding(1)]] var t7 : texture_2d; -[[group(8), binding(200)]] var t8 : texture_depth_2d; -[[group(9), binding(200)]] var t9 : texture_depth_2d; -[[group(10), binding(200)]] var t10 : texture_depth_2d; -[[group(11), binding(200)]] var t11 : texture_depth_2d; -[[group(12), binding(200)]] var t12 : texture_depth_2d; -[[group(13), binding(200)]] var t13 : texture_depth_2d; -[[group(14), binding(200)]] var t14 : texture_depth_2d; -[[group(15), binding(200)]] var t15 : texture_depth_2d; +@group(0) @binding(1) var t0 : texture_2d; +@group(1) @binding(1) var t1 : texture_2d; +@group(2) @binding(1) var t2 : texture_2d; +@group(3) @binding(1) var t3 : texture_2d; +@group(4) @binding(1) var t4 : texture_2d; +@group(5) @binding(1) var t5 : texture_2d; +@group(6) @binding(1) var t6 : texture_2d; +@group(7) @binding(1) var t7 : texture_2d; +@group(8) @binding(200) var t8 : texture_depth_2d; +@group(9) @binding(200) var t9 : texture_depth_2d; +@group(10) @binding(200) var t10 : texture_depth_2d; +@group(11) @binding(200) var t11 : texture_depth_2d; +@group(12) @binding(200) var t12 : texture_depth_2d; +@group(13) @binding(200) var t13 : texture_depth_2d; +@group(14) @binding(200) var t14 : texture_depth_2d; +@group(15) @binding(200) var t15 : texture_depth_2d; -[[group(0), binding(200)]] var s0 : sampler; -[[group(1), binding(200)]] var s1 : sampler; -[[group(2), binding(200)]] var s2 : sampler; -[[group(3), binding(200)]] var s3 : sampler; -[[group(4), binding(200)]] var s4 : sampler; -[[group(5), binding(200)]] var s5 : sampler; -[[group(6), binding(200)]] var s6 : sampler; -[[group(7), binding(200)]] var s7 : sampler; -[[group(8), binding(300)]] var s8 : sampler_comparison; -[[group(9), binding(300)]] var s9 : sampler_comparison; -[[group(10), binding(300)]] var s10 : sampler_comparison; -[[group(11), binding(300)]] var s11 : sampler_comparison; -[[group(12), binding(300)]] var s12 : sampler_comparison; -[[group(13), binding(300)]] var s13 : sampler_comparison; -[[group(14), binding(300)]] var s14 : sampler_comparison; -[[group(15), binding(300)]] var s15 : sampler_comparison; +@group(0) @binding(200) var s0 : sampler; +@group(1) @binding(200) var s1 : sampler; +@group(2) @binding(200) var s2 : sampler; +@group(3) @binding(200) var s3 : sampler; +@group(4) @binding(200) var s4 : sampler; +@group(5) @binding(200) var s5 : sampler; +@group(6) @binding(200) var s6 : sampler; +@group(7) @binding(200) var s7 : sampler; +@group(8) @binding(300) var s8 : sampler_comparison; +@group(9) @binding(300) var s9 : sampler_comparison; +@group(10) @binding(300) var s10 : sampler_comparison; +@group(11) @binding(300) var s11 : sampler_comparison; +@group(12) @binding(300) var s12 : sampler_comparison; +@group(13) @binding(300) var s13 : sampler_comparison; +@group(14) @binding(300) var s14 : sampler_comparison; +@group(15) @binding(300) var s15 : sampler_comparison; -[[stage(fragment)]] +@stage(fragment) fn main() { _ = b0; _ = b1; diff --git a/test/bug/tint/959.wgsl.expected.wgsl b/test/bug/tint/959.wgsl.expected.wgsl index 4e4ecf0777..7ccfbb96d9 100644 --- a/test/bug/tint/959.wgsl.expected.wgsl +++ b/test/bug/tint/959.wgsl.expected.wgsl @@ -2,103 +2,103 @@ struct S { a : f32; } -[[group(0), binding(0)]] var b0 : S; +@group(0) @binding(0) var b0 : S; -[[group(1), binding(0)]] var b1 : S; +@group(1) @binding(0) var b1 : S; -[[group(2), binding(0)]] var b2 : S; +@group(2) @binding(0) var b2 : S; -[[group(3), binding(0)]] var b3 : S; +@group(3) @binding(0) var b3 : S; -[[group(4), binding(0)]] var b4 : S; +@group(4) @binding(0) var b4 : S; -[[group(5), binding(0)]] var b5 : S; +@group(5) @binding(0) var b5 : S; -[[group(6), binding(0)]] var b6 : S; +@group(6) @binding(0) var b6 : S; -[[group(7), binding(0)]] var b7 : S; +@group(7) @binding(0) var b7 : S; -[[group(9), binding(1)]] var b8 : S; +@group(9) @binding(1) var b8 : S; -[[group(8), binding(1)]] var b9 : S; +@group(8) @binding(1) var b9 : S; -[[group(10), binding(1)]] var b10 : S; +@group(10) @binding(1) var b10 : S; -[[group(11), binding(1)]] var b11 : S; +@group(11) @binding(1) var b11 : S; -[[group(12), binding(1)]] var b12 : S; +@group(12) @binding(1) var b12 : S; -[[group(13), binding(1)]] var b13 : S; +@group(13) @binding(1) var b13 : S; -[[group(14), binding(1)]] var b14 : S; +@group(14) @binding(1) var b14 : S; -[[group(15), binding(1)]] var b15 : S; +@group(15) @binding(1) var b15 : S; -[[group(0), binding(1)]] var t0 : texture_2d; +@group(0) @binding(1) var t0 : texture_2d; -[[group(1), binding(1)]] var t1 : texture_2d; +@group(1) @binding(1) var t1 : texture_2d; -[[group(2), binding(1)]] var t2 : texture_2d; +@group(2) @binding(1) var t2 : texture_2d; -[[group(3), binding(1)]] var t3 : texture_2d; +@group(3) @binding(1) var t3 : texture_2d; -[[group(4), binding(1)]] var t4 : texture_2d; +@group(4) @binding(1) var t4 : texture_2d; -[[group(5), binding(1)]] var t5 : texture_2d; +@group(5) @binding(1) var t5 : texture_2d; -[[group(6), binding(1)]] var t6 : texture_2d; +@group(6) @binding(1) var t6 : texture_2d; -[[group(7), binding(1)]] var t7 : texture_2d; +@group(7) @binding(1) var t7 : texture_2d; -[[group(8), binding(200)]] var t8 : texture_depth_2d; +@group(8) @binding(200) var t8 : texture_depth_2d; -[[group(9), binding(200)]] var t9 : texture_depth_2d; +@group(9) @binding(200) var t9 : texture_depth_2d; -[[group(10), binding(200)]] var t10 : texture_depth_2d; +@group(10) @binding(200) var t10 : texture_depth_2d; -[[group(11), binding(200)]] var t11 : texture_depth_2d; +@group(11) @binding(200) var t11 : texture_depth_2d; -[[group(12), binding(200)]] var t12 : texture_depth_2d; +@group(12) @binding(200) var t12 : texture_depth_2d; -[[group(13), binding(200)]] var t13 : texture_depth_2d; +@group(13) @binding(200) var t13 : texture_depth_2d; -[[group(14), binding(200)]] var t14 : texture_depth_2d; +@group(14) @binding(200) var t14 : texture_depth_2d; -[[group(15), binding(200)]] var t15 : texture_depth_2d; +@group(15) @binding(200) var t15 : texture_depth_2d; -[[group(0), binding(200)]] var s0 : sampler; +@group(0) @binding(200) var s0 : sampler; -[[group(1), binding(200)]] var s1 : sampler; +@group(1) @binding(200) var s1 : sampler; -[[group(2), binding(200)]] var s2 : sampler; +@group(2) @binding(200) var s2 : sampler; -[[group(3), binding(200)]] var s3 : sampler; +@group(3) @binding(200) var s3 : sampler; -[[group(4), binding(200)]] var s4 : sampler; +@group(4) @binding(200) var s4 : sampler; -[[group(5), binding(200)]] var s5 : sampler; +@group(5) @binding(200) var s5 : sampler; -[[group(6), binding(200)]] var s6 : sampler; +@group(6) @binding(200) var s6 : sampler; -[[group(7), binding(200)]] var s7 : sampler; +@group(7) @binding(200) var s7 : sampler; -[[group(8), binding(300)]] var s8 : sampler_comparison; +@group(8) @binding(300) var s8 : sampler_comparison; -[[group(9), binding(300)]] var s9 : sampler_comparison; +@group(9) @binding(300) var s9 : sampler_comparison; -[[group(10), binding(300)]] var s10 : sampler_comparison; +@group(10) @binding(300) var s10 : sampler_comparison; -[[group(11), binding(300)]] var s11 : sampler_comparison; +@group(11) @binding(300) var s11 : sampler_comparison; -[[group(12), binding(300)]] var s12 : sampler_comparison; +@group(12) @binding(300) var s12 : sampler_comparison; -[[group(13), binding(300)]] var s13 : sampler_comparison; +@group(13) @binding(300) var s13 : sampler_comparison; -[[group(14), binding(300)]] var s14 : sampler_comparison; +@group(14) @binding(300) var s14 : sampler_comparison; -[[group(15), binding(300)]] var s15 : sampler_comparison; +@group(15) @binding(300) var s15 : sampler_comparison; -[[stage(fragment)]] +@stage(fragment) fn main() { _ = b0; _ = b1; diff --git a/test/bug/tint/977.spvasm.expected.wgsl b/test/bug/tint/977.spvasm.expected.wgsl index 69bc7aa1c5..8b5ad53aa0 100644 --- a/test/bug/tint/977.spvasm.expected.wgsl +++ b/test/bug/tint/977.spvasm.expected.wgsl @@ -1,12 +1,12 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; -type RTArr_1 = [[stride(4)]] array; +type RTArr_1 = @stride(4) array; struct ResultMatrix { numbers : RTArr_1; } -type RTArr_2 = [[stride(4)]] array; +type RTArr_2 = @stride(4) array; struct FirstMatrix { numbers : RTArr_1; @@ -24,13 +24,13 @@ struct Uniforms { var gl_GlobalInvocationID : vec3; -[[group(0), binding(2)]] var resultMatrix : ResultMatrix; +@group(0) @binding(2) var resultMatrix : ResultMatrix; -[[group(0), binding(0)]] var firstMatrix : FirstMatrix; +@group(0) @binding(0) var firstMatrix : FirstMatrix; -[[group(0), binding(1)]] var secondMatrix : SecondMatrix; +@group(0) @binding(1) var secondMatrix : SecondMatrix; -[[group(0), binding(3)]] var x_46 : Uniforms; +@group(0) @binding(3) var x_46 : Uniforms; fn binaryOperation_f1_f1_(a : ptr, b : ptr) -> f32 { var x_26 : f32; @@ -69,8 +69,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] gl_GlobalInvocationID_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) gl_GlobalInvocationID_param : vec3) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); } diff --git a/test/bug/tint/978.wgsl b/test/bug/tint/978.wgsl index 278655e674..c4b25a13b6 100644 --- a/test/bug/tint/978.wgsl +++ b/test/bug/tint/978.wgsl @@ -1,20 +1,20 @@ struct FragmentInput { - [[ location( 2 ) ]] vUv : vec2; + @location(2) vUv : vec2; }; struct FragmentOutput { - [[ location( 0 ) ]] color : vec4; + @location(0) color : vec4; }; -[[ binding( 5 ), group( 1 ) ]] var depthMap : texture_depth_2d; +@binding(5) @group(1) var depthMap : texture_depth_2d; -[[ binding( 3 ), group( 1 ) ]] var texSampler : sampler; +@binding(3) @group(1) var texSampler : sampler; -[[stage(fragment)]] +@stage(fragment) fn main( fIn : FragmentInput ) -> FragmentOutput { let sample : f32 = textureSample( depthMap , texSampler, fIn.vUv ); diff --git a/test/bug/tint/978.wgsl.expected.wgsl b/test/bug/tint/978.wgsl.expected.wgsl index b73a26e1aa..8588fe7c0d 100644 --- a/test/bug/tint/978.wgsl.expected.wgsl +++ b/test/bug/tint/978.wgsl.expected.wgsl @@ -1,18 +1,18 @@ struct FragmentInput { - [[location(2)]] + @location(2) vUv : vec2; } struct FragmentOutput { - [[location(0)]] + @location(0) color : vec4; } -[[binding(5), group(1)]] var depthMap : texture_depth_2d; +@binding(5) @group(1) var depthMap : texture_depth_2d; -[[binding(3), group(1)]] var texSampler : sampler; +@binding(3) @group(1) var texSampler : sampler; -[[stage(fragment)]] +@stage(fragment) fn main(fIn : FragmentInput) -> FragmentOutput { let sample : f32 = textureSample(depthMap, texSampler, fIn.vUv); let color : vec3 = vec3(sample, sample, sample); diff --git a/test/bug/tint/980.wgsl b/test/bug/tint/980.wgsl index bd82785552..3f399b06ad 100644 --- a/test/bug/tint/980.wgsl +++ b/test/bug/tint/980.wgsl @@ -6,8 +6,8 @@ fn Bad(index: u32, rd: vec3) -> vec3 { } struct S { v : vec3; i : u32; }; -[[binding(0), group(0)]] var io : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@binding(0) @group(0) var io : S; +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { io.v = Bad(io.i, io.v); } diff --git a/test/bug/tint/980.wgsl.expected.wgsl b/test/bug/tint/980.wgsl.expected.wgsl index b74a7cb215..ef89fd004f 100644 --- a/test/bug/tint/980.wgsl.expected.wgsl +++ b/test/bug/tint/980.wgsl.expected.wgsl @@ -9,9 +9,9 @@ struct S { i : u32; } -[[binding(0), group(0)]] var io : S; +@binding(0) @group(0) var io : S; -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_index) idx : u32) { io.v = Bad(io.i, io.v); } diff --git a/test/bug/tint/992.wgsl b/test/bug/tint/992.wgsl index e60c59727b..461e17ceae 100644 --- a/test/bug/tint/992.wgsl +++ b/test/bug/tint/992.wgsl @@ -1,5 +1,5 @@ -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { var b: f32 = 0.0; var v: vec3 = vec3(b); return vec4(v, 1.0); diff --git a/test/bug/tint/992.wgsl.expected.wgsl b/test/bug/tint/992.wgsl.expected.wgsl index 7354604905..1742838145 100644 --- a/test/bug/tint/992.wgsl.expected.wgsl +++ b/test/bug/tint/992.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { var b : f32 = 0.0; var v : vec3 = vec3(b); return vec4(v, 1.0); diff --git a/test/bug/tint/993.wgsl b/test/bug/tint/993.wgsl index cf774f714d..b5ebe30827 100644 --- a/test/bug/tint/993.wgsl +++ b/test/bug/tint/993.wgsl @@ -2,23 +2,23 @@ struct Constants { zero: u32; }; -[[group(1), binding(0)]] var constants: Constants; +@group(1) @binding(0) var constants: Constants; struct Result { value: u32; }; -[[group(1), binding(1)]] var result: Result; +@group(1) @binding(1) var result: Result; struct TestData { data: array,3>; }; -[[group(0), binding(0)]] var s: TestData; +@group(0) @binding(0) var s: TestData; fn runTest() -> i32 { return atomicLoad(&s.data[(0u) + u32(constants.zero)]); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { result.value = u32(runTest()); -} \ No newline at end of file +} diff --git a/test/bug/tint/993.wgsl.expected.wgsl b/test/bug/tint/993.wgsl.expected.wgsl index 12eb2ae63c..5d0863d59c 100644 --- a/test/bug/tint/993.wgsl.expected.wgsl +++ b/test/bug/tint/993.wgsl.expected.wgsl @@ -2,25 +2,25 @@ struct Constants { zero : u32; } -[[group(1), binding(0)]] var constants : Constants; +@group(1) @binding(0) var constants : Constants; struct Result { value : u32; } -[[group(1), binding(1)]] var result : Result; +@group(1) @binding(1) var result : Result; struct TestData { data : array, 3>; } -[[group(0), binding(0)]] var s : TestData; +@group(0) @binding(0) var s : TestData; fn runTest() -> i32 { return atomicLoad(&(s.data[(0u + u32(constants.zero))])); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { result.value = u32(runTest()); } diff --git a/test/bug/tint/998.wgsl b/test/bug/tint/998.wgsl index 39357d60b3..3186b30428 100644 --- a/test/bug/tint/998.wgsl +++ b/test/bug/tint/998.wgsl @@ -1,19 +1,19 @@ struct Constants { zero: u32; }; -[[group(1), binding(0)]] var constants: Constants; +@group(1) @binding(0) var constants: Constants; struct Result { value: u32; }; -[[group(1), binding(1)]] var result: Result; +@group(1) @binding(1) var result: Result; struct S { data: array; }; var s: S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { s.data[constants.zero] = 0u; -} \ No newline at end of file +} diff --git a/test/bug/tint/998.wgsl.expected.wgsl b/test/bug/tint/998.wgsl.expected.wgsl index e7abd6d557..35ed13f993 100644 --- a/test/bug/tint/998.wgsl.expected.wgsl +++ b/test/bug/tint/998.wgsl.expected.wgsl @@ -2,13 +2,13 @@ struct Constants { zero : u32; } -[[group(1), binding(0)]] var constants : Constants; +@group(1) @binding(0) var constants : Constants; struct Result { value : u32; } -[[group(1), binding(1)]] var result : Result; +@group(1) @binding(1) var result : Result; struct S { data : array; @@ -16,7 +16,7 @@ struct S { var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { s.data[constants.zero] = 0u; } diff --git a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl index 403b87f68e..eac9ef652e 100644 --- a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl +++ b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3( 1., 2., 3.), vec3( 4., 5., 6.), vec3( 7., 8., 9.)); let b = mat3x3(vec3(-1., -2., -3.), vec3(-4., -5., -6.), vec3(-7., -8., -9.)); diff --git a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.wgsl b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.wgsl index 9113851e9f..2dfb7c8232 100644 --- a/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/mat3x3-mat3x3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0)); let b = mat3x3(vec3(-1.0, -2.0, -3.0), vec3(-4.0, -5.0, -6.0), vec3(-7.0, -8.0, -9.0)); diff --git a/test/expressions/binary/add/scalar-scalar/f32.wgsl b/test/expressions/binary/add/scalar-scalar/f32.wgsl index 25bf677114..6dcc6537a1 100644 --- a/test/expressions/binary/add/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/add/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 2.; diff --git a/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.wgsl index 3db4790295..0997a1a1c7 100644 --- a/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 2.0; diff --git a/test/expressions/binary/add/scalar-scalar/i32.wgsl b/test/expressions/binary/add/scalar-scalar/i32.wgsl index bb39f2e74f..93e8a35d6e 100644 --- a/test/expressions/binary/add/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/add/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.wgsl index 7022af17e6..46fe066d2d 100644 --- a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/add/scalar-scalar/u32.wgsl b/test/expressions/binary/add/scalar-scalar/u32.wgsl index 9f5be350d7..cf3c56d14a 100644 --- a/test/expressions/binary/add/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/add/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.wgsl index fc83a3e896..c052925ebd 100644 --- a/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/add/scalar-vec3/f32.wgsl b/test/expressions/binary/add/scalar-vec3/f32.wgsl index 8adb2912cc..8467ba6183 100644 --- a/test/expressions/binary/add/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/add/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.; let b = vec3(1., 2., 3.); diff --git a/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.wgsl index f113f0e078..95a584bab1 100644 --- a/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.0; let b = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/binary/add/scalar-vec3/i32.wgsl b/test/expressions/binary/add/scalar-vec3/i32.wgsl index 327473e630..a61cd74957 100644 --- a/test/expressions/binary/add/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/add/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.wgsl index 6123ca12a2..c1193c60a6 100644 --- a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/add/scalar-vec3/u32.wgsl b/test/expressions/binary/add/scalar-vec3/u32.wgsl index e36d8810a8..0fb18d4c6e 100644 --- a/test/expressions/binary/add/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/add/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.wgsl index 457841ed97..2ec05952c2 100644 --- a/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/add/vec3-scalar/f32.wgsl b/test/expressions/binary/add/vec3-scalar/f32.wgsl index dd38642880..38320af7d7 100644 --- a/test/expressions/binary/add/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/add/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = 4.; diff --git a/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.wgsl index 62aa1602c3..86904e569a 100644 --- a/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = 4.0; diff --git a/test/expressions/binary/add/vec3-scalar/i32.wgsl b/test/expressions/binary/add/vec3-scalar/i32.wgsl index 1e4324a64d..eacbc3be21 100644 --- a/test/expressions/binary/add/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/add/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.wgsl index 378b1d2f8a..e4775e1498 100644 --- a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/add/vec3-scalar/u32.wgsl b/test/expressions/binary/add/vec3-scalar/u32.wgsl index cfff6f189a..50ceeadb00 100644 --- a/test/expressions/binary/add/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/add/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.wgsl index df0f990033..8f0116ae17 100644 --- a/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/add/vec3-vec3/f32.wgsl b/test/expressions/binary/add/vec3-vec3/f32.wgsl index 4f71797c78..5658e4e9ed 100644 --- a/test/expressions/binary/add/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/add/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(4., 5., 6.); diff --git a/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.wgsl index 54d52b12dc..b18ded4bfe 100644 --- a/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(4.0, 5.0, 6.0); diff --git a/test/expressions/binary/add/vec3-vec3/i32.wgsl b/test/expressions/binary/add/vec3-vec3/i32.wgsl index dd170f5517..98ca5c24f2 100644 --- a/test/expressions/binary/add/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/add/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.wgsl index 5f1226d5da..58712eaeca 100644 --- a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/add/vec3-vec3/u32.wgsl b/test/expressions/binary/add/vec3-vec3/u32.wgsl index 433e52d03d..f6d72ce47a 100644 --- a/test/expressions/binary/add/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/add/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.wgsl index 85dad76c47..db61dda135 100644 --- a/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/add/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl b/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl index 9ad0a83ae1..e4d1a8650f 100644 --- a/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl.expected.wgsl index ce96c2d25b..24bab02372 100644 --- a/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-and/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl b/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl index ee0fb0a2cc..c297f9d0f2 100644 --- a/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl.expected.wgsl index e5c60f17d6..a158e4c2b0 100644 --- a/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-and/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl b/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl index 5dc71ef1c3..c2be41dc2f 100644 --- a/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl.expected.wgsl index a30b1f5318..334474a744 100644 --- a/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-and/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl b/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl index c520bc33b4..8383a869a6 100644 --- a/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl.expected.wgsl index b9c2d8002a..7a95503d5e 100644 --- a/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-and/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl b/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl index 9e2d99cc4f..e0c227d39d 100644 --- a/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl.expected.wgsl index 3a13163073..65617cb426 100644 --- a/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-or/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl b/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl index edf8a701ae..c8d425742c 100644 --- a/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl.expected.wgsl index 231ecb56e4..3c9bed31d4 100644 --- a/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-or/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl b/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl index dc5ed1c20b..d5f60366b8 100644 --- a/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl.expected.wgsl index 8941e046eb..ffc87a095f 100644 --- a/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-or/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl b/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl index e1adda8eb1..cac160f452 100644 --- a/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl.expected.wgsl index 800d5d024a..580a328f4f 100644 --- a/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-or/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl b/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl index c0112a3945..9844c807d5 100644 --- a/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl.expected.wgsl index 860a11de38..dc73ec6312 100644 --- a/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-xor/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl b/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl index 32d3b953d9..f0f7a54255 100644 --- a/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl.expected.wgsl index 26dda4596f..930b21f2cd 100644 --- a/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-xor/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl b/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl index c4972f7320..0a5f1c22ff 100644 --- a/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl.expected.wgsl index 2811f151d4..de62f80ce8 100644 --- a/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-xor/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl b/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl index 2e62570325..ce705f6b44 100644 --- a/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl.expected.wgsl index 4ba52c529e..044e1389c4 100644 --- a/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/bit-xor/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/div/scalar-scalar/f32.wgsl b/test/expressions/binary/div/scalar-scalar/f32.wgsl index 50cabd03f2..025664dc36 100644 --- a/test/expressions/binary/div/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/div/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 2.; diff --git a/test/expressions/binary/div/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-scalar/f32.wgsl.expected.wgsl index 5bc760d23b..4f2fc18f9e 100644 --- a/test/expressions/binary/div/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 2.0; diff --git a/test/expressions/binary/div/scalar-scalar/i32.wgsl b/test/expressions/binary/div/scalar-scalar/i32.wgsl index 1192d80643..cba5901387 100644 --- a/test/expressions/binary/div/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/div/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/div/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-scalar/i32.wgsl.expected.wgsl index 6ecb865e50..8f7e574c6c 100644 --- a/test/expressions/binary/div/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/div/scalar-scalar/u32.wgsl b/test/expressions/binary/div/scalar-scalar/u32.wgsl index 6e18ad7d00..441f376df6 100644 --- a/test/expressions/binary/div/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/div/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/div/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-scalar/u32.wgsl.expected.wgsl index b5d2f7e4c3..cff0385af8 100644 --- a/test/expressions/binary/div/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/div/scalar-vec3/f32.wgsl b/test/expressions/binary/div/scalar-vec3/f32.wgsl index a9cab92259..f43e97cad4 100644 --- a/test/expressions/binary/div/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/div/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.; let b = vec3(1., 2., 3.); diff --git a/test/expressions/binary/div/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-vec3/f32.wgsl.expected.wgsl index bd9de59854..b8f74f4b4c 100644 --- a/test/expressions/binary/div/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.0; let b = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/binary/div/scalar-vec3/i32.wgsl b/test/expressions/binary/div/scalar-vec3/i32.wgsl index ae9daea83d..071efcf6a4 100644 --- a/test/expressions/binary/div/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/div/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/div/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-vec3/i32.wgsl.expected.wgsl index 6d7e7a4166..1a8cb05f25 100644 --- a/test/expressions/binary/div/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/div/scalar-vec3/u32.wgsl b/test/expressions/binary/div/scalar-vec3/u32.wgsl index 0923fb27f5..5ad53ee09e 100644 --- a/test/expressions/binary/div/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/div/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/div/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div/scalar-vec3/u32.wgsl.expected.wgsl index 5c678e8a80..ffe64127a1 100644 --- a/test/expressions/binary/div/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/div/vec3-scalar/f32.wgsl b/test/expressions/binary/div/vec3-scalar/f32.wgsl index 247abdfd2c..087c0d30af 100644 --- a/test/expressions/binary/div/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/div/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = 4.; diff --git a/test/expressions/binary/div/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-scalar/f32.wgsl.expected.wgsl index df8a3df34e..70432dbc6d 100644 --- a/test/expressions/binary/div/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = 4.0; diff --git a/test/expressions/binary/div/vec3-scalar/i32.wgsl b/test/expressions/binary/div/vec3-scalar/i32.wgsl index 7e730df432..890b12551b 100644 --- a/test/expressions/binary/div/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/div/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/div/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-scalar/i32.wgsl.expected.wgsl index fa76ca6c1d..f3a1164d8f 100644 --- a/test/expressions/binary/div/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/div/vec3-scalar/u32.wgsl b/test/expressions/binary/div/vec3-scalar/u32.wgsl index 5eadf33bf5..7ab6dd501e 100644 --- a/test/expressions/binary/div/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/div/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/div/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-scalar/u32.wgsl.expected.wgsl index 8e60c28717..2f64dd9b14 100644 --- a/test/expressions/binary/div/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/div/vec3-vec3/f32.wgsl b/test/expressions/binary/div/vec3-vec3/f32.wgsl index f779554a2c..1f253ea991 100644 --- a/test/expressions/binary/div/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/div/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(4., 5., 6.); diff --git a/test/expressions/binary/div/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-vec3/f32.wgsl.expected.wgsl index e824aa5474..c3129a964d 100644 --- a/test/expressions/binary/div/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(4.0, 5.0, 6.0); diff --git a/test/expressions/binary/div/vec3-vec3/i32.wgsl b/test/expressions/binary/div/vec3-vec3/i32.wgsl index 40e6d7a02e..68d844f8ae 100644 --- a/test/expressions/binary/div/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/div/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/div/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-vec3/i32.wgsl.expected.wgsl index 940e6d94da..a601fa0bfe 100644 --- a/test/expressions/binary/div/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/div/vec3-vec3/u32.wgsl b/test/expressions/binary/div/vec3-vec3/u32.wgsl index 39fdc1deab..9215590e7c 100644 --- a/test/expressions/binary/div/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/div/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/div/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div/vec3-vec3/u32.wgsl.expected.wgsl index cbf76b78da..66261d5cbb 100644 --- a/test/expressions/binary/div/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl index 7ce4276bfb..9503e44304 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl index da2c3528cc..8036fce278 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl index 7c980aa939..73f03b7e40 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl index 63bdb5a623..5284d7d16f 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl index e31e484518..38b3d2493a 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl index 3b06f404c8..8c8f7ae0fd 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl index 83e438c638..0db5465133 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.; let b = vec3(0., 2., 0.); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.wgsl index 040875ea19..24d6132667 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.0; let b = vec3(0.0, 2.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl index b981e355b8..2b6ef483fa 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl index 34804c3377..58c1887622 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl index ae85d37df8..a0a8fe6c34 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl index a20cb6a389..bb436e1c72 100644 --- a/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl index 0a15e5b7a9..b83333f920 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl.expected.wgsl index 7396529c0e..f48af63db1 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl index 93243bc37f..f9291d5385 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 0; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl index c15fc0d28f..c7f11a180c 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 0; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl index e4cc9f0a02..5446b2a145 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl index a7aaf27ccb..5ead9830c8 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl index 3800a7b85a..6db41a47bd 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl index b7be414449..6f4aa8c57a 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl index 6f5bac7d55..5d583e65d2 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl index 72c4004b01..76bf812cf7 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl index 4d73587e0c..16a0dd08bb 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl index 03c8910eb4..eb849bdccd 100644 --- a/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl index 12f1a156f3..55c73c5c1d 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.; var b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl index 6c35a6e063..8b3d931bfe 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.0; var b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl index 35b442798e..016e7a81df 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl index 6680c0b10d..c762d02ff5 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl index 1add65a97c..a265dd0d2a 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl index ef947c36c2..ad82462488 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl index bc06d3bc7c..ba92b627b7 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4.; var b = vec3(0., 2., 0.); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.wgsl index 6c0a2593c6..c7a6ac1d75 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4.0; var b = vec3(0.0, 2.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl index 7625e4cacb..9dc07d5d5d 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl index 58c74561b9..e4dd4b4264 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl index 86989de6d9..0547691f07 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl index 563beefc32..9f103fba29 100644 --- a/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl index 6e95ded78a..98ff5f0ca3 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl.expected.wgsl index 27f709e51a..f0df1be843 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl index c04ada069c..b792c3ac19 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl index 6bd3b6d29b..6bbc51bf35 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl index eef2625489..4e4eacba24 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl index 31867ef9d7..238736409e 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl index 351527d7f4..69761db539 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl index f3eb9921a0..2e518af2ec 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl index ab6ecd49db..65e13dcd86 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl index 0e81db7a1e..3700b5723d 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl index f55edd51e2..d2e0417e85 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl index 1d60a1309c..ab03350d49 100644 --- a/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl index 2dff3b7bd7..2084ec5d35 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.; var b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl index 332c2b72b3..d616f9b4e9 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.0; var b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl index 375c77324d..b693c7c17c 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl index 90d99f4568..da1a3c44a9 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl index b555e24f18..7cab8cf39a 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl index 478767ec49..7ac2a45d0c 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl index 16588a9980..62267d4e3b 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4.; var b = vec3(0., 2., 0.); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.wgsl index 0d44b765d8..538b208d21 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4.0; var b = vec3(0.0, 2.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl index 8d25a71faf..c2e1627e66 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl index 2bc4678faf..c29283ed5b 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl index f417803c9b..6810e9a61e 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl index 147f4d2788..286538ad2d 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl index 2f23ba4541..71b747421f 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = 0.; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl.expected.wgsl index fed430afe2..8caf79ea42 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = 0.0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl index 55aa4bc6f4..27fea3220c 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl index 56d8e9dc04..f11c30ed51 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl index 4076d88505..ea02f5cb5b 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl index e55b987e3f..0154b03910 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl index f5092adba6..fdcbb747c1 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl index 534f264b8b..d37119ad20 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl index 07d8e62bdf..bb4bda306e 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl index 5ce7a80735..17e72b3430 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl index 218e516fb3..26097c9692 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl index 35b85a1b48..f2206eec05 100644 --- a/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl index 641f5bfef4..1779cb0b24 100644 --- a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2u; diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl index df07fda2b1..69143dd6df 100644 --- a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2u; diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl index a1a39b6f3d..9638b83037 100644 --- a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl index 1aee254658..39595c9ec0 100644 --- a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl index 78156b23f4..fd21fb4abb 100644 --- a/test/expressions/binary/left-shift/vector-vector/i32.wgsl +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl index 3a752fa0d2..43d4d00a1f 100644 --- a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl index c85d91e5c5..7e0db01dcb 100644 --- a/test/expressions/binary/left-shift/vector-vector/u32.wgsl +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl index 987e6804ea..12a5cde094 100644 --- a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/mod/scalar-scalar/f32.wgsl b/test/expressions/binary/mod/scalar-scalar/f32.wgsl index 4ab49234ed..20513e7770 100644 --- a/test/expressions/binary/mod/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 2.; diff --git a/test/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.wgsl index 66c2041bf8..eebb252da0 100644 --- a/test/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 2.0; diff --git a/test/expressions/binary/mod/scalar-scalar/i32.wgsl b/test/expressions/binary/mod/scalar-scalar/i32.wgsl index f186706f82..12a7c72d9c 100644 --- a/test/expressions/binary/mod/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/mod/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod/scalar-scalar/i32.wgsl.expected.wgsl index f692f9e488..549140ec4d 100644 --- a/test/expressions/binary/mod/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/mod/scalar-scalar/u32.wgsl b/test/expressions/binary/mod/scalar-scalar/u32.wgsl index d1b56f7e9a..96042bd249 100644 --- a/test/expressions/binary/mod/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.wgsl index e3da2c74ff..d3835edd12 100644 --- a/test/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/mod/vec3-vec3/f32.wgsl b/test/expressions/binary/mod/vec3-vec3/f32.wgsl index d7cebb244a..815fb66077 100644 --- a/test/expressions/binary/mod/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(4., 5., 6.); diff --git a/test/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.wgsl index d0ef8c9635..d37c9d959d 100644 --- a/test/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(4.0, 5.0, 6.0); diff --git a/test/expressions/binary/mod/vec3-vec3/i32.wgsl b/test/expressions/binary/mod/vec3-vec3/i32.wgsl index b26013fbfc..55bfa49eb5 100644 --- a/test/expressions/binary/mod/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.wgsl index 553af2b7c5..17693869af 100644 --- a/test/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/mod/vec3-vec3/u32.wgsl b/test/expressions/binary/mod/vec3-vec3/u32.wgsl index 2ad96bceee..02f1eeaf66 100644 --- a/test/expressions/binary/mod/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.wgsl index ca6319591f..36fa71e020 100644 --- a/test/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl index b34099c8e1..6d014b8a38 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 0.; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl index 235be9368b..542a2e7420 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 0.0; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl index 9900e056aa..4c05b0ea38 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl index 4c6fdf98e7..e63b37dfa1 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl index 4fb0f9fb4a..a63ca8fb1b 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl index 62a525b2df..02a078b252 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl index 9b27df2468..b319205019 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl index dca74427df..5b99aeabe9 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl index 494a712979..94494c3d78 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl index c061d41eee..0aca8c0a0e 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl index 2fe5f2de4f..0a0f4d4fdd 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl index 0aac1fa8b0..8cc8abe910 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl index 25b884fafc..796e15f8dc 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl index 7665b70741..98c4523b2d 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl index 61df86dc51..64fc4d5dfa 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl index 180e7d96bb..227a070b13 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl index 23aa96c5a6..9e64d49d33 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl index 259840db34..b6fc8c0a3e 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl index ee9eecccd3..6724d92d86 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl index 08943bbe3b..24d48be0f4 100644 --- a/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl index a4e2202d3c..820231bc7c 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.; var b = 0.; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl index b6c7b67340..019d543f00 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.0; var b = 0.0; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl index 7f8d8d0c0d..949d0fe8a1 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl index 581f6dfb98..74888f2ec0 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl index edd134b0fd..caf8b51ac0 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl index f894e6d5d8..a75275dcfc 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl index b90a40471a..d3415885a3 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl index 724d89b48a..1cff64c91a 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl index e6626f1081..bbe0ada976 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl index d820f98035..c292b7baf6 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl index e5dd9839fc..732dff413b 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl index c924762b31..0aaa1a256a 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl index b775a66126..87c0466968 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl index d73c1a9070..9433a5a0c9 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl index 92e19cf0cd..6a67f5463e 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl index 06e70aef33..965767fa89 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl index e843464983..6996804f7e 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl index 78f7040d78..b327a60b91 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl index ad503237a7..769ce16204 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl index e7f2ce8aa5..cdc78486af 100644 --- a/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl index b80c20109f..ec5cc7d701 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.; var b = 0.; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl index 1b3af01b94..37faeaa333 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1.0; var b = 0.0; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl index 38874c47de..3f673f95d5 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl index 1b19397f13..241e4c3ff9 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1; var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl index a8b6555226..19f6c04147 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl index 1a5f7266da..8d6291b4b8 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 1u; var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl index 0f9c970891..ac029c5f9c 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl index 30f19f4828..30bdb80d53 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4; var b = vec3(0, 2, 0); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl index 9afcb3c86a..74885a7296 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl index 0e406f7bb7..0abb9dce56 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = 4u; var b = vec3(0u, 2u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl index 41f8c7caf7..8ceeb13d89 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl index dcb69395a7..b9f853c89d 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = 0; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl index 5ddae5bdc1..aa6b581249 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl index eabfbcd88c..d79da42260 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = 0u; diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl index 7a91bd08a5..f5d27d5092 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1., 2., 3.); var b = vec3(0., 5., 0.); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl index 6d96f8922d..c178fab3eb 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1.0, 2.0, 3.0); var b = vec3(0.0, 5.0, 0.0); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl index e9364db7eb..129d4b011c 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl index ebd6b91381..96c95e91a0 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1, 2, 3); var b = vec3(0, 5, 0); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl index cf77b25e4f..b6be872f19 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl index 615b56c89c..de150e4a41 100644 --- a/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var a = vec3(1u, 2u, 3u); var b = vec3(0u, 5u, 0u); diff --git a/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl b/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl index ade50cb49e..d9e43313e1 100644 --- a/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl +++ b/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat2x4(vec4(1., 2., 3., 4.), vec4(5., 6., 7., 8.)); let b = mat4x2(vec2(-1., -2.), vec2(-3., -4.), vec2(-5., -6.), vec2(-7., -8.)); diff --git a/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl.expected.wgsl index 794ec9b8a4..2bdcf998e2 100644 --- a/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/mat2x4-mat4x2/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat2x4(vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 6.0, 7.0, 8.0)); let b = mat4x2(vec2(-1.0, -2.0), vec2(-3.0, -4.0), vec2(-5.0, -6.0), vec2(-7.0, -8.0)); diff --git a/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl b/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl index 711e0c82f1..4a407bd002 100644 --- a/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl +++ b/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl @@ -2,9 +2,9 @@ struct S { matrix : mat3x2; vector : vec3; }; -[[group(0), binding(0)]] var data: S; +@group(0) @binding(0) var data: S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = data.matrix * data.vector; } diff --git a/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.wgsl index adb8e744eb..4f6b25c679 100644 --- a/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct S { vector : vec3; } -[[group(0), binding(0)]] var data : S; +@group(0) @binding(0) var data : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = (data.matrix * data.vector); } diff --git a/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl b/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl index 06744d71c8..693b097da9 100644 --- a/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl +++ b/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3( 1., 2., 3.), vec3( 4., 5., 6.), vec3( 7., 8., 9.)); let b = mat3x3(vec3(-1., -2., -3.), vec3(-4., -5., -6.), vec3(-7., -8., -9.)); diff --git a/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl.expected.wgsl index 2dd4a96711..872ec3d080 100644 --- a/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/mat3x3-mat3x3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0)); let b = mat3x3(vec3(-1.0, -2.0, -3.0), vec3(-4.0, -5.0, -6.0), vec3(-7.0, -8.0, -9.0)); diff --git a/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl b/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl index 1101f9265d..f915862844 100644 --- a/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl +++ b/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl @@ -2,9 +2,9 @@ struct S { matrix : mat3x3; vector : vec3; }; -[[group(0), binding(0)]] var data: S; +@group(0) @binding(0) var data: S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = data.matrix * data.vector; } diff --git a/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.wgsl index 461d0c75b9..2c12345dd2 100644 --- a/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct S { vector : vec3; } -[[group(0), binding(0)]] var data : S; +@group(0) @binding(0) var data : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = (data.matrix * data.vector); } diff --git a/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl b/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl index 236146eca0..76e4db22d4 100644 --- a/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl +++ b/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat4x2(vec2(-1., -2.), vec2(-3., -4.), vec2(-5., -6.), vec2(-7., -8.)); let b = mat2x4(vec4(1., 2., 3., 4.), vec4(5., 6., 7., 8.)); diff --git a/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl.expected.wgsl index b4803d4b8d..cc6bf09931 100644 --- a/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/mat4x2-mat2x4/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat4x2(vec2(-1.0, -2.0), vec2(-3.0, -4.0), vec2(-5.0, -6.0), vec2(-7.0, -8.0)); let b = mat2x4(vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 6.0, 7.0, 8.0)); diff --git a/test/expressions/binary/mul/scalar-scalar/f32.wgsl b/test/expressions/binary/mul/scalar-scalar/f32.wgsl index 23d73710ec..7c3a49412f 100644 --- a/test/expressions/binary/mul/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 2.; diff --git a/test/expressions/binary/mul/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-scalar/f32.wgsl.expected.wgsl index 6f874935bd..1308e5a1b9 100644 --- a/test/expressions/binary/mul/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 2.0; diff --git a/test/expressions/binary/mul/scalar-scalar/i32.wgsl b/test/expressions/binary/mul/scalar-scalar/i32.wgsl index ea5832822c..841429e890 100644 --- a/test/expressions/binary/mul/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.wgsl index 5f53be8ae0..e0189a5e0d 100644 --- a/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/mul/scalar-scalar/u32.wgsl b/test/expressions/binary/mul/scalar-scalar/u32.wgsl index ec6a61d70e..4998346224 100644 --- a/test/expressions/binary/mul/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/mul/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-scalar/u32.wgsl.expected.wgsl index 92cffef37b..3dda0e08d8 100644 --- a/test/expressions/binary/mul/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/mul/scalar-vec3/f32.wgsl b/test/expressions/binary/mul/scalar-vec3/f32.wgsl index cd19d3bb3b..62560cb8ac 100644 --- a/test/expressions/binary/mul/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.; let b = vec3(1., 2., 3.); diff --git a/test/expressions/binary/mul/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-vec3/f32.wgsl.expected.wgsl index 65ac8cc088..f2cf6c497c 100644 --- a/test/expressions/binary/mul/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.0; let b = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/binary/mul/scalar-vec3/i32.wgsl b/test/expressions/binary/mul/scalar-vec3/i32.wgsl index 8d1bf3fd38..8f8d3e437c 100644 --- a/test/expressions/binary/mul/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.wgsl index c5744b73bf..85f39b5049 100644 --- a/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/mul/scalar-vec3/u32.wgsl b/test/expressions/binary/mul/scalar-vec3/u32.wgsl index d5f432e6e6..5c9260f078 100644 --- a/test/expressions/binary/mul/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/mul/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mul/scalar-vec3/u32.wgsl.expected.wgsl index 60505a4a24..9fc3bffa95 100644 --- a/test/expressions/binary/mul/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl b/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl index 8cfd8e12b5..5606f657d2 100644 --- a/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl +++ b/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl @@ -2,9 +2,9 @@ struct S { matrix : mat3x3; vector : vec3; }; -[[group(0), binding(0)]] var data: S; +@group(0) @binding(0) var data: S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = data.vector * data.matrix; } diff --git a/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.wgsl index 10e087f1a8..aca7bee4c9 100644 --- a/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct S { vector : vec3; } -[[group(0), binding(0)]] var data : S; +@group(0) @binding(0) var data : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = (data.vector * data.matrix); } diff --git a/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl b/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl index 48b2709da8..5cceccb9c6 100644 --- a/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl +++ b/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl @@ -2,9 +2,9 @@ struct S { matrix : mat4x3; vector : vec3; }; -[[group(0), binding(0)]] var data: S; +@group(0) @binding(0) var data: S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = data.vector * data.matrix; } diff --git a/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.wgsl index 223240fc2c..a3bfccc173 100644 --- a/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.wgsl @@ -3,9 +3,9 @@ struct S { vector : vec3; } -[[group(0), binding(0)]] var data : S; +@group(0) @binding(0) var data : S; -[[stage(fragment)]] +@stage(fragment) fn main() { let x = (data.vector * data.matrix); } diff --git a/test/expressions/binary/mul/vec3-scalar/f32.wgsl b/test/expressions/binary/mul/vec3-scalar/f32.wgsl index 34a7b70a4b..10f72ae41e 100644 --- a/test/expressions/binary/mul/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = 4.; diff --git a/test/expressions/binary/mul/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-scalar/f32.wgsl.expected.wgsl index 712df519b7..b3acece835 100644 --- a/test/expressions/binary/mul/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = 4.0; diff --git a/test/expressions/binary/mul/vec3-scalar/i32.wgsl b/test/expressions/binary/mul/vec3-scalar/i32.wgsl index a8f8d1e160..d4d06787ac 100644 --- a/test/expressions/binary/mul/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.wgsl index d8f7e63221..a72729454a 100644 --- a/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/mul/vec3-scalar/u32.wgsl b/test/expressions/binary/mul/vec3-scalar/u32.wgsl index a63cb22eaa..03a79ac1aa 100644 --- a/test/expressions/binary/mul/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/mul/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-scalar/u32.wgsl.expected.wgsl index 995a6a3257..fc7e60dd3a 100644 --- a/test/expressions/binary/mul/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/mul/vec3-vec3/f32.wgsl b/test/expressions/binary/mul/vec3-vec3/f32.wgsl index 184a9fb872..6d0e2111ea 100644 --- a/test/expressions/binary/mul/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(4., 5., 6.); diff --git a/test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.wgsl index fff2a26852..a0dd1f7745 100644 --- a/test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(4.0, 5.0, 6.0); diff --git a/test/expressions/binary/mul/vec3-vec3/i32.wgsl b/test/expressions/binary/mul/vec3-vec3/i32.wgsl index dc812d8711..32ae83f005 100644 --- a/test/expressions/binary/mul/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.wgsl index 3ca04ae532..20121b5913 100644 --- a/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/mul/vec3-vec3/u32.wgsl b/test/expressions/binary/mul/vec3-vec3/u32.wgsl index d1e22195ef..39e1db491f 100644 --- a/test/expressions/binary/mul/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.wgsl index 4392855895..a910c86463 100644 --- a/test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl index ef2e9f97a2..54eda6d516 100644 --- a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2u; diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl index 9953bcc258..57f33c8958 100644 --- a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2u; diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl index ecfbc1b75b..4cf2a84532 100644 --- a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl index 3757438a87..827e23f748 100644 --- a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl index ffae0c15a6..366c8c440f 100644 --- a/test/expressions/binary/right-shift/vector-vector/i32.wgsl +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl index 765b4b1f50..96e088f710 100644 --- a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl index 35da87305d..a70095deb5 100644 --- a/test/expressions/binary/right-shift/vector-vector/u32.wgsl +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl index 7368058c4c..4b44e73d76 100644 --- a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl b/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl index 4dec34d5f7..1d90779f42 100644 --- a/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl +++ b/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3( 1., 2., 3.), vec3( 4., 5., 6.), vec3( 7., 8., 9.)); let b = mat3x3(vec3(-1., -2., -3.), vec3(-4., -5., -6.), vec3(-7., -8., -9.)); diff --git a/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl.expected.wgsl b/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl.expected.wgsl index 5003fea569..d54c2dcc11 100644 --- a/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/mat3x3-mat3x3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = mat3x3(vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0)); let b = mat3x3(vec3(-1.0, -2.0, -3.0), vec3(-4.0, -5.0, -6.0), vec3(-7.0, -8.0, -9.0)); diff --git a/test/expressions/binary/sub/scalar-scalar/f32.wgsl b/test/expressions/binary/sub/scalar-scalar/f32.wgsl index b0e6359df7..7aec1fe56c 100644 --- a/test/expressions/binary/sub/scalar-scalar/f32.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.; let b = 2.; diff --git a/test/expressions/binary/sub/scalar-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-scalar/f32.wgsl.expected.wgsl index ffc19e2fc1..7639858eaa 100644 --- a/test/expressions/binary/sub/scalar-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1.0; let b = 2.0; diff --git a/test/expressions/binary/sub/scalar-scalar/i32.wgsl b/test/expressions/binary/sub/scalar-scalar/i32.wgsl index 7d396dc2db..93fb7e057d 100644 --- a/test/expressions/binary/sub/scalar-scalar/i32.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.wgsl index d881d44582..9aa9bf3ed2 100644 --- a/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1; let b = 2; diff --git a/test/expressions/binary/sub/scalar-scalar/u32.wgsl b/test/expressions/binary/sub/scalar-scalar/u32.wgsl index 5f210c2aca..fa75c67a4c 100644 --- a/test/expressions/binary/sub/scalar-scalar/u32.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/sub/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-scalar/u32.wgsl.expected.wgsl index 932d0b7e62..81cbedda57 100644 --- a/test/expressions/binary/sub/scalar-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 1u; let b = 2u; diff --git a/test/expressions/binary/sub/scalar-vec3/f32.wgsl b/test/expressions/binary/sub/scalar-vec3/f32.wgsl index 1b23e493d8..8a4a112ee0 100644 --- a/test/expressions/binary/sub/scalar-vec3/f32.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.; let b = vec3(1., 2., 3.); diff --git a/test/expressions/binary/sub/scalar-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-vec3/f32.wgsl.expected.wgsl index 69ff882ef3..14046957cc 100644 --- a/test/expressions/binary/sub/scalar-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4.0; let b = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/binary/sub/scalar-vec3/i32.wgsl b/test/expressions/binary/sub/scalar-vec3/i32.wgsl index 1e024c5f7a..8b31299bfb 100644 --- a/test/expressions/binary/sub/scalar-vec3/i32.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.wgsl index 0efb53332c..bec3a199d7 100644 --- a/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4; let b = vec3(1, 2, 3); diff --git a/test/expressions/binary/sub/scalar-vec3/u32.wgsl b/test/expressions/binary/sub/scalar-vec3/u32.wgsl index 0042cc2127..562719f9cc 100644 --- a/test/expressions/binary/sub/scalar-vec3/u32.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/sub/scalar-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/sub/scalar-vec3/u32.wgsl.expected.wgsl index b78efa7dee..4e1bca98a9 100644 --- a/test/expressions/binary/sub/scalar-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/scalar-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = 4u; let b = vec3(1u, 2u, 3u); diff --git a/test/expressions/binary/sub/vec3-scalar/f32.wgsl b/test/expressions/binary/sub/vec3-scalar/f32.wgsl index 0bdf89ece2..4b4aced691 100644 --- a/test/expressions/binary/sub/vec3-scalar/f32.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = 4.; diff --git a/test/expressions/binary/sub/vec3-scalar/f32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-scalar/f32.wgsl.expected.wgsl index de0d72d8cf..169e9db17b 100644 --- a/test/expressions/binary/sub/vec3-scalar/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = 4.0; diff --git a/test/expressions/binary/sub/vec3-scalar/i32.wgsl b/test/expressions/binary/sub/vec3-scalar/i32.wgsl index 0fab83f689..e12a2bae2a 100644 --- a/test/expressions/binary/sub/vec3-scalar/i32.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.wgsl index ea16bd4809..003acfab8f 100644 --- a/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = 4; diff --git a/test/expressions/binary/sub/vec3-scalar/u32.wgsl b/test/expressions/binary/sub/vec3-scalar/u32.wgsl index 0ec431743a..f5e4e5adad 100644 --- a/test/expressions/binary/sub/vec3-scalar/u32.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/sub/vec3-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-scalar/u32.wgsl.expected.wgsl index 2052d8b345..9b9c0de2d3 100644 --- a/test/expressions/binary/sub/vec3-scalar/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-scalar/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = 4u; diff --git a/test/expressions/binary/sub/vec3-vec3/f32.wgsl b/test/expressions/binary/sub/vec3-vec3/f32.wgsl index 3bb31cf616..cea0bb7a8c 100644 --- a/test/expressions/binary/sub/vec3-vec3/f32.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1., 2., 3.); let b = vec3(4., 5., 6.); diff --git a/test/expressions/binary/sub/vec3-vec3/f32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-vec3/f32.wgsl.expected.wgsl index 8beb881dcf..60754052c5 100644 --- a/test/expressions/binary/sub/vec3-vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1.0, 2.0, 3.0); let b = vec3(4.0, 5.0, 6.0); diff --git a/test/expressions/binary/sub/vec3-vec3/i32.wgsl b/test/expressions/binary/sub/vec3-vec3/i32.wgsl index 7ecdc45b3f..2ab7275dad 100644 --- a/test/expressions/binary/sub/vec3-vec3/i32.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.wgsl index 00ff10961d..a5b306b812 100644 --- a/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1, 2, 3); let b = vec3(4, 5, 6); diff --git a/test/expressions/binary/sub/vec3-vec3/u32.wgsl b/test/expressions/binary/sub/vec3-vec3/u32.wgsl index 547383e3f4..cb59c1fd56 100644 --- a/test/expressions/binary/sub/vec3-vec3/u32.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/binary/sub/vec3-vec3/u32.wgsl.expected.wgsl b/test/expressions/binary/sub/vec3-vec3/u32.wgsl.expected.wgsl index 7559a1b7fe..dea4cfe84d 100644 --- a/test/expressions/binary/sub/vec3-vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/binary/sub/vec3-vec3/u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a = vec3(1u, 2u, 3u); let b = vec3(4u, 5u, 6u); diff --git a/test/expressions/bitcast/scalar/f32-f32.wgsl b/test/expressions/bitcast/scalar/f32-f32.wgsl index a91bec0b2a..0e7b8ba5c7 100644 --- a/test/expressions/bitcast/scalar/f32-f32.wgsl +++ b/test/expressions/bitcast/scalar/f32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/f32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/f32-f32.wgsl.expected.wgsl index 1d57da4ab5..ac6a874d8a 100644 --- a/test/expressions/bitcast/scalar/f32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/f32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.0; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/f32-i32.wgsl b/test/expressions/bitcast/scalar/f32-i32.wgsl index c54ab72667..91c3d8f2f0 100644 --- a/test/expressions/bitcast/scalar/f32-i32.wgsl +++ b/test/expressions/bitcast/scalar/f32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/f32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/f32-i32.wgsl.expected.wgsl index 331cca276f..81e6fa61ef 100644 --- a/test/expressions/bitcast/scalar/f32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/f32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.0; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/f32-u32.wgsl b/test/expressions/bitcast/scalar/f32-u32.wgsl index 0d799996a3..6f33d5adc8 100644 --- a/test/expressions/bitcast/scalar/f32-u32.wgsl +++ b/test/expressions/bitcast/scalar/f32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/f32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/f32-u32.wgsl.expected.wgsl index e52e25ee88..c230fb888c 100644 --- a/test/expressions/bitcast/scalar/f32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/f32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : f32 = 1.0; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-f32.wgsl b/test/expressions/bitcast/scalar/i32-f32.wgsl index f398e9606f..00a8099ce8 100644 --- a/test/expressions/bitcast/scalar/i32-f32.wgsl +++ b/test/expressions/bitcast/scalar/i32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/i32-f32.wgsl.expected.wgsl index 9471a5659d..1aae69a801 100644 --- a/test/expressions/bitcast/scalar/i32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/i32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-i32.wgsl b/test/expressions/bitcast/scalar/i32-i32.wgsl index eaacdd1385..282e2183fc 100644 --- a/test/expressions/bitcast/scalar/i32-i32.wgsl +++ b/test/expressions/bitcast/scalar/i32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/i32-i32.wgsl.expected.wgsl index ed264204f8..9ecbee506d 100644 --- a/test/expressions/bitcast/scalar/i32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/i32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-u32.wgsl b/test/expressions/bitcast/scalar/i32-u32.wgsl index f11e65d39a..ebb81b4d91 100644 --- a/test/expressions/bitcast/scalar/i32-u32.wgsl +++ b/test/expressions/bitcast/scalar/i32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/i32-u32.wgsl.expected.wgsl index 6c7b9f9f4d..cb8e316d19 100644 --- a/test/expressions/bitcast/scalar/i32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/i32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : i32 = 1; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/i32min-u32.wgsl b/test/expressions/bitcast/scalar/i32min-u32.wgsl index 9812c83dbd..de5778872b 100644 --- a/test/expressions/bitcast/scalar/i32min-u32.wgsl +++ b/test/expressions/bitcast/scalar/i32min-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let b : u32 = bitcast(-2147483648); } diff --git a/test/expressions/bitcast/scalar/i32min-u32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/i32min-u32.wgsl.expected.wgsl index 9812c83dbd..de5778872b 100644 --- a/test/expressions/bitcast/scalar/i32min-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/i32min-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let b : u32 = bitcast(-2147483648); } diff --git a/test/expressions/bitcast/scalar/u32-f32.wgsl b/test/expressions/bitcast/scalar/u32-f32.wgsl index 82c62b723f..c196d83133 100644 --- a/test/expressions/bitcast/scalar/u32-f32.wgsl +++ b/test/expressions/bitcast/scalar/u32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/u32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/u32-f32.wgsl.expected.wgsl index 9efbcfd489..7c0cb22da5 100644 --- a/test/expressions/bitcast/scalar/u32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/u32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : f32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/u32-i32.wgsl b/test/expressions/bitcast/scalar/u32-i32.wgsl index 91b4230eec..9d6785a46d 100644 --- a/test/expressions/bitcast/scalar/u32-i32.wgsl +++ b/test/expressions/bitcast/scalar/u32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/u32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/u32-i32.wgsl.expected.wgsl index 9ac119d6c7..4d8f585d66 100644 --- a/test/expressions/bitcast/scalar/u32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/u32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : i32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/u32-u32.wgsl b/test/expressions/bitcast/scalar/u32-u32.wgsl index ceddfa24d4..35f0a23af2 100644 --- a/test/expressions/bitcast/scalar/u32-u32.wgsl +++ b/test/expressions/bitcast/scalar/u32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/scalar/u32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/scalar/u32-u32.wgsl.expected.wgsl index 4fde9637e8..45c6de7c33 100644 --- a/test/expressions/bitcast/scalar/u32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/scalar/u32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : u32 = 1u; let b : u32 = bitcast(a); diff --git a/test/expressions/bitcast/vector/f32-f32.wgsl b/test/expressions/bitcast/vector/f32-f32.wgsl index 2e863d3752..8842275cc3 100644 --- a/test/expressions/bitcast/vector/f32-f32.wgsl +++ b/test/expressions/bitcast/vector/f32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1., 2., 3.); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/f32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/f32-f32.wgsl.expected.wgsl index 5ed2541646..1af19c7ba3 100644 --- a/test/expressions/bitcast/vector/f32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/f32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1.0, 2.0, 3.0); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/f32-i32.wgsl b/test/expressions/bitcast/vector/f32-i32.wgsl index 493dddd14a..69a8ee6a4e 100644 --- a/test/expressions/bitcast/vector/f32-i32.wgsl +++ b/test/expressions/bitcast/vector/f32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1., 2., 3.); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/f32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/f32-i32.wgsl.expected.wgsl index e4363c809f..6f7c20ec6d 100644 --- a/test/expressions/bitcast/vector/f32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/f32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1.0, 2.0, 3.0); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/f32-u32.wgsl b/test/expressions/bitcast/vector/f32-u32.wgsl index 7daf4109df..c478dc8b0e 100644 --- a/test/expressions/bitcast/vector/f32-u32.wgsl +++ b/test/expressions/bitcast/vector/f32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1., 2., 3.); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/f32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/f32-u32.wgsl.expected.wgsl index 6cd21fadee..d47bade91a 100644 --- a/test/expressions/bitcast/vector/f32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/f32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1.0, 2.0, 3.0); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-f32.wgsl b/test/expressions/bitcast/vector/i32-f32.wgsl index e3bc280750..7fa9e52851 100644 --- a/test/expressions/bitcast/vector/i32-f32.wgsl +++ b/test/expressions/bitcast/vector/i32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/i32-f32.wgsl.expected.wgsl index a7a19eae12..424988de59 100644 --- a/test/expressions/bitcast/vector/i32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/i32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-i32.wgsl b/test/expressions/bitcast/vector/i32-i32.wgsl index 314939597c..1b332c6636 100644 --- a/test/expressions/bitcast/vector/i32-i32.wgsl +++ b/test/expressions/bitcast/vector/i32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/i32-i32.wgsl.expected.wgsl index 94f3acd3a2..b77a8bfd48 100644 --- a/test/expressions/bitcast/vector/i32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/i32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-u32.wgsl b/test/expressions/bitcast/vector/i32-u32.wgsl index e3cf1fa586..f60a90455c 100644 --- a/test/expressions/bitcast/vector/i32-u32.wgsl +++ b/test/expressions/bitcast/vector/i32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/i32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/i32-u32.wgsl.expected.wgsl index 64dd507141..a0d6f73acc 100644 --- a/test/expressions/bitcast/vector/i32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/i32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1, 2, 3); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-f32.wgsl b/test/expressions/bitcast/vector/u32-f32.wgsl index 4323361138..76adfdddf8 100644 --- a/test/expressions/bitcast/vector/u32-f32.wgsl +++ b/test/expressions/bitcast/vector/u32-f32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-f32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/u32-f32.wgsl.expected.wgsl index e74cdd3689..dd4b3a348f 100644 --- a/test/expressions/bitcast/vector/u32-f32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/u32-f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-i32.wgsl b/test/expressions/bitcast/vector/u32-i32.wgsl index 6efefc3dc1..9ae5c29240 100644 --- a/test/expressions/bitcast/vector/u32-i32.wgsl +++ b/test/expressions/bitcast/vector/u32-i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-i32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/u32-i32.wgsl.expected.wgsl index db1bd621d9..7291adea9e 100644 --- a/test/expressions/bitcast/vector/u32-i32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/u32-i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-u32.wgsl b/test/expressions/bitcast/vector/u32-u32.wgsl index 99d2211fc9..277597db2d 100644 --- a/test/expressions/bitcast/vector/u32-u32.wgsl +++ b/test/expressions/bitcast/vector/u32-u32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/bitcast/vector/u32-u32.wgsl.expected.wgsl b/test/expressions/bitcast/vector/u32-u32.wgsl.expected.wgsl index 6bad22d20b..86d926565f 100644 --- a/test/expressions/bitcast/vector/u32-u32.wgsl.expected.wgsl +++ b/test/expressions/bitcast/vector/u32-u32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let a : vec3 = vec3(1u, 2u, 3u); let b : vec3 = bitcast>(a); diff --git a/test/expressions/literals/-inf.spvasm.expected.wgsl b/test/expressions/literals/-inf.spvasm.expected.wgsl index 60e728102e..738effc327 100644 --- a/test/expressions/literals/-inf.spvasm.expected.wgsl +++ b/test/expressions/literals/-inf.spvasm.expected.wgsl @@ -6,11 +6,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) out_var_SV_TARGET_1 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(out_var_SV_TARGET); diff --git a/test/expressions/literals/inf.spvasm.expected.wgsl b/test/expressions/literals/inf.spvasm.expected.wgsl index 0389b9860d..9fc866d5a0 100644 --- a/test/expressions/literals/inf.spvasm.expected.wgsl +++ b/test/expressions/literals/inf.spvasm.expected.wgsl @@ -6,11 +6,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) out_var_SV_TARGET_1 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(out_var_SV_TARGET); diff --git a/test/expressions/literals/nan.spvasm.expected.wgsl b/test/expressions/literals/nan.spvasm.expected.wgsl index 816c89ee24..a53b01dae9 100644 --- a/test/expressions/literals/nan.spvasm.expected.wgsl +++ b/test/expressions/literals/nan.spvasm.expected.wgsl @@ -6,11 +6,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) out_var_SV_TARGET_1 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(out_var_SV_TARGET); diff --git a/test/expressions/swizzle/read/packed_vec3/f32.wgsl b/test/expressions/swizzle/read/packed_vec3/f32.wgsl index dd4826a0ea..cb779ee3cf 100644 --- a/test/expressions/swizzle/read/packed_vec3/f32.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/f32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.wgsl b/test/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.wgsl index 727788bee9..1f87362393 100644 --- a/test/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/read/packed_vec3/i32.wgsl b/test/expressions/swizzle/read/packed_vec3/i32.wgsl index b81d0ddb68..6780f9f112 100644 --- a/test/expressions/swizzle/read/packed_vec3/i32.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/i32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.wgsl b/test/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.wgsl index dffd20c935..a79daa45f2 100644 --- a/test/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/read/packed_vec3/u32.wgsl b/test/expressions/swizzle/read/packed_vec3/u32.wgsl index d0497a66df..afd1fa5332 100644 --- a/test/expressions/swizzle/read/packed_vec3/u32.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/u32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.wgsl b/test/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.wgsl index 36bf160bae..836c6175d4 100644 --- a/test/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { var v = U.v; diff --git a/test/expressions/swizzle/write/packed_vec3/f32.wgsl b/test/expressions/swizzle/write/packed_vec3/f32.wgsl index 9a194ea6bc..623d785903 100644 --- a/test/expressions/swizzle/write/packed_vec3/f32.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/f32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.wgsl b/test/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.wgsl index 84f2ef9b70..b5f5abcf11 100644 --- a/test/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1.0, 2.0, 3.0); diff --git a/test/expressions/swizzle/write/packed_vec3/i32.wgsl b/test/expressions/swizzle/write/packed_vec3/i32.wgsl index 288062243b..5441f0a8a0 100644 --- a/test/expressions/swizzle/write/packed_vec3/i32.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/i32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1, 2, 3); diff --git a/test/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.wgsl b/test/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.wgsl index a0175896cd..762409aa3f 100644 --- a/test/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1, 2, 3); diff --git a/test/expressions/swizzle/write/packed_vec3/u32.wgsl b/test/expressions/swizzle/write/packed_vec3/u32.wgsl index 4dd1bfda3d..0a3ee66342 100644 --- a/test/expressions/swizzle/write/packed_vec3/u32.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/u32.wgsl @@ -2,7 +2,7 @@ struct S { v: vec3; }; -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1u, 2u, 3u); diff --git a/test/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.wgsl b/test/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.wgsl index b9c4866126..e87b5512dd 100644 --- a/test/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.wgsl +++ b/test/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { v : vec3; } -[[group(0), binding(0)]] var U : S; +@group(0) @binding(0) var U : S; fn f() { U.v = vec3(1u, 2u, 3u); diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl b/test/intrinsics/arrayLength/complex_via_let.wgsl index 4b3a76dc2a..76dd5a202c 100644 --- a/test/intrinsics/arrayLength/complex_via_let.wgsl +++ b/test/intrinsics/arrayLength/complex_via_let.wgsl @@ -2,9 +2,9 @@ struct S { a : array; }; -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &G; let p2 = &((*p).a); diff --git a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl b/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl index 1dcc7b115c..3701b01b1e 100644 --- a/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/complex_via_let.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : array; } -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(G); let p2 = &((*(p)).a); diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl b/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl index 2e2966d627..8626deeb04 100644 --- a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl +++ b/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &G; let p2 = &(*p); diff --git a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl b/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl index 56b0e0ab8b..2d06902eb1 100644 --- a/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/complex_via_let_no_struct.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(G); let p2 = &(*(p)); diff --git a/test/intrinsics/arrayLength/deprecated.wgsl b/test/intrinsics/arrayLength/deprecated.wgsl index c3381aa571..ce9d77cc23 100644 --- a/test/intrinsics/arrayLength/deprecated.wgsl +++ b/test/intrinsics/arrayLength/deprecated.wgsl @@ -2,9 +2,9 @@ struct S { a : array; }; -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&G.a); diff --git a/test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl b/test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl index 5489c10451..2cc825e078 100644 --- a/test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/deprecated.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : array; } -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&(G.a)); let p = &(G.a); diff --git a/test/intrinsics/arrayLength/simple.wgsl b/test/intrinsics/arrayLength/simple.wgsl index d3cba2ab79..95037fe70d 100644 --- a/test/intrinsics/arrayLength/simple.wgsl +++ b/test/intrinsics/arrayLength/simple.wgsl @@ -2,9 +2,9 @@ struct S { a : array; }; -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&G.a); } diff --git a/test/intrinsics/arrayLength/simple.wgsl.expected.wgsl b/test/intrinsics/arrayLength/simple.wgsl.expected.wgsl index 9b7d0494f5..f9fdd9145e 100644 --- a/test/intrinsics/arrayLength/simple.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/simple.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : array; } -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&(G.a)); } diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl b/test/intrinsics/arrayLength/simple_no_struct.wgsl index 0fcbfbecb4..985c87e1be 100644 --- a/test/intrinsics/arrayLength/simple_no_struct.wgsl +++ b/test/intrinsics/arrayLength/simple_no_struct.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&G); } diff --git a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl b/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl index cbe8d72f41..b45cd361c6 100644 --- a/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/simple_no_struct.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let l1 : u32 = arrayLength(&(G)); } diff --git a/test/intrinsics/arrayLength/via_let.wgsl b/test/intrinsics/arrayLength/via_let.wgsl index d9d71f5171..53e45ba800 100644 --- a/test/intrinsics/arrayLength/via_let.wgsl +++ b/test/intrinsics/arrayLength/via_let.wgsl @@ -2,9 +2,9 @@ struct S { a : array; }; -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &G.a; let p2 = p; diff --git a/test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl b/test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl index 13663f0105..25ab694e0e 100644 --- a/test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/via_let.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : array; } -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(G.a); let p2 = p; diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl b/test/intrinsics/arrayLength/via_let_complex.wgsl index 98cfdd4916..bd99c11cfb 100644 --- a/test/intrinsics/arrayLength/via_let_complex.wgsl +++ b/test/intrinsics/arrayLength/via_let_complex.wgsl @@ -2,9 +2,9 @@ struct S { a : array; }; -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &*&G; let p2 = &*p; diff --git a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl b/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl index 7b0795290c..30f059a14c 100644 --- a/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/via_let_complex.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : array; } -[[group(0), binding(0)]] var G : S; +@group(0) @binding(0) var G : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(*(&(G))); let p2 = &(*(p)); diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl b/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl index 4e8a6c5a37..dd8beb64e7 100644 --- a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl +++ b/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &*&G; let p2 = &*p; diff --git a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl b/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl index 97964a41e4..a92b9beb26 100644 --- a/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/via_let_complex_no_struct.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(*(&(G))); let p2 = &(*(p)); diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl b/test/intrinsics/arrayLength/via_let_no_struct.wgsl index 83ab810423..203f0e0666 100644 --- a/test/intrinsics/arrayLength/via_let_no_struct.wgsl +++ b/test/intrinsics/arrayLength/via_let_no_struct.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &G; let p2 = p; diff --git a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl b/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl index 731ba0c459..3e0760312f 100644 --- a/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl +++ b/test/intrinsics/arrayLength/via_let_no_struct.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var G : array; +@group(0) @binding(0) var G : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p = &(G); let p2 = p; diff --git a/test/intrinsics/degrees.spvasm.expected.wgsl b/test/intrinsics/degrees.spvasm.expected.wgsl index a46678b2b7..be5b765121 100644 --- a/test/intrinsics/degrees.spvasm.expected.wgsl +++ b/test/intrinsics/degrees.spvasm.expected.wgsl @@ -7,7 +7,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/intrinsics/frexp.wgsl b/test/intrinsics/frexp.wgsl index fed55e561e..f4c30d4644 100644 --- a/test/intrinsics/frexp.wgsl +++ b/test/intrinsics/frexp.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let res = frexp(1.23); let exp : i32 = res.exp; diff --git a/test/intrinsics/frexp.wgsl.expected.wgsl b/test/intrinsics/frexp.wgsl.expected.wgsl index 519ffb6b35..50cbd404e5 100644 --- a/test/intrinsics/frexp.wgsl.expected.wgsl +++ b/test/intrinsics/frexp.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let res = frexp(1.230000019); let exp : i32 = res.exp; diff --git a/test/intrinsics/gen/abs/002533.wgsl b/test/intrinsics/gen/abs/002533.wgsl index ca4432315b..1a7c3f8982 100644 --- a/test/intrinsics/gen/abs/002533.wgsl +++ b/test/intrinsics/gen/abs/002533.wgsl @@ -28,18 +28,18 @@ fn abs_002533() { var res: vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_002533(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_002533(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_002533(); } diff --git a/test/intrinsics/gen/abs/002533.wgsl.expected.wgsl b/test/intrinsics/gen/abs/002533.wgsl.expected.wgsl index e9cb96a2c1..8edc059f0c 100644 --- a/test/intrinsics/gen/abs/002533.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/002533.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_002533() { var res : vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_002533(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_002533(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_002533(); } diff --git a/test/intrinsics/gen/abs/005174.wgsl b/test/intrinsics/gen/abs/005174.wgsl index 4e96bdfd75..ecbf4094e6 100644 --- a/test/intrinsics/gen/abs/005174.wgsl +++ b/test/intrinsics/gen/abs/005174.wgsl @@ -28,18 +28,18 @@ fn abs_005174() { var res: vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_005174(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_005174(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_005174(); } diff --git a/test/intrinsics/gen/abs/005174.wgsl.expected.wgsl b/test/intrinsics/gen/abs/005174.wgsl.expected.wgsl index 091464d421..0675fff80c 100644 --- a/test/intrinsics/gen/abs/005174.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/005174.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_005174() { var res : vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_005174(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_005174(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_005174(); } diff --git a/test/intrinsics/gen/abs/1ce782.wgsl b/test/intrinsics/gen/abs/1ce782.wgsl index 8d23e13472..7a7666e2cc 100644 --- a/test/intrinsics/gen/abs/1ce782.wgsl +++ b/test/intrinsics/gen/abs/1ce782.wgsl @@ -28,18 +28,18 @@ fn abs_1ce782() { var res: vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_1ce782(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_1ce782(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_1ce782(); } diff --git a/test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl b/test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl index dfba5c2fdb..02c1c23454 100644 --- a/test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/1ce782.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_1ce782() { var res : vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_1ce782(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_1ce782(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_1ce782(); } diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl b/test/intrinsics/gen/abs/1e9d53.wgsl index f3c08aee8c..45cac6d961 100644 --- a/test/intrinsics/gen/abs/1e9d53.wgsl +++ b/test/intrinsics/gen/abs/1e9d53.wgsl @@ -28,18 +28,18 @@ fn abs_1e9d53() { var res: vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_1e9d53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_1e9d53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_1e9d53(); } diff --git a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl index 50413db889..ba2ae4b4be 100644 --- a/test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/1e9d53.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_1e9d53() { var res : vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_1e9d53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_1e9d53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_1e9d53(); } diff --git a/test/intrinsics/gen/abs/467cd1.wgsl b/test/intrinsics/gen/abs/467cd1.wgsl index 266e0b79ae..99b46e2621 100644 --- a/test/intrinsics/gen/abs/467cd1.wgsl +++ b/test/intrinsics/gen/abs/467cd1.wgsl @@ -28,18 +28,18 @@ fn abs_467cd1() { var res: u32 = abs(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_467cd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_467cd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_467cd1(); } diff --git a/test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl b/test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl index c84d39713e..0af41411e1 100644 --- a/test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/467cd1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_467cd1() { var res : u32 = abs(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_467cd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_467cd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_467cd1(); } diff --git a/test/intrinsics/gen/abs/4ad288.wgsl b/test/intrinsics/gen/abs/4ad288.wgsl index 38f639bd84..b342fa722c 100644 --- a/test/intrinsics/gen/abs/4ad288.wgsl +++ b/test/intrinsics/gen/abs/4ad288.wgsl @@ -28,18 +28,18 @@ fn abs_4ad288() { var res: i32 = abs(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_4ad288(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_4ad288(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_4ad288(); } diff --git a/test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl b/test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl index 4d60d168de..e96f64463a 100644 --- a/test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/4ad288.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_4ad288() { var res : i32 = abs(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_4ad288(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_4ad288(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_4ad288(); } diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl b/test/intrinsics/gen/abs/5ad50a.wgsl index 1e6c03419f..8cd67254d7 100644 --- a/test/intrinsics/gen/abs/5ad50a.wgsl +++ b/test/intrinsics/gen/abs/5ad50a.wgsl @@ -28,18 +28,18 @@ fn abs_5ad50a() { var res: vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_5ad50a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_5ad50a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_5ad50a(); } diff --git a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl index 067b7390c9..d1cf47f3cd 100644 --- a/test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/5ad50a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_5ad50a() { var res : vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_5ad50a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_5ad50a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_5ad50a(); } diff --git a/test/intrinsics/gen/abs/7326de.wgsl b/test/intrinsics/gen/abs/7326de.wgsl index e7e8563a91..ce2be5384e 100644 --- a/test/intrinsics/gen/abs/7326de.wgsl +++ b/test/intrinsics/gen/abs/7326de.wgsl @@ -28,18 +28,18 @@ fn abs_7326de() { var res: vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7326de(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7326de(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7326de(); } diff --git a/test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl b/test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl index 0303cc6b81..4d07d263f1 100644 --- a/test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/7326de.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_7326de() { var res : vec3 = abs(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7326de(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7326de(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7326de(); } diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl b/test/intrinsics/gen/abs/7f28e6.wgsl index 0af90f4ec2..cbdeef0f35 100644 --- a/test/intrinsics/gen/abs/7f28e6.wgsl +++ b/test/intrinsics/gen/abs/7f28e6.wgsl @@ -28,18 +28,18 @@ fn abs_7f28e6() { var res: vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7f28e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7f28e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7f28e6(); } diff --git a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl index 698a0fb0df..8f83b406dc 100644 --- a/test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/7f28e6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_7f28e6() { var res : vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7f28e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7f28e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7f28e6(); } diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl b/test/intrinsics/gen/abs/7faa9e.wgsl index bdc81c080e..8b250ee774 100644 --- a/test/intrinsics/gen/abs/7faa9e.wgsl +++ b/test/intrinsics/gen/abs/7faa9e.wgsl @@ -28,18 +28,18 @@ fn abs_7faa9e() { var res: vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7faa9e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7faa9e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7faa9e(); } diff --git a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl index 9929c7899f..c8e0001e08 100644 --- a/test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/7faa9e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_7faa9e() { var res : vec2 = abs(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_7faa9e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_7faa9e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_7faa9e(); } diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl b/test/intrinsics/gen/abs/9c80a6.wgsl index ba87252a31..71ef852786 100644 --- a/test/intrinsics/gen/abs/9c80a6.wgsl +++ b/test/intrinsics/gen/abs/9c80a6.wgsl @@ -28,18 +28,18 @@ fn abs_9c80a6() { var res: vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_9c80a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_9c80a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_9c80a6(); } diff --git a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl index c3190a5b6b..6e3519d381 100644 --- a/test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/9c80a6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_9c80a6() { var res : vec4 = abs(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_9c80a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_9c80a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_9c80a6(); } diff --git a/test/intrinsics/gen/abs/b96037.wgsl b/test/intrinsics/gen/abs/b96037.wgsl index 5112a85e51..dddc75e408 100644 --- a/test/intrinsics/gen/abs/b96037.wgsl +++ b/test/intrinsics/gen/abs/b96037.wgsl @@ -28,18 +28,18 @@ fn abs_b96037() { var res: f32 = abs(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_b96037(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_b96037(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_b96037(); } diff --git a/test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl b/test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl index d5b6041a08..22c47c28e2 100644 --- a/test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl +++ b/test/intrinsics/gen/abs/b96037.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn abs_b96037() { var res : f32 = abs(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { abs_b96037(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { abs_b96037(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { abs_b96037(); } diff --git a/test/intrinsics/gen/acos/489247.wgsl b/test/intrinsics/gen/acos/489247.wgsl index c8251f85b9..d2f227ac45 100644 --- a/test/intrinsics/gen/acos/489247.wgsl +++ b/test/intrinsics/gen/acos/489247.wgsl @@ -28,18 +28,18 @@ fn acos_489247() { var res: f32 = acos(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_489247(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_489247(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_489247(); } diff --git a/test/intrinsics/gen/acos/489247.wgsl.expected.wgsl b/test/intrinsics/gen/acos/489247.wgsl.expected.wgsl index a67ffde6cc..d8570fb212 100644 --- a/test/intrinsics/gen/acos/489247.wgsl.expected.wgsl +++ b/test/intrinsics/gen/acos/489247.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn acos_489247() { var res : f32 = acos(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_489247(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_489247(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_489247(); } diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl b/test/intrinsics/gen/acos/8e2acf.wgsl index 17d366eb3c..e085faec12 100644 --- a/test/intrinsics/gen/acos/8e2acf.wgsl +++ b/test/intrinsics/gen/acos/8e2acf.wgsl @@ -28,18 +28,18 @@ fn acos_8e2acf() { var res: vec4 = acos(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_8e2acf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_8e2acf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_8e2acf(); } diff --git a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl index 756d867d91..c03ab26213 100644 --- a/test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/acos/8e2acf.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn acos_8e2acf() { var res : vec4 = acos(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_8e2acf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_8e2acf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_8e2acf(); } diff --git a/test/intrinsics/gen/acos/a610c4.wgsl b/test/intrinsics/gen/acos/a610c4.wgsl index 9d4a2737db..7f7be34718 100644 --- a/test/intrinsics/gen/acos/a610c4.wgsl +++ b/test/intrinsics/gen/acos/a610c4.wgsl @@ -28,18 +28,18 @@ fn acos_a610c4() { var res: vec3 = acos(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_a610c4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_a610c4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_a610c4(); } diff --git a/test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl b/test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl index 818b4ba61c..24807be11d 100644 --- a/test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/acos/a610c4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn acos_a610c4() { var res : vec3 = acos(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_a610c4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_a610c4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_a610c4(); } diff --git a/test/intrinsics/gen/acos/dfc915.wgsl b/test/intrinsics/gen/acos/dfc915.wgsl index 1b65a6c6b8..5e27bf8a0f 100644 --- a/test/intrinsics/gen/acos/dfc915.wgsl +++ b/test/intrinsics/gen/acos/dfc915.wgsl @@ -28,18 +28,18 @@ fn acos_dfc915() { var res: vec2 = acos(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_dfc915(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_dfc915(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_dfc915(); } diff --git a/test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl b/test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl index 631502cf14..e16d1eabe3 100644 --- a/test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl +++ b/test/intrinsics/gen/acos/dfc915.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn acos_dfc915() { var res : vec2 = acos(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { acos_dfc915(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { acos_dfc915(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { acos_dfc915(); } diff --git a/test/intrinsics/gen/all/353d6a.wgsl b/test/intrinsics/gen/all/353d6a.wgsl index cfaab0b042..fbfe933b7f 100644 --- a/test/intrinsics/gen/all/353d6a.wgsl +++ b/test/intrinsics/gen/all/353d6a.wgsl @@ -28,18 +28,18 @@ fn all_353d6a() { var res: bool = all(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_353d6a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_353d6a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_353d6a(); } diff --git a/test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl b/test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl index c1da74d9fa..b1ae87d5d6 100644 --- a/test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/all/353d6a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn all_353d6a() { var res : bool = all(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_353d6a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_353d6a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_353d6a(); } diff --git a/test/intrinsics/gen/all/986c7b.wgsl b/test/intrinsics/gen/all/986c7b.wgsl index 9f6048439c..515f3a30cb 100644 --- a/test/intrinsics/gen/all/986c7b.wgsl +++ b/test/intrinsics/gen/all/986c7b.wgsl @@ -28,18 +28,18 @@ fn all_986c7b() { var res: bool = all(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_986c7b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_986c7b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_986c7b(); } diff --git a/test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl b/test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl index e1242e8b0d..919532111f 100644 --- a/test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/all/986c7b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn all_986c7b() { var res : bool = all(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_986c7b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_986c7b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_986c7b(); } diff --git a/test/intrinsics/gen/all/bd2dba.wgsl b/test/intrinsics/gen/all/bd2dba.wgsl index d098c182ee..657678fd43 100644 --- a/test/intrinsics/gen/all/bd2dba.wgsl +++ b/test/intrinsics/gen/all/bd2dba.wgsl @@ -28,18 +28,18 @@ fn all_bd2dba() { var res: bool = all(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_bd2dba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_bd2dba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_bd2dba(); } diff --git a/test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl b/test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl index b527c6b328..9ec977d188 100644 --- a/test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/all/bd2dba.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn all_bd2dba() { var res : bool = all(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_bd2dba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_bd2dba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_bd2dba(); } diff --git a/test/intrinsics/gen/all/f46790.wgsl b/test/intrinsics/gen/all/f46790.wgsl index c744d5d918..875da79314 100644 --- a/test/intrinsics/gen/all/f46790.wgsl +++ b/test/intrinsics/gen/all/f46790.wgsl @@ -28,18 +28,18 @@ fn all_f46790() { var res: bool = all(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_f46790(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_f46790(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_f46790(); } diff --git a/test/intrinsics/gen/all/f46790.wgsl.expected.wgsl b/test/intrinsics/gen/all/f46790.wgsl.expected.wgsl index 3dbfa28d2a..a222bb5a2c 100644 --- a/test/intrinsics/gen/all/f46790.wgsl.expected.wgsl +++ b/test/intrinsics/gen/all/f46790.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn all_f46790() { var res : bool = all(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { all_f46790(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { all_f46790(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { all_f46790(); } diff --git a/test/intrinsics/gen/any/083428.wgsl b/test/intrinsics/gen/any/083428.wgsl index df698b1eb0..8aecc0f1fa 100644 --- a/test/intrinsics/gen/any/083428.wgsl +++ b/test/intrinsics/gen/any/083428.wgsl @@ -28,18 +28,18 @@ fn any_083428() { var res: bool = any(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_083428(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_083428(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_083428(); } diff --git a/test/intrinsics/gen/any/083428.wgsl.expected.wgsl b/test/intrinsics/gen/any/083428.wgsl.expected.wgsl index 12391bd344..acd23c8424 100644 --- a/test/intrinsics/gen/any/083428.wgsl.expected.wgsl +++ b/test/intrinsics/gen/any/083428.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn any_083428() { var res : bool = any(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_083428(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_083428(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_083428(); } diff --git a/test/intrinsics/gen/any/0e3e58.wgsl b/test/intrinsics/gen/any/0e3e58.wgsl index 08998fc5fc..71bda253ab 100644 --- a/test/intrinsics/gen/any/0e3e58.wgsl +++ b/test/intrinsics/gen/any/0e3e58.wgsl @@ -28,18 +28,18 @@ fn any_0e3e58() { var res: bool = any(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_0e3e58(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_0e3e58(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_0e3e58(); } diff --git a/test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl b/test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl index d8c6a419a1..c94d9a1029 100644 --- a/test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl +++ b/test/intrinsics/gen/any/0e3e58.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn any_0e3e58() { var res : bool = any(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_0e3e58(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_0e3e58(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_0e3e58(); } diff --git a/test/intrinsics/gen/any/2ab91a.wgsl b/test/intrinsics/gen/any/2ab91a.wgsl index 6eac503644..6b6b067cf3 100644 --- a/test/intrinsics/gen/any/2ab91a.wgsl +++ b/test/intrinsics/gen/any/2ab91a.wgsl @@ -28,18 +28,18 @@ fn any_2ab91a() { var res: bool = any(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_2ab91a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_2ab91a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_2ab91a(); } diff --git a/test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl b/test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl index a672f82762..283ab5a7dc 100644 --- a/test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/any/2ab91a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn any_2ab91a() { var res : bool = any(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_2ab91a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_2ab91a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_2ab91a(); } diff --git a/test/intrinsics/gen/any/e755c1.wgsl b/test/intrinsics/gen/any/e755c1.wgsl index 4104c37bb9..b27d31abca 100644 --- a/test/intrinsics/gen/any/e755c1.wgsl +++ b/test/intrinsics/gen/any/e755c1.wgsl @@ -28,18 +28,18 @@ fn any_e755c1() { var res: bool = any(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_e755c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_e755c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_e755c1(); } diff --git a/test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl b/test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl index b8da397f84..bf47826409 100644 --- a/test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/any/e755c1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn any_e755c1() { var res : bool = any(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { any_e755c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { any_e755c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { any_e755c1(); } diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl b/test/intrinsics/gen/arrayLength/1588cd.wgsl index f4a41231b7..727e8bdbd3 100644 --- a/test/intrinsics/gen/arrayLength/1588cd.wgsl +++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl @@ -25,25 +25,25 @@ struct SB_RO { arg_0: array; }; -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; // fn arrayLength(ptr, read>) -> u32 fn arrayLength_1588cd() { var res: u32 = arrayLength(&sb_ro.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_1588cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_1588cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_1588cd(); } diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl index 645da49d5a..bbf5a368f1 100644 --- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RO { arg_0 : array; } -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; fn arrayLength_1588cd() { var res : u32 = arrayLength(&(sb_ro.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_1588cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_1588cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_1588cd(); } diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl index 8716a4ef40..02b7f3d723 100644 --- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl +++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl @@ -25,25 +25,25 @@ struct SB_RW { arg_0: array; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn arrayLength(ptr, read_write>) -> u32 fn arrayLength_61b1c7() { var res: u32 = arrayLength(&sb_rw.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_61b1c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_61b1c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_61b1c7(); } diff --git a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl index f1d33c25ae..fdd6856d2b 100644 --- a/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/61b1c7.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RW { arg_0 : array; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn arrayLength_61b1c7() { var res : u32 = arrayLength(&(sb_rw.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_61b1c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_61b1c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_61b1c7(); } diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl index c367b4da03..192d2881f3 100644 --- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl +++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl @@ -25,25 +25,25 @@ struct SB_RO { arg_0: array; }; -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; // fn arrayLength(ptr, read>) -> u32 fn arrayLength_a0f5ca() { var res: u32 = arrayLength(&sb_ro.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_a0f5ca(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_a0f5ca(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_a0f5ca(); } diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl index 85468b46df..d26abde9d9 100644 --- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RO { arg_0 : array; } -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; fn arrayLength_a0f5ca() { var res : u32 = arrayLength(&(sb_ro.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_a0f5ca(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_a0f5ca(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_a0f5ca(); } diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl b/test/intrinsics/gen/arrayLength/cdd123.wgsl index cd4b56a31c..03948a999b 100644 --- a/test/intrinsics/gen/arrayLength/cdd123.wgsl +++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl @@ -25,25 +25,25 @@ struct SB_RW { arg_0: array; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn arrayLength(ptr, read_write>) -> u32 fn arrayLength_cdd123() { var res: u32 = arrayLength(&sb_rw.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_cdd123(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_cdd123(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_cdd123(); } diff --git a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl index 65a2077866..382f3565b9 100644 --- a/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/cdd123.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RW { arg_0 : array; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn arrayLength_cdd123() { var res : u32 = arrayLength(&(sb_rw.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_cdd123(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_cdd123(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_cdd123(); } diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl index c89fb1d4d4..e3f72dd27c 100644 --- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl +++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl @@ -25,25 +25,25 @@ struct SB_RO { arg_0: array; }; -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; // fn arrayLength(ptr, read>) -> u32 fn arrayLength_cfca0a() { var res: u32 = arrayLength(&sb_ro.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_cfca0a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_cfca0a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_cfca0a(); } diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl index 8930be06ab..5780c79692 100644 --- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RO { arg_0 : array; } -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; fn arrayLength_cfca0a() { var res : u32 = arrayLength(&(sb_ro.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_cfca0a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_cfca0a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_cfca0a(); } diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl b/test/intrinsics/gen/arrayLength/eb510f.wgsl index 0f7df323b6..86133e53b1 100644 --- a/test/intrinsics/gen/arrayLength/eb510f.wgsl +++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl @@ -25,25 +25,25 @@ struct SB_RW { arg_0: array; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn arrayLength(ptr, read_write>) -> u32 fn arrayLength_eb510f() { var res: u32 = arrayLength(&sb_rw.arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_eb510f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_eb510f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_eb510f(); } diff --git a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl index 5b8513018a..fb678856f7 100644 --- a/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/arrayLength/eb510f.wgsl.expected.wgsl @@ -2,24 +2,24 @@ struct SB_RW { arg_0 : array; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn arrayLength_eb510f() { var res : u32 = arrayLength(&(sb_rw.arg_0)); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { arrayLength_eb510f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { arrayLength_eb510f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { arrayLength_eb510f(); } diff --git a/test/intrinsics/gen/asin/064953.wgsl b/test/intrinsics/gen/asin/064953.wgsl index 26e49e7c18..f72a8c5a45 100644 --- a/test/intrinsics/gen/asin/064953.wgsl +++ b/test/intrinsics/gen/asin/064953.wgsl @@ -28,18 +28,18 @@ fn asin_064953() { var res: vec4 = asin(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_064953(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_064953(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_064953(); } diff --git a/test/intrinsics/gen/asin/064953.wgsl.expected.wgsl b/test/intrinsics/gen/asin/064953.wgsl.expected.wgsl index 4c3bf704e2..ed58d99dd3 100644 --- a/test/intrinsics/gen/asin/064953.wgsl.expected.wgsl +++ b/test/intrinsics/gen/asin/064953.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn asin_064953() { var res : vec4 = asin(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_064953(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_064953(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_064953(); } diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl b/test/intrinsics/gen/asin/7b6a44.wgsl index cee069c164..6369852182 100644 --- a/test/intrinsics/gen/asin/7b6a44.wgsl +++ b/test/intrinsics/gen/asin/7b6a44.wgsl @@ -28,18 +28,18 @@ fn asin_7b6a44() { var res: vec2 = asin(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_7b6a44(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_7b6a44(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_7b6a44(); } diff --git a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl index 44df59b4ae..d70e952909 100644 --- a/test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl +++ b/test/intrinsics/gen/asin/7b6a44.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn asin_7b6a44() { var res : vec2 = asin(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_7b6a44(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_7b6a44(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_7b6a44(); } diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl b/test/intrinsics/gen/asin/8cd9c9.wgsl index 2f6a3e2fc8..0f7abb0622 100644 --- a/test/intrinsics/gen/asin/8cd9c9.wgsl +++ b/test/intrinsics/gen/asin/8cd9c9.wgsl @@ -28,18 +28,18 @@ fn asin_8cd9c9() { var res: vec3 = asin(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_8cd9c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_8cd9c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_8cd9c9(); } diff --git a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl index 04131b7c63..2f4ea23b0f 100644 --- a/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/asin/8cd9c9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn asin_8cd9c9() { var res : vec3 = asin(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_8cd9c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_8cd9c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_8cd9c9(); } diff --git a/test/intrinsics/gen/asin/c0c272.wgsl b/test/intrinsics/gen/asin/c0c272.wgsl index 290798ac28..b673fe3d26 100644 --- a/test/intrinsics/gen/asin/c0c272.wgsl +++ b/test/intrinsics/gen/asin/c0c272.wgsl @@ -28,18 +28,18 @@ fn asin_c0c272() { var res: f32 = asin(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_c0c272(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_c0c272(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_c0c272(); } diff --git a/test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl b/test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl index 08eb0ce94c..d3a8d05e1d 100644 --- a/test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl +++ b/test/intrinsics/gen/asin/c0c272.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn asin_c0c272() { var res : f32 = asin(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { asin_c0c272(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { asin_c0c272(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { asin_c0c272(); } diff --git a/test/intrinsics/gen/atan/02979a.wgsl b/test/intrinsics/gen/atan/02979a.wgsl index cf0d1be3ca..fb9d082327 100644 --- a/test/intrinsics/gen/atan/02979a.wgsl +++ b/test/intrinsics/gen/atan/02979a.wgsl @@ -28,18 +28,18 @@ fn atan_02979a() { var res: f32 = atan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_02979a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_02979a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_02979a(); } diff --git a/test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl b/test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl index 9730fb2c15..75af7436e8 100644 --- a/test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan/02979a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan_02979a() { var res : f32 = atan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_02979a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_02979a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_02979a(); } diff --git a/test/intrinsics/gen/atan/331e6d.wgsl b/test/intrinsics/gen/atan/331e6d.wgsl index 23d5f4241a..e090a638e0 100644 --- a/test/intrinsics/gen/atan/331e6d.wgsl +++ b/test/intrinsics/gen/atan/331e6d.wgsl @@ -28,18 +28,18 @@ fn atan_331e6d() { var res: vec3 = atan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_331e6d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_331e6d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_331e6d(); } diff --git a/test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl b/test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl index 0b9de68d9f..7bc7982749 100644 --- a/test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan/331e6d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan_331e6d() { var res : vec3 = atan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_331e6d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_331e6d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_331e6d(); } diff --git a/test/intrinsics/gen/atan/a8b696.wgsl b/test/intrinsics/gen/atan/a8b696.wgsl index f73df4cff2..8b1c3cf6b3 100644 --- a/test/intrinsics/gen/atan/a8b696.wgsl +++ b/test/intrinsics/gen/atan/a8b696.wgsl @@ -28,18 +28,18 @@ fn atan_a8b696() { var res: vec4 = atan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_a8b696(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_a8b696(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_a8b696(); } diff --git a/test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl b/test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl index 004b7aee5f..70b4684e77 100644 --- a/test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan/a8b696.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan_a8b696() { var res : vec4 = atan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_a8b696(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_a8b696(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_a8b696(); } diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl b/test/intrinsics/gen/atan/ad96e4.wgsl index 7995257190..b334a9e930 100644 --- a/test/intrinsics/gen/atan/ad96e4.wgsl +++ b/test/intrinsics/gen/atan/ad96e4.wgsl @@ -28,18 +28,18 @@ fn atan_ad96e4() { var res: vec2 = atan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_ad96e4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_ad96e4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_ad96e4(); } diff --git a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl index 07ff1f549c..dcf775a362 100644 --- a/test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan/ad96e4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan_ad96e4() { var res : vec2 = atan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan_ad96e4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan_ad96e4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan_ad96e4(); } diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl b/test/intrinsics/gen/atan2/57fb13.wgsl index c9d302888c..c18536fd12 100644 --- a/test/intrinsics/gen/atan2/57fb13.wgsl +++ b/test/intrinsics/gen/atan2/57fb13.wgsl @@ -28,18 +28,18 @@ fn atan2_57fb13() { var res: vec2 = atan2(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_57fb13(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_57fb13(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_57fb13(); } diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl index 09034a8702..ec7ff3aef7 100644 --- a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan2_57fb13() { var res : vec2 = atan2(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_57fb13(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_57fb13(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_57fb13(); } diff --git a/test/intrinsics/gen/atan2/96057c.wgsl b/test/intrinsics/gen/atan2/96057c.wgsl index 293ac6f763..09557666a5 100644 --- a/test/intrinsics/gen/atan2/96057c.wgsl +++ b/test/intrinsics/gen/atan2/96057c.wgsl @@ -28,18 +28,18 @@ fn atan2_96057c() { var res: f32 = atan2(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_96057c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_96057c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_96057c(); } diff --git a/test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl b/test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl index a60ced6946..78abdd4438 100644 --- a/test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan2/96057c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan2_96057c() { var res : f32 = atan2(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_96057c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_96057c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_96057c(); } diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl b/test/intrinsics/gen/atan2/a70d0d.wgsl index a12f308d7d..87a3c7a7f3 100644 --- a/test/intrinsics/gen/atan2/a70d0d.wgsl +++ b/test/intrinsics/gen/atan2/a70d0d.wgsl @@ -28,18 +28,18 @@ fn atan2_a70d0d() { var res: vec3 = atan2(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_a70d0d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_a70d0d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_a70d0d(); } diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl index a20e6810b9..9b32967d19 100644 --- a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan2_a70d0d() { var res : vec3 = atan2(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_a70d0d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_a70d0d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_a70d0d(); } diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl b/test/intrinsics/gen/atan2/ae713e.wgsl index 9098c1dd97..381ca2a2b8 100644 --- a/test/intrinsics/gen/atan2/ae713e.wgsl +++ b/test/intrinsics/gen/atan2/ae713e.wgsl @@ -28,18 +28,18 @@ fn atan2_ae713e() { var res: vec4 = atan2(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_ae713e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_ae713e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_ae713e(); } diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl index 875e4df85a..d765ab46d3 100644 --- a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn atan2_ae713e() { var res : vec4 = atan2(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { atan2_ae713e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atan2_ae713e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atan2_ae713e(); } diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl b/test/intrinsics/gen/atomicAdd/794055.wgsl index 25241b2826..5963b4f6cf 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl @@ -29,7 +29,7 @@ fn atomicAdd_794055() { var res: i32 = atomicAdd(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_794055(); } diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl index 833160d3cf..57290be0b0 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicAdd_794055() { var res : i32 = atomicAdd(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_794055(); } diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl b/test/intrinsics/gen/atomicAdd/8a199a.wgsl index 0b728d5488..aae79c2600 100644 --- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl +++ b/test/intrinsics/gen/atomicAdd/8a199a.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicAdd(ptr, read_write>, u32) -> u32 fn atomicAdd_8a199a() { var res: u32 = atomicAdd(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAdd_8a199a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_8a199a(); } diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl index 432caa91df..096bd4387b 100644 --- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicAdd_8a199a() { var res : u32 = atomicAdd(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAdd_8a199a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_8a199a(); } diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl index 88fd8f6812..4cf4eb68ab 100644 --- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl +++ b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicAdd(ptr, read_write>, i32) -> i32 fn atomicAdd_d32fe4() { var res: i32 = atomicAdd(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAdd_d32fe4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_d32fe4(); } diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl index 5bc41caee8..666689603d 100644 --- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicAdd_d32fe4() { var res : i32 = atomicAdd(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAdd_d32fe4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_d32fe4(); } diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl index 2508e9f6cd..55329bca26 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl @@ -29,7 +29,7 @@ fn atomicAdd_d5db1d() { var res: u32 = atomicAdd(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_d5db1d(); } diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl index 116ecfe912..e7381bbb38 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicAdd_d5db1d() { var res : u32 = atomicAdd(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAdd_d5db1d(); } diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl b/test/intrinsics/gen/atomicAnd/152966.wgsl index deb11600f2..b99ab19ca5 100644 --- a/test/intrinsics/gen/atomicAnd/152966.wgsl +++ b/test/intrinsics/gen/atomicAnd/152966.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicAnd(ptr, read_write>, i32) -> i32 fn atomicAnd_152966() { var res: i32 = atomicAnd(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAnd_152966(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_152966(); } diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl index c0be5bca01..5da1a1de5a 100644 --- a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicAnd_152966() { var res : i32 = atomicAnd(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAnd_152966(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_152966(); } diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl index b380519b8a..567863d754 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl @@ -29,7 +29,7 @@ fn atomicAnd_34edd3() { var res: u32 = atomicAnd(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_34edd3(); } diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl index ba6645da3c..89cec48ae6 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicAnd_34edd3() { var res : u32 = atomicAnd(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_34edd3(); } diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl index 76e9305aac..9eef5c3053 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl @@ -29,7 +29,7 @@ fn atomicAnd_45a819() { var res: i32 = atomicAnd(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_45a819(); } diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl index 1b59ff6fc1..c022cee167 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicAnd_45a819() { var res : i32 = atomicAnd(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_45a819(); } diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl index 414f521fcf..042cba62b9 100644 --- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl +++ b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicAnd(ptr, read_write>, u32) -> u32 fn atomicAnd_85a8d9() { var res: u32 = atomicAnd(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAnd_85a8d9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_85a8d9(); } diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl index c63138b807..61780ceb4e 100644 --- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicAnd_85a8d9() { var res : u32 = atomicAnd(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicAnd_85a8d9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicAnd_85a8d9(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl index ebbe26f0dd..3735ad4379 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicCompareExchangeWeak(ptr, read_write>, i32, i32) -> vec2 fn atomicCompareExchangeWeak_12871c() { var res: vec2 = atomicCompareExchangeWeak(&sb_rw.arg_0, 1, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicCompareExchangeWeak_12871c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_12871c(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl index eed9b1faa9..aa49ba96fe 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicCompareExchangeWeak_12871c() { var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicCompareExchangeWeak_12871c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_12871c(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl index ac2e91dc1a..be43eb0157 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicCompareExchangeWeak(ptr, read_write>, u32, u32) -> vec2 fn atomicCompareExchangeWeak_6673da() { var res: vec2 = atomicCompareExchangeWeak(&sb_rw.arg_0, 1u, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicCompareExchangeWeak_6673da(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_6673da(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl index ea4899a1e9..3970296bf0 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicCompareExchangeWeak_6673da() { var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1u, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicCompareExchangeWeak_6673da(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_6673da(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl index 78a5bd0a53..58bf4b53fc 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl @@ -29,7 +29,7 @@ fn atomicCompareExchangeWeak_89ea3b() { var res: vec2 = atomicCompareExchangeWeak(&arg_0, 1, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_89ea3b(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl index 152f1cd0af..4357511711 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicCompareExchangeWeak_89ea3b() { var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_89ea3b(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl index a73436f254..38cf645a88 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl @@ -29,7 +29,7 @@ fn atomicCompareExchangeWeak_b2ab2c() { var res: vec2 = atomicCompareExchangeWeak(&arg_0, 1u, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_b2ab2c(); } diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl index f920acf441..d53e099785 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicCompareExchangeWeak_b2ab2c() { var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1u, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicCompareExchangeWeak_b2ab2c(); } diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl index 4e79f0d77c..44ac264e62 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl @@ -29,7 +29,7 @@ fn atomicExchange_0a5dca() { var res: u32 = atomicExchange(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_0a5dca(); } diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl index aba05aafdc..a7acabddb6 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicExchange_0a5dca() { var res : u32 = atomicExchange(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_0a5dca(); } diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl b/test/intrinsics/gen/atomicExchange/d59712.wgsl index 6a5c6f2262..fc014eea19 100644 --- a/test/intrinsics/gen/atomicExchange/d59712.wgsl +++ b/test/intrinsics/gen/atomicExchange/d59712.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicExchange(ptr, read_write>, u32) -> u32 fn atomicExchange_d59712() { var res: u32 = atomicExchange(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicExchange_d59712(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_d59712(); } diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl index 9970c9b1a9..0930bd7c64 100644 --- a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicExchange_d59712() { var res : u32 = atomicExchange(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicExchange_d59712(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_d59712(); } diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl index 8f2acd0c02..f52534afad 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl @@ -29,7 +29,7 @@ fn atomicExchange_e114ba() { var res: i32 = atomicExchange(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_e114ba(); } diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl index 0384fca4b0..9735838939 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicExchange_e114ba() { var res : i32 = atomicExchange(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_e114ba(); } diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl index 990cfb4d30..be22ff966f 100644 --- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl +++ b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicExchange(ptr, read_write>, i32) -> i32 fn atomicExchange_f2e22f() { var res: i32 = atomicExchange(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicExchange_f2e22f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_f2e22f(); } diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl index 511c02bf65..79704e4bd1 100644 --- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicExchange_f2e22f() { var res : i32 = atomicExchange(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicExchange_f2e22f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicExchange_f2e22f(); } diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl b/test/intrinsics/gen/atomicLoad/0806ad.wgsl index 98dd4f5a94..0981e05298 100644 --- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl +++ b/test/intrinsics/gen/atomicLoad/0806ad.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicLoad(ptr, read_write>) -> i32 fn atomicLoad_0806ad() { var res: i32 = atomicLoad(&sb_rw.arg_0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicLoad_0806ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_0806ad(); } diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl index b0f3f7d52d..7396ee2790 100644 --- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicLoad_0806ad() { var res : i32 = atomicLoad(&(sb_rw.arg_0)); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicLoad_0806ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_0806ad(); } diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl index 622c033b3d..3c51abc94d 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl @@ -29,7 +29,7 @@ fn atomicLoad_361bf1() { var res: u32 = atomicLoad(&arg_0); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_361bf1(); } diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl index ff710c7896..1040bf29af 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicLoad_361bf1() { var res : u32 = atomicLoad(&(arg_0)); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_361bf1(); } diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl index c24843d1fc..7585c6f570 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl @@ -29,7 +29,7 @@ fn atomicLoad_afcc03() { var res: i32 = atomicLoad(&arg_0); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_afcc03(); } diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl index 72d9325777..e39317dde8 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicLoad_afcc03() { var res : i32 = atomicLoad(&(arg_0)); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_afcc03(); } diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl index 3c8ea5e477..d337a1e1a8 100644 --- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl +++ b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicLoad(ptr, read_write>) -> u32 fn atomicLoad_fe6cc3() { var res: u32 = atomicLoad(&sb_rw.arg_0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicLoad_fe6cc3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_fe6cc3(); } diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl index a4b878b917..28eca605b9 100644 --- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicLoad_fe6cc3() { var res : u32 = atomicLoad(&(sb_rw.arg_0)); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicLoad_fe6cc3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicLoad_fe6cc3(); } diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl b/test/intrinsics/gen/atomicMax/51b9be.wgsl index 8c53dfa460..7f2e69c2af 100644 --- a/test/intrinsics/gen/atomicMax/51b9be.wgsl +++ b/test/intrinsics/gen/atomicMax/51b9be.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicMax(ptr, read_write>, u32) -> u32 fn atomicMax_51b9be() { var res: u32 = atomicMax(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMax_51b9be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_51b9be(); } diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl index 3f36fbc7e2..985c7637dd 100644 --- a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicMax_51b9be() { var res : u32 = atomicMax(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMax_51b9be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_51b9be(); } diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl b/test/intrinsics/gen/atomicMax/92aa72.wgsl index 74431a7980..603ea33edd 100644 --- a/test/intrinsics/gen/atomicMax/92aa72.wgsl +++ b/test/intrinsics/gen/atomicMax/92aa72.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicMax(ptr, read_write>, i32) -> i32 fn atomicMax_92aa72() { var res: i32 = atomicMax(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMax_92aa72(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_92aa72(); } diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl index d1c9beabe8..050d266475 100644 --- a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicMax_92aa72() { var res : i32 = atomicMax(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMax_92aa72(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_92aa72(); } diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl index f3e4ef9319..f6c65cf7e6 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl @@ -29,7 +29,7 @@ fn atomicMax_a89cc3() { var res: i32 = atomicMax(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_a89cc3(); } diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl index a383c70ea8..d36703ef14 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicMax_a89cc3() { var res : i32 = atomicMax(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_a89cc3(); } diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl index a5ed85b5dd..c6c4b60aa5 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl @@ -29,7 +29,7 @@ fn atomicMax_beccfc() { var res: u32 = atomicMax(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_beccfc(); } diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl index d468d95c47..f14f91a088 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicMax_beccfc() { var res : u32 = atomicMax(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMax_beccfc(); } diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl b/test/intrinsics/gen/atomicMin/278235.wgsl index c5f1816aa6..2a0cf130f5 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl @@ -29,7 +29,7 @@ fn atomicMin_278235() { var res: i32 = atomicMin(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_278235(); } diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl index c3b237c417..981a7b328d 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicMin_278235() { var res : i32 = atomicMin(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_278235(); } diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl b/test/intrinsics/gen/atomicMin/69d383.wgsl index 79c5cae576..41b6284085 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl @@ -29,7 +29,7 @@ fn atomicMin_69d383() { var res: u32 = atomicMin(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_69d383(); } diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl index baff1a6701..034d1afc73 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicMin_69d383() { var res : u32 = atomicMin(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_69d383(); } diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl b/test/intrinsics/gen/atomicMin/8e38dc.wgsl index 8f5040625e..9512528421 100644 --- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl +++ b/test/intrinsics/gen/atomicMin/8e38dc.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicMin(ptr, read_write>, i32) -> i32 fn atomicMin_8e38dc() { var res: i32 = atomicMin(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMin_8e38dc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_8e38dc(); } diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl index ef749888c6..445c42caa8 100644 --- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicMin_8e38dc() { var res : i32 = atomicMin(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMin_8e38dc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_8e38dc(); } diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl b/test/intrinsics/gen/atomicMin/c67a74.wgsl index afcf5d329e..fe5bb45a14 100644 --- a/test/intrinsics/gen/atomicMin/c67a74.wgsl +++ b/test/intrinsics/gen/atomicMin/c67a74.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicMin(ptr, read_write>, u32) -> u32 fn atomicMin_c67a74() { var res: u32 = atomicMin(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMin_c67a74(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_c67a74(); } diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl index 1e1fb28295..85296e776f 100644 --- a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicMin_c67a74() { var res : u32 = atomicMin(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicMin_c67a74(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicMin_c67a74(); } diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl index 0a2f8c6576..be6bc51cb0 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl @@ -29,7 +29,7 @@ fn atomicOr_5e3d61() { var res: u32 = atomicOr(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_5e3d61(); } diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl index a06bab14b3..00f3e66171 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicOr_5e3d61() { var res : u32 = atomicOr(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_5e3d61(); } diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl b/test/intrinsics/gen/atomicOr/5e95d4.wgsl index c90026edb7..356f0d0a52 100644 --- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl +++ b/test/intrinsics/gen/atomicOr/5e95d4.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicOr(ptr, read_write>, u32) -> u32 fn atomicOr_5e95d4() { var res: u32 = atomicOr(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicOr_5e95d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_5e95d4(); } diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl index a483962b3f..78414eb560 100644 --- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicOr_5e95d4() { var res : u32 = atomicOr(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicOr_5e95d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_5e95d4(); } diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl b/test/intrinsics/gen/atomicOr/8d96a0.wgsl index 7102b0c18a..c686a284ef 100644 --- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl +++ b/test/intrinsics/gen/atomicOr/8d96a0.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicOr(ptr, read_write>, i32) -> i32 fn atomicOr_8d96a0() { var res: i32 = atomicOr(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicOr_8d96a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_8d96a0(); } diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl index 57de39254b..9ce6bd67f6 100644 --- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicOr_8d96a0() { var res : i32 = atomicOr(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicOr_8d96a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_8d96a0(); } diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl b/test/intrinsics/gen/atomicOr/d09248.wgsl index b9280ec25b..ead0c34919 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl @@ -29,7 +29,7 @@ fn atomicOr_d09248() { var res: i32 = atomicOr(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_d09248(); } diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl index d517babdb4..c28f1c7dbc 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicOr_d09248() { var res : i32 = atomicOr(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicOr_d09248(); } diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl b/test/intrinsics/gen/atomicStore/726882.wgsl index f6066f29f0..3994efb6bb 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl @@ -29,7 +29,7 @@ fn atomicStore_726882() { atomicStore(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_726882(); } diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl index e275dcf7df..d81b71e4e6 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicStore_726882() { atomicStore(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_726882(); } diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl index 8906c61d9b..3ce1a43662 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl @@ -29,7 +29,7 @@ fn atomicStore_8bea94() { atomicStore(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_8bea94(); } diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl index 22cd2b01e1..2616d87dec 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicStore_8bea94() { atomicStore(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_8bea94(); } diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl b/test/intrinsics/gen/atomicStore/cdc29e.wgsl index 5961171f67..b9cb3909ce 100644 --- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl +++ b/test/intrinsics/gen/atomicStore/cdc29e.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicStore(ptr, read_write>, u32) fn atomicStore_cdc29e() { atomicStore(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicStore_cdc29e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_cdc29e(); } diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl index 9f19d4311d..d0b2386dd4 100644 --- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicStore_cdc29e() { atomicStore(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicStore_cdc29e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_cdc29e(); } diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl index cbbec6ee7d..a4ff0954cc 100644 --- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl +++ b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicStore(ptr, read_write>, i32) fn atomicStore_d1e9a6() { atomicStore(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicStore_d1e9a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_d1e9a6(); } diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl index 803cb0d543..5518552ddf 100644 --- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicStore_d1e9a6() { atomicStore(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicStore_d1e9a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicStore_d1e9a6(); } diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl b/test/intrinsics/gen/atomicSub/051100.wgsl index d8083ad042..698b794e8e 100644 --- a/test/intrinsics/gen/atomicSub/051100.wgsl +++ b/test/intrinsics/gen/atomicSub/051100.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicSub(ptr, read_write>, i32) -> i32 fn atomicSub_051100() { var res: i32 = atomicSub(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicSub_051100(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_051100(); } diff --git a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl b/test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl index 1059294929..27b8857a63 100644 --- a/test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicSub/051100.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicSub_051100() { var res : i32 = atomicSub(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicSub_051100(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_051100(); } diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl b/test/intrinsics/gen/atomicSub/0d26c2.wgsl index 0aab47d536..84cfa43166 100644 --- a/test/intrinsics/gen/atomicSub/0d26c2.wgsl +++ b/test/intrinsics/gen/atomicSub/0d26c2.wgsl @@ -29,7 +29,7 @@ fn atomicSub_0d26c2() { var res: u32 = atomicSub(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_0d26c2(); } diff --git a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl b/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl index c5c104bb78..6b75ecbcf2 100644 --- a/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicSub/0d26c2.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicSub_0d26c2() { var res : u32 = atomicSub(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_0d26c2(); } diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl b/test/intrinsics/gen/atomicSub/15bfc9.wgsl index a8ad318af7..e46889ef21 100644 --- a/test/intrinsics/gen/atomicSub/15bfc9.wgsl +++ b/test/intrinsics/gen/atomicSub/15bfc9.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicSub(ptr, read_write>, u32) -> u32 fn atomicSub_15bfc9() { var res: u32 = atomicSub(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicSub_15bfc9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_15bfc9(); } diff --git a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl b/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl index 26c3cbedb1..537edd16b9 100644 --- a/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicSub/15bfc9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicSub_15bfc9() { var res : u32 = atomicSub(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicSub_15bfc9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_15bfc9(); } diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl b/test/intrinsics/gen/atomicSub/77883a.wgsl index 8243dadd8e..fc8fa7647a 100644 --- a/test/intrinsics/gen/atomicSub/77883a.wgsl +++ b/test/intrinsics/gen/atomicSub/77883a.wgsl @@ -29,7 +29,7 @@ fn atomicSub_77883a() { var res: i32 = atomicSub(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_77883a(); } diff --git a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl b/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl index b6452a32bf..4a49222bc9 100644 --- a/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicSub/77883a.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicSub_77883a() { var res : i32 = atomicSub(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicSub_77883a(); } diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl b/test/intrinsics/gen/atomicXor/54510e.wgsl index b7c85f00c5..6928f876e1 100644 --- a/test/intrinsics/gen/atomicXor/54510e.wgsl +++ b/test/intrinsics/gen/atomicXor/54510e.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicXor(ptr, read_write>, u32) -> u32 fn atomicXor_54510e() { var res: u32 = atomicXor(&sb_rw.arg_0, 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicXor_54510e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_54510e(); } diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl index e0ef7e7931..bc674c9d98 100644 --- a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicXor_54510e() { var res : u32 = atomicXor(&(sb_rw.arg_0), 1u); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicXor_54510e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_54510e(); } diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl index 9874eb739f..061d653c2f 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl @@ -29,7 +29,7 @@ fn atomicXor_75dc95() { var res: i32 = atomicXor(&arg_0, 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_75dc95(); } diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl index 6dd0569157..cae6c216f1 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicXor_75dc95() { var res : i32 = atomicXor(&(arg_0), 1); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_75dc95(); } diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl b/test/intrinsics/gen/atomicXor/c1b78c.wgsl index eb665b4dfb..5bbc251d91 100644 --- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl +++ b/test/intrinsics/gen/atomicXor/c1b78c.wgsl @@ -25,19 +25,19 @@ struct SB_RW { arg_0: atomic; }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; // fn atomicXor(ptr, read_write>, i32) -> i32 fn atomicXor_c1b78c() { var res: i32 = atomicXor(&sb_rw.arg_0, 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicXor_c1b78c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_c1b78c(); } diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl index 68404820f7..0d49f18dba 100644 --- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ struct SB_RW { arg_0 : atomic; } -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; fn atomicXor_c1b78c() { var res : i32 = atomicXor(&(sb_rw.arg_0), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { atomicXor_c1b78c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_c1b78c(); } diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl index 0dbadf181b..ce241183ae 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl @@ -29,7 +29,7 @@ fn atomicXor_c8e6be() { var res: u32 = atomicXor(&arg_0, 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_c8e6be(); } diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl index 938ed3db20..d422ea04d7 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn atomicXor_c8e6be() { var res : u32 = atomicXor(&(arg_0), 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { atomicXor_c8e6be(); } diff --git a/test/intrinsics/gen/ceil/34064b.wgsl b/test/intrinsics/gen/ceil/34064b.wgsl index 3be3ad0878..3d79d91618 100644 --- a/test/intrinsics/gen/ceil/34064b.wgsl +++ b/test/intrinsics/gen/ceil/34064b.wgsl @@ -28,18 +28,18 @@ fn ceil_34064b() { var res: vec3 = ceil(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_34064b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_34064b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_34064b(); } diff --git a/test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl b/test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl index d67b1506ca..a72e184657 100644 --- a/test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ceil/34064b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ceil_34064b() { var res : vec3 = ceil(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_34064b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_34064b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_34064b(); } diff --git a/test/intrinsics/gen/ceil/678655.wgsl b/test/intrinsics/gen/ceil/678655.wgsl index 0ba06bd27f..0a49b589ca 100644 --- a/test/intrinsics/gen/ceil/678655.wgsl +++ b/test/intrinsics/gen/ceil/678655.wgsl @@ -28,18 +28,18 @@ fn ceil_678655() { var res: f32 = ceil(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_678655(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_678655(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_678655(); } diff --git a/test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl b/test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl index 139e6de499..bb57a0aae7 100644 --- a/test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ceil/678655.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ceil_678655() { var res : f32 = ceil(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_678655(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_678655(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_678655(); } diff --git a/test/intrinsics/gen/ceil/96f597.wgsl b/test/intrinsics/gen/ceil/96f597.wgsl index 63d6e1abc9..84647b951e 100644 --- a/test/intrinsics/gen/ceil/96f597.wgsl +++ b/test/intrinsics/gen/ceil/96f597.wgsl @@ -28,18 +28,18 @@ fn ceil_96f597() { var res: vec2 = ceil(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_96f597(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_96f597(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_96f597(); } diff --git a/test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl b/test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl index 65004c41d6..bf6d138fe9 100644 --- a/test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ceil/96f597.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ceil_96f597() { var res : vec2 = ceil(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_96f597(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_96f597(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_96f597(); } diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl b/test/intrinsics/gen/ceil/b74c16.wgsl index e5ca6704b0..46a48b4ad1 100644 --- a/test/intrinsics/gen/ceil/b74c16.wgsl +++ b/test/intrinsics/gen/ceil/b74c16.wgsl @@ -28,18 +28,18 @@ fn ceil_b74c16() { var res: vec4 = ceil(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_b74c16(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_b74c16(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_b74c16(); } diff --git a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl index 492a4154b4..c019db42bb 100644 --- a/test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ceil/b74c16.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ceil_b74c16() { var res : vec4 = ceil(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ceil_b74c16(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ceil_b74c16(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ceil_b74c16(); } diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl b/test/intrinsics/gen/clamp/0acf8f.wgsl index 8ef1355157..a55d7dca03 100644 --- a/test/intrinsics/gen/clamp/0acf8f.wgsl +++ b/test/intrinsics/gen/clamp/0acf8f.wgsl @@ -28,18 +28,18 @@ fn clamp_0acf8f() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_0acf8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_0acf8f(); } diff --git a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl index 08f126c090..a6f58e586e 100644 --- a/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/0acf8f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_0acf8f() { var res : vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_0acf8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_0acf8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_0acf8f(); } diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl b/test/intrinsics/gen/clamp/1a32e3.wgsl index a52ae9648c..723c13474c 100644 --- a/test/intrinsics/gen/clamp/1a32e3.wgsl +++ b/test/intrinsics/gen/clamp/1a32e3.wgsl @@ -28,18 +28,18 @@ fn clamp_1a32e3() { var res: vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_1a32e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_1a32e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_1a32e3(); } diff --git a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl index 59887fccd0..4ca8d1e3ec 100644 --- a/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/1a32e3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_1a32e3() { var res : vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_1a32e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_1a32e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_1a32e3(); } diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl b/test/intrinsics/gen/clamp/2bd567.wgsl index 6e280b586d..e8d2ed23b4 100644 --- a/test/intrinsics/gen/clamp/2bd567.wgsl +++ b/test/intrinsics/gen/clamp/2bd567.wgsl @@ -28,18 +28,18 @@ fn clamp_2bd567() { var res: f32 = clamp(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_2bd567(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_2bd567(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_2bd567(); } diff --git a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl index 5e338a5464..fdd1c3c469 100644 --- a/test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/2bd567.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_2bd567() { var res : f32 = clamp(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_2bd567(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_2bd567(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_2bd567(); } diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl b/test/intrinsics/gen/clamp/2bde41.wgsl index 7a46d6acf3..582549cf3b 100644 --- a/test/intrinsics/gen/clamp/2bde41.wgsl +++ b/test/intrinsics/gen/clamp/2bde41.wgsl @@ -28,18 +28,18 @@ fn clamp_2bde41() { var res: vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_2bde41(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_2bde41(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_2bde41(); } diff --git a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl index 091e04c4e1..21f3a2d216 100644 --- a/test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/2bde41.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_2bde41() { var res : vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_2bde41(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_2bde41(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_2bde41(); } diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl b/test/intrinsics/gen/clamp/548fc7.wgsl index 696b661470..8863032b2b 100644 --- a/test/intrinsics/gen/clamp/548fc7.wgsl +++ b/test/intrinsics/gen/clamp/548fc7.wgsl @@ -28,18 +28,18 @@ fn clamp_548fc7() { var res: vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_548fc7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_548fc7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_548fc7(); } diff --git a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl index 67ef8811fc..05f4d9e365 100644 --- a/test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/548fc7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_548fc7() { var res : vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_548fc7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_548fc7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_548fc7(); } diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl b/test/intrinsics/gen/clamp/5f0819.wgsl index 2dd85e24d0..c128db4fac 100644 --- a/test/intrinsics/gen/clamp/5f0819.wgsl +++ b/test/intrinsics/gen/clamp/5f0819.wgsl @@ -28,18 +28,18 @@ fn clamp_5f0819() { var res: vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_5f0819(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_5f0819(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_5f0819(); } diff --git a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl index 3a475024ba..6265d723d1 100644 --- a/test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/5f0819.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_5f0819() { var res : vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_5f0819(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_5f0819(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_5f0819(); } diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl b/test/intrinsics/gen/clamp/6c1749.wgsl index 30eae798d0..3592939309 100644 --- a/test/intrinsics/gen/clamp/6c1749.wgsl +++ b/test/intrinsics/gen/clamp/6c1749.wgsl @@ -28,18 +28,18 @@ fn clamp_6c1749() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_6c1749(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_6c1749(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_6c1749(); } diff --git a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl index 7047f4d4f7..58ea37011c 100644 --- a/test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/6c1749.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_6c1749() { var res : vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_6c1749(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_6c1749(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_6c1749(); } diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl b/test/intrinsics/gen/clamp/7706d7.wgsl index 88badadef3..5e648fedbb 100644 --- a/test/intrinsics/gen/clamp/7706d7.wgsl +++ b/test/intrinsics/gen/clamp/7706d7.wgsl @@ -28,18 +28,18 @@ fn clamp_7706d7() { var res: vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_7706d7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_7706d7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_7706d7(); } diff --git a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl index 0d830146fc..b21343c67a 100644 --- a/test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/7706d7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_7706d7() { var res : vec2 = clamp(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_7706d7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_7706d7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_7706d7(); } diff --git a/test/intrinsics/gen/clamp/867397.wgsl b/test/intrinsics/gen/clamp/867397.wgsl index fdcf1f3812..96596d0c3f 100644 --- a/test/intrinsics/gen/clamp/867397.wgsl +++ b/test/intrinsics/gen/clamp/867397.wgsl @@ -28,18 +28,18 @@ fn clamp_867397() { var res: vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_867397(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_867397(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_867397(); } diff --git a/test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl index 38fde0a9cd..0c74877cb3 100644 --- a/test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/867397.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_867397() { var res : vec3 = clamp(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_867397(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_867397(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_867397(); } diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl b/test/intrinsics/gen/clamp/a2de25.wgsl index e0c41c7192..403c5bf84a 100644 --- a/test/intrinsics/gen/clamp/a2de25.wgsl +++ b/test/intrinsics/gen/clamp/a2de25.wgsl @@ -28,18 +28,18 @@ fn clamp_a2de25() { var res: u32 = clamp(1u, 1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_a2de25(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_a2de25(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_a2de25(); } diff --git a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl index 70dc29b408..28aa33039e 100644 --- a/test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/a2de25.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_a2de25() { var res : u32 = clamp(1u, 1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_a2de25(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_a2de25(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_a2de25(); } diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl b/test/intrinsics/gen/clamp/b07c65.wgsl index d285b90509..1d187094de 100644 --- a/test/intrinsics/gen/clamp/b07c65.wgsl +++ b/test/intrinsics/gen/clamp/b07c65.wgsl @@ -28,18 +28,18 @@ fn clamp_b07c65() { var res: i32 = clamp(1, 1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_b07c65(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_b07c65(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_b07c65(); } diff --git a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl index ddab54bd1d..3ed77bc898 100644 --- a/test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/b07c65.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_b07c65() { var res : i32 = clamp(1, 1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_b07c65(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_b07c65(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_b07c65(); } diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl b/test/intrinsics/gen/clamp/bd43ce.wgsl index 16a43fbc1e..45085ef996 100644 --- a/test/intrinsics/gen/clamp/bd43ce.wgsl +++ b/test/intrinsics/gen/clamp/bd43ce.wgsl @@ -28,18 +28,18 @@ fn clamp_bd43ce() { var res: vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_bd43ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_bd43ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_bd43ce(); } diff --git a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl index 00f69c5c3a..51f94ba5bd 100644 --- a/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl +++ b/test/intrinsics/gen/clamp/bd43ce.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn clamp_bd43ce() { var res : vec4 = clamp(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { clamp_bd43ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { clamp_bd43ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { clamp_bd43ce(); } diff --git a/test/intrinsics/gen/cos/16dc15.wgsl b/test/intrinsics/gen/cos/16dc15.wgsl index 9ca499a5dc..9f92844eef 100644 --- a/test/intrinsics/gen/cos/16dc15.wgsl +++ b/test/intrinsics/gen/cos/16dc15.wgsl @@ -28,18 +28,18 @@ fn cos_16dc15() { var res: vec3 = cos(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_16dc15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_16dc15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_16dc15(); } diff --git a/test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl b/test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl index bd4f752d5d..fb24d34f37 100644 --- a/test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cos/16dc15.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cos_16dc15() { var res : vec3 = cos(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_16dc15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_16dc15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_16dc15(); } diff --git a/test/intrinsics/gen/cos/29d66d.wgsl b/test/intrinsics/gen/cos/29d66d.wgsl index bd16f344d6..d0082a4002 100644 --- a/test/intrinsics/gen/cos/29d66d.wgsl +++ b/test/intrinsics/gen/cos/29d66d.wgsl @@ -28,18 +28,18 @@ fn cos_29d66d() { var res: vec4 = cos(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_29d66d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_29d66d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_29d66d(); } diff --git a/test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl b/test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl index 466a4db702..7bd094716f 100644 --- a/test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cos/29d66d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cos_29d66d() { var res : vec4 = cos(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_29d66d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_29d66d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_29d66d(); } diff --git a/test/intrinsics/gen/cos/c3b486.wgsl b/test/intrinsics/gen/cos/c3b486.wgsl index afc2d9de4e..58bf9737fa 100644 --- a/test/intrinsics/gen/cos/c3b486.wgsl +++ b/test/intrinsics/gen/cos/c3b486.wgsl @@ -28,18 +28,18 @@ fn cos_c3b486() { var res: vec2 = cos(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_c3b486(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_c3b486(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_c3b486(); } diff --git a/test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl b/test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl index b6ebf9482f..3dfb7da69a 100644 --- a/test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cos/c3b486.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cos_c3b486() { var res : vec2 = cos(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_c3b486(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_c3b486(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_c3b486(); } diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl b/test/intrinsics/gen/cos/c5c28e.wgsl index 7d8990d62c..249a587f3a 100644 --- a/test/intrinsics/gen/cos/c5c28e.wgsl +++ b/test/intrinsics/gen/cos/c5c28e.wgsl @@ -28,18 +28,18 @@ fn cos_c5c28e() { var res: f32 = cos(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_c5c28e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_c5c28e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_c5c28e(); } diff --git a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl index f3a7337204..e2986219e8 100644 --- a/test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cos/c5c28e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cos_c5c28e() { var res : f32 = cos(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cos_c5c28e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cos_c5c28e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cos_c5c28e(); } diff --git a/test/intrinsics/gen/cosh/377652.wgsl b/test/intrinsics/gen/cosh/377652.wgsl index b7dc4f187f..b528307a15 100644 --- a/test/intrinsics/gen/cosh/377652.wgsl +++ b/test/intrinsics/gen/cosh/377652.wgsl @@ -28,18 +28,18 @@ fn cosh_377652() { var res: vec3 = cosh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_377652(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_377652(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_377652(); } diff --git a/test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl b/test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl index cce37765fb..bfcc51afaf 100644 --- a/test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cosh/377652.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cosh_377652() { var res : vec3 = cosh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_377652(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_377652(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_377652(); } diff --git a/test/intrinsics/gen/cosh/c13756.wgsl b/test/intrinsics/gen/cosh/c13756.wgsl index 635c6da0c9..fa11315c83 100644 --- a/test/intrinsics/gen/cosh/c13756.wgsl +++ b/test/intrinsics/gen/cosh/c13756.wgsl @@ -28,18 +28,18 @@ fn cosh_c13756() { var res: vec2 = cosh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_c13756(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_c13756(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_c13756(); } diff --git a/test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl b/test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl index b949555b3d..3940b8edde 100644 --- a/test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cosh/c13756.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cosh_c13756() { var res : vec2 = cosh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_c13756(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_c13756(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_c13756(); } diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl b/test/intrinsics/gen/cosh/da92dd.wgsl index fd939dad60..59eb8df9ae 100644 --- a/test/intrinsics/gen/cosh/da92dd.wgsl +++ b/test/intrinsics/gen/cosh/da92dd.wgsl @@ -28,18 +28,18 @@ fn cosh_da92dd() { var res: f32 = cosh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_da92dd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_da92dd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_da92dd(); } diff --git a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl index f79c7464ce..e653a5c675 100644 --- a/test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cosh/da92dd.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cosh_da92dd() { var res : f32 = cosh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_da92dd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_da92dd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_da92dd(); } diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl b/test/intrinsics/gen/cosh/e0c1de.wgsl index f6e958c1b6..961d55f119 100644 --- a/test/intrinsics/gen/cosh/e0c1de.wgsl +++ b/test/intrinsics/gen/cosh/e0c1de.wgsl @@ -28,18 +28,18 @@ fn cosh_e0c1de() { var res: vec4 = cosh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_e0c1de(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_e0c1de(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_e0c1de(); } diff --git a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl index 1a86db735e..64b0a086ce 100644 --- a/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cosh/e0c1de.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cosh_e0c1de() { var res : vec4 = cosh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cosh_e0c1de(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cosh_e0c1de(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cosh_e0c1de(); } diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl index ca8afcba8a..dc6b49ef52 100644 --- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl +++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl @@ -28,18 +28,18 @@ fn countOneBits_0d0e46() { var res: vec4 = countOneBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_0d0e46(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_0d0e46(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_0d0e46(); } diff --git a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl index f0d484af47..271af00678 100644 --- a/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/0d0e46.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_0d0e46() { var res : vec4 = countOneBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_0d0e46(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_0d0e46(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_0d0e46(); } diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl b/test/intrinsics/gen/countOneBits/0f7980.wgsl index 569a8570d8..cf4b27b787 100644 --- a/test/intrinsics/gen/countOneBits/0f7980.wgsl +++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl @@ -28,18 +28,18 @@ fn countOneBits_0f7980() { var res: vec4 = countOneBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_0f7980(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_0f7980(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_0f7980(); } diff --git a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl index e2529f4136..1291aa3f35 100644 --- a/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/0f7980.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_0f7980() { var res : vec4 = countOneBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_0f7980(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_0f7980(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_0f7980(); } diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl index 625620c6f1..ba29117cf1 100644 --- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl +++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl @@ -28,18 +28,18 @@ fn countOneBits_65d2ae() { var res: vec3 = countOneBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_65d2ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_65d2ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_65d2ae(); } diff --git a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl index 4afc66d44e..e1428608ae 100644 --- a/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/65d2ae.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_65d2ae() { var res : vec3 = countOneBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_65d2ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_65d2ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_65d2ae(); } diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl b/test/intrinsics/gen/countOneBits/690cfc.wgsl index 555889d932..77ce9c4c23 100644 --- a/test/intrinsics/gen/countOneBits/690cfc.wgsl +++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl @@ -28,18 +28,18 @@ fn countOneBits_690cfc() { var res: vec3 = countOneBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_690cfc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_690cfc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_690cfc(); } diff --git a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl index 7ca3c8e704..b74eb792c5 100644 --- a/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/690cfc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_690cfc() { var res : vec3 = countOneBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_690cfc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_690cfc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_690cfc(); } diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl b/test/intrinsics/gen/countOneBits/94fd81.wgsl index e39137ede9..ec7f081864 100644 --- a/test/intrinsics/gen/countOneBits/94fd81.wgsl +++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl @@ -28,18 +28,18 @@ fn countOneBits_94fd81() { var res: vec2 = countOneBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_94fd81(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_94fd81(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_94fd81(); } diff --git a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl index a5711ac80c..e713f92eff 100644 --- a/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/94fd81.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_94fd81() { var res : vec2 = countOneBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_94fd81(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_94fd81(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_94fd81(); } diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl index 2c31ae76c6..db56395325 100644 --- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl +++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl @@ -28,18 +28,18 @@ fn countOneBits_ae44f9() { var res: u32 = countOneBits(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_ae44f9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_ae44f9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_ae44f9(); } diff --git a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl index 0591a404aa..3a549934ef 100644 --- a/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/ae44f9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_ae44f9() { var res : u32 = countOneBits(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_ae44f9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_ae44f9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_ae44f9(); } diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl b/test/intrinsics/gen/countOneBits/af90e2.wgsl index 4cf6b08eb7..f57048ccd5 100644 --- a/test/intrinsics/gen/countOneBits/af90e2.wgsl +++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl @@ -28,18 +28,18 @@ fn countOneBits_af90e2() { var res: vec2 = countOneBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_af90e2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_af90e2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_af90e2(); } diff --git a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl index 5a6fdaaee6..c2d693a10c 100644 --- a/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/af90e2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_af90e2() { var res : vec2 = countOneBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_af90e2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_af90e2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_af90e2(); } diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl index 52132672a0..f95dcc2286 100644 --- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl +++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl @@ -28,18 +28,18 @@ fn countOneBits_fd88b2() { var res: i32 = countOneBits(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_fd88b2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_fd88b2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_fd88b2(); } diff --git a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl index e1b4ef223a..c9e437bcf3 100644 --- a/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/countOneBits/fd88b2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn countOneBits_fd88b2() { var res : i32 = countOneBits(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { countOneBits_fd88b2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { countOneBits_fd88b2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { countOneBits_fd88b2(); } diff --git a/test/intrinsics/gen/cross/041cb0.wgsl b/test/intrinsics/gen/cross/041cb0.wgsl index 38427b6abb..50f8539df0 100644 --- a/test/intrinsics/gen/cross/041cb0.wgsl +++ b/test/intrinsics/gen/cross/041cb0.wgsl @@ -28,18 +28,18 @@ fn cross_041cb0() { var res: vec3 = cross(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cross_041cb0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cross_041cb0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cross_041cb0(); } diff --git a/test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl b/test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl index b650bd43ec..c3548ce7e4 100644 --- a/test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/cross/041cb0.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn cross_041cb0() { var res : vec3 = cross(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { cross_041cb0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { cross_041cb0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { cross_041cb0(); } diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl b/test/intrinsics/gen/degrees/0d170c.wgsl index c1bb01ec05..b2ee663fd1 100644 --- a/test/intrinsics/gen/degrees/0d170c.wgsl +++ b/test/intrinsics/gen/degrees/0d170c.wgsl @@ -28,18 +28,18 @@ fn degrees_0d170c() { var res: vec4 = degrees(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_0d170c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_0d170c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_0d170c(); } diff --git a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl b/test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl index fa7bd7c82d..6c62108eb1 100644 --- a/test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/degrees/0d170c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn degrees_0d170c() { var res : vec4 = degrees(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_0d170c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_0d170c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_0d170c(); } diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl b/test/intrinsics/gen/degrees/1ad5df.wgsl index ce4a3cb816..b4c46dbd78 100644 --- a/test/intrinsics/gen/degrees/1ad5df.wgsl +++ b/test/intrinsics/gen/degrees/1ad5df.wgsl @@ -28,18 +28,18 @@ fn degrees_1ad5df() { var res: vec2 = degrees(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_1ad5df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_1ad5df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_1ad5df(); } diff --git a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl b/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl index 09968ce48b..db91a6528c 100644 --- a/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl +++ b/test/intrinsics/gen/degrees/1ad5df.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn degrees_1ad5df() { var res : vec2 = degrees(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_1ad5df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_1ad5df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_1ad5df(); } diff --git a/test/intrinsics/gen/degrees/2af623.wgsl b/test/intrinsics/gen/degrees/2af623.wgsl index bf8e6cbbae..22772dd15e 100644 --- a/test/intrinsics/gen/degrees/2af623.wgsl +++ b/test/intrinsics/gen/degrees/2af623.wgsl @@ -28,18 +28,18 @@ fn degrees_2af623() { var res: vec3 = degrees(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_2af623(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_2af623(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_2af623(); } diff --git a/test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl b/test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl index fc42984cbf..d3af418c96 100644 --- a/test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl +++ b/test/intrinsics/gen/degrees/2af623.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn degrees_2af623() { var res : vec3 = degrees(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_2af623(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_2af623(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_2af623(); } diff --git a/test/intrinsics/gen/degrees/51f705.wgsl b/test/intrinsics/gen/degrees/51f705.wgsl index 2bbd952724..71c2e93dac 100644 --- a/test/intrinsics/gen/degrees/51f705.wgsl +++ b/test/intrinsics/gen/degrees/51f705.wgsl @@ -28,18 +28,18 @@ fn degrees_51f705() { var res: f32 = degrees(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_51f705(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_51f705(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_51f705(); } diff --git a/test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl b/test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl index 6524f5b960..5ec8b91386 100644 --- a/test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl +++ b/test/intrinsics/gen/degrees/51f705.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn degrees_51f705() { var res : f32 = degrees(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { degrees_51f705(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { degrees_51f705(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { degrees_51f705(); } diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl b/test/intrinsics/gen/determinant/2b62ba.wgsl index 2b24d1620b..10fd4e41c4 100644 --- a/test/intrinsics/gen/determinant/2b62ba.wgsl +++ b/test/intrinsics/gen/determinant/2b62ba.wgsl @@ -28,18 +28,18 @@ fn determinant_2b62ba() { var res: f32 = determinant(mat3x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_2b62ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_2b62ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_2b62ba(); } diff --git a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl index a2ee6721f4..b9c8bcd9c8 100644 --- a/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/determinant/2b62ba.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn determinant_2b62ba() { var res : f32 = determinant(mat3x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_2b62ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_2b62ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_2b62ba(); } diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl b/test/intrinsics/gen/determinant/a0a87c.wgsl index 9ce49d9c0c..b7720f5676 100644 --- a/test/intrinsics/gen/determinant/a0a87c.wgsl +++ b/test/intrinsics/gen/determinant/a0a87c.wgsl @@ -28,18 +28,18 @@ fn determinant_a0a87c() { var res: f32 = determinant(mat4x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_a0a87c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_a0a87c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_a0a87c(); } diff --git a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl index 948c1dc927..1352bafde8 100644 --- a/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/determinant/a0a87c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn determinant_a0a87c() { var res : f32 = determinant(mat4x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_a0a87c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_a0a87c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_a0a87c(); } diff --git a/test/intrinsics/gen/determinant/e19305.wgsl b/test/intrinsics/gen/determinant/e19305.wgsl index f930316bce..1406a1301c 100644 --- a/test/intrinsics/gen/determinant/e19305.wgsl +++ b/test/intrinsics/gen/determinant/e19305.wgsl @@ -28,18 +28,18 @@ fn determinant_e19305() { var res: f32 = determinant(mat2x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_e19305(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_e19305(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_e19305(); } diff --git a/test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl b/test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl index 418bbd7d5f..67724c6e24 100644 --- a/test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl +++ b/test/intrinsics/gen/determinant/e19305.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn determinant_e19305() { var res : f32 = determinant(mat2x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { determinant_e19305(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { determinant_e19305(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { determinant_e19305(); } diff --git a/test/intrinsics/gen/distance/0657d4.wgsl b/test/intrinsics/gen/distance/0657d4.wgsl index bb646dd2c9..2c57d8231b 100644 --- a/test/intrinsics/gen/distance/0657d4.wgsl +++ b/test/intrinsics/gen/distance/0657d4.wgsl @@ -28,18 +28,18 @@ fn distance_0657d4() { var res: f32 = distance(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_0657d4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_0657d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_0657d4(); } diff --git a/test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl b/test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl index 49a4c4f43e..1945bbb160 100644 --- a/test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/distance/0657d4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn distance_0657d4() { var res : f32 = distance(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_0657d4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_0657d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_0657d4(); } diff --git a/test/intrinsics/gen/distance/9646ea.wgsl b/test/intrinsics/gen/distance/9646ea.wgsl index f41be54ff8..009877c570 100644 --- a/test/intrinsics/gen/distance/9646ea.wgsl +++ b/test/intrinsics/gen/distance/9646ea.wgsl @@ -28,18 +28,18 @@ fn distance_9646ea() { var res: f32 = distance(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_9646ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_9646ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_9646ea(); } diff --git a/test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl b/test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl index 81a8e1a373..0e02dff448 100644 --- a/test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl +++ b/test/intrinsics/gen/distance/9646ea.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn distance_9646ea() { var res : f32 = distance(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_9646ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_9646ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_9646ea(); } diff --git a/test/intrinsics/gen/distance/aa4055.wgsl b/test/intrinsics/gen/distance/aa4055.wgsl index ae403c7fc2..0094477dbc 100644 --- a/test/intrinsics/gen/distance/aa4055.wgsl +++ b/test/intrinsics/gen/distance/aa4055.wgsl @@ -28,18 +28,18 @@ fn distance_aa4055() { var res: f32 = distance(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_aa4055(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_aa4055(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_aa4055(); } diff --git a/test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl b/test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl index 50437293f4..307399d742 100644 --- a/test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl +++ b/test/intrinsics/gen/distance/aa4055.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn distance_aa4055() { var res : f32 = distance(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_aa4055(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_aa4055(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_aa4055(); } diff --git a/test/intrinsics/gen/distance/cfed73.wgsl b/test/intrinsics/gen/distance/cfed73.wgsl index a14dc1b9c8..c40408d42a 100644 --- a/test/intrinsics/gen/distance/cfed73.wgsl +++ b/test/intrinsics/gen/distance/cfed73.wgsl @@ -28,18 +28,18 @@ fn distance_cfed73() { var res: f32 = distance(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_cfed73(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_cfed73(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_cfed73(); } diff --git a/test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl b/test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl index 86ed9e520a..db5bc7d901 100644 --- a/test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl +++ b/test/intrinsics/gen/distance/cfed73.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn distance_cfed73() { var res : f32 = distance(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { distance_cfed73(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { distance_cfed73(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { distance_cfed73(); } diff --git a/test/intrinsics/gen/dot/0c577b.wgsl b/test/intrinsics/gen/dot/0c577b.wgsl index 304528f3ff..745f4c457e 100644 --- a/test/intrinsics/gen/dot/0c577b.wgsl +++ b/test/intrinsics/gen/dot/0c577b.wgsl @@ -28,18 +28,18 @@ fn dot_0c577b() { var res: f32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_0c577b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_0c577b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_0c577b(); } diff --git a/test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl b/test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl index 8c624bb008..22411b9b57 100644 --- a/test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/0c577b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_0c577b() { var res : f32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_0c577b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_0c577b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_0c577b(); } diff --git a/test/intrinsics/gen/dot/7548a0.wgsl b/test/intrinsics/gen/dot/7548a0.wgsl index 62d39d6d76..4ee9011f8d 100644 --- a/test/intrinsics/gen/dot/7548a0.wgsl +++ b/test/intrinsics/gen/dot/7548a0.wgsl @@ -28,18 +28,18 @@ fn dot_7548a0() { var res: u32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_7548a0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_7548a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_7548a0(); } diff --git a/test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl b/test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl index 27b82656b4..c8b90177c6 100644 --- a/test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/7548a0.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_7548a0() { var res : u32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_7548a0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_7548a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_7548a0(); } diff --git a/test/intrinsics/gen/dot/883f0e.wgsl b/test/intrinsics/gen/dot/883f0e.wgsl index 4d73292b92..3a42f8c6bf 100644 --- a/test/intrinsics/gen/dot/883f0e.wgsl +++ b/test/intrinsics/gen/dot/883f0e.wgsl @@ -28,18 +28,18 @@ fn dot_883f0e() { var res: f32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_883f0e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_883f0e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_883f0e(); } diff --git a/test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl b/test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl index c27252ad24..4be39c5e21 100644 --- a/test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/883f0e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_883f0e() { var res : f32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_883f0e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_883f0e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_883f0e(); } diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl b/test/intrinsics/gen/dot/97c7ee.wgsl index d2e7e5d72e..c8f94597dc 100644 --- a/test/intrinsics/gen/dot/97c7ee.wgsl +++ b/test/intrinsics/gen/dot/97c7ee.wgsl @@ -28,18 +28,18 @@ fn dot_97c7ee() { var res: u32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_97c7ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_97c7ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_97c7ee(); } diff --git a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl b/test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl index 7741f7dd1e..488052d546 100644 --- a/test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/97c7ee.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_97c7ee() { var res : u32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_97c7ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_97c7ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_97c7ee(); } diff --git a/test/intrinsics/gen/dot/ba4246.wgsl b/test/intrinsics/gen/dot/ba4246.wgsl index b64f32bab4..fbeb13984a 100644 --- a/test/intrinsics/gen/dot/ba4246.wgsl +++ b/test/intrinsics/gen/dot/ba4246.wgsl @@ -28,18 +28,18 @@ fn dot_ba4246() { var res: f32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_ba4246(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_ba4246(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_ba4246(); } diff --git a/test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl b/test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl index 52ca2dacc6..7ddc8d16b1 100644 --- a/test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/ba4246.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_ba4246() { var res : f32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_ba4246(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_ba4246(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_ba4246(); } diff --git a/test/intrinsics/gen/dot/e994c7.wgsl b/test/intrinsics/gen/dot/e994c7.wgsl index 8ffe117d60..b78cbc4fd6 100644 --- a/test/intrinsics/gen/dot/e994c7.wgsl +++ b/test/intrinsics/gen/dot/e994c7.wgsl @@ -28,18 +28,18 @@ fn dot_e994c7() { var res: u32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_e994c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_e994c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_e994c7(); } diff --git a/test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl b/test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl index 365e0cef18..2b549594de 100644 --- a/test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/e994c7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_e994c7() { var res : u32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_e994c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_e994c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_e994c7(); } diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl b/test/intrinsics/gen/dot/ef6b1d.wgsl index b6e5eacb36..2e01ee2ebb 100644 --- a/test/intrinsics/gen/dot/ef6b1d.wgsl +++ b/test/intrinsics/gen/dot/ef6b1d.wgsl @@ -28,18 +28,18 @@ fn dot_ef6b1d() { var res: i32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_ef6b1d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_ef6b1d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_ef6b1d(); } diff --git a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl b/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl index 4c35395f1d..075cfcd34b 100644 --- a/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/ef6b1d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_ef6b1d() { var res : i32 = dot(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_ef6b1d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_ef6b1d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_ef6b1d(); } diff --git a/test/intrinsics/gen/dot/f1312c.wgsl b/test/intrinsics/gen/dot/f1312c.wgsl index f08b6f2a37..6bb0876bb0 100644 --- a/test/intrinsics/gen/dot/f1312c.wgsl +++ b/test/intrinsics/gen/dot/f1312c.wgsl @@ -28,18 +28,18 @@ fn dot_f1312c() { var res: i32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_f1312c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_f1312c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_f1312c(); } diff --git a/test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl b/test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl index 1e9ffe123f..7440cf96b9 100644 --- a/test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/f1312c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_f1312c() { var res : i32 = dot(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_f1312c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_f1312c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_f1312c(); } diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl b/test/intrinsics/gen/dot/fc5f7c.wgsl index 7b0ae29a17..bbadae8081 100644 --- a/test/intrinsics/gen/dot/fc5f7c.wgsl +++ b/test/intrinsics/gen/dot/fc5f7c.wgsl @@ -28,18 +28,18 @@ fn dot_fc5f7c() { var res: i32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_fc5f7c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_fc5f7c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_fc5f7c(); } diff --git a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl b/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl index 4aaabfc44a..6d30122343 100644 --- a/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dot/fc5f7c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn dot_fc5f7c() { var res : i32 = dot(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { dot_fc5f7c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dot_fc5f7c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { dot_fc5f7c(); } diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl b/test/intrinsics/gen/dpdx/0763f7.wgsl index fc6a536182..cbfc41a04c 100644 --- a/test/intrinsics/gen/dpdx/0763f7.wgsl +++ b/test/intrinsics/gen/dpdx/0763f7.wgsl @@ -28,7 +28,7 @@ fn dpdx_0763f7() { var res: vec3 = dpdx(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_0763f7(); } diff --git a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl b/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl index be5f4e0bb4..15235d627f 100644 --- a/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdx/0763f7.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdx_0763f7() { var res : vec3 = dpdx(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_0763f7(); } diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl b/test/intrinsics/gen/dpdx/99edb1.wgsl index 1ca0b065cf..84f512693b 100644 --- a/test/intrinsics/gen/dpdx/99edb1.wgsl +++ b/test/intrinsics/gen/dpdx/99edb1.wgsl @@ -28,7 +28,7 @@ fn dpdx_99edb1() { var res: vec2 = dpdx(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_99edb1(); } diff --git a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl b/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl index aafee00f68..7405f0fe79 100644 --- a/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdx/99edb1.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdx_99edb1() { var res : vec2 = dpdx(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_99edb1(); } diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl b/test/intrinsics/gen/dpdx/c487fa.wgsl index ed27ff0637..7b477fb860 100644 --- a/test/intrinsics/gen/dpdx/c487fa.wgsl +++ b/test/intrinsics/gen/dpdx/c487fa.wgsl @@ -28,7 +28,7 @@ fn dpdx_c487fa() { var res: vec4 = dpdx(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_c487fa(); } diff --git a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl b/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl index 350f0c2676..f2ebe8e25a 100644 --- a/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdx/c487fa.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdx_c487fa() { var res : vec4 = dpdx(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_c487fa(); } diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl b/test/intrinsics/gen/dpdx/e263de.wgsl index 58fdd1f7a2..60498a7a25 100644 --- a/test/intrinsics/gen/dpdx/e263de.wgsl +++ b/test/intrinsics/gen/dpdx/e263de.wgsl @@ -28,7 +28,7 @@ fn dpdx_e263de() { var res: f32 = dpdx(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_e263de(); } diff --git a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl b/test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl index 03939a66fd..ac653d8cba 100644 --- a/test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdx/e263de.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdx_e263de() { var res : f32 = dpdx(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdx_e263de(); } diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl b/test/intrinsics/gen/dpdxCoarse/029152.wgsl index e6d8ea610b..1a7cc1da61 100644 --- a/test/intrinsics/gen/dpdxCoarse/029152.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/029152.wgsl @@ -28,7 +28,7 @@ fn dpdxCoarse_029152() { var res: f32 = dpdxCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_029152(); } diff --git a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl index 9f2d250e7b..38fe60cef1 100644 --- a/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/029152.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxCoarse_029152() { var res : f32 = dpdxCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_029152(); } diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl b/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl index 3e5bfe589a..5ccf411a35 100644 --- a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl @@ -28,7 +28,7 @@ fn dpdxCoarse_9581cf() { var res: vec2 = dpdxCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_9581cf(); } diff --git a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl index a34115036d..51ac0a5a82 100644 --- a/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/9581cf.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxCoarse_9581cf() { var res : vec2 = dpdxCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_9581cf(); } diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl b/test/intrinsics/gen/dpdxCoarse/c28641.wgsl index a2b5d79dca..8777156bc3 100644 --- a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/c28641.wgsl @@ -28,7 +28,7 @@ fn dpdxCoarse_c28641() { var res: vec4 = dpdxCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_c28641(); } diff --git a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl index 17c714b751..51fa7dc0e0 100644 --- a/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/c28641.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxCoarse_c28641() { var res : vec4 = dpdxCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_c28641(); } diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl b/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl index d3843af58e..40b501cf6f 100644 --- a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl @@ -28,7 +28,7 @@ fn dpdxCoarse_f64d7b() { var res: vec3 = dpdxCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_f64d7b(); } diff --git a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl index 6182abec46..f5a9d29ab0 100644 --- a/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxCoarse/f64d7b.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxCoarse_f64d7b() { var res : vec3 = dpdxCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxCoarse_f64d7b(); } diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl b/test/intrinsics/gen/dpdxFine/8c5069.wgsl index 58bf252dd6..b1db7e3d9a 100644 --- a/test/intrinsics/gen/dpdxFine/8c5069.wgsl +++ b/test/intrinsics/gen/dpdxFine/8c5069.wgsl @@ -28,7 +28,7 @@ fn dpdxFine_8c5069() { var res: vec4 = dpdxFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_8c5069(); } diff --git a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl index a83e763db7..6de1a1c995 100644 --- a/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxFine/8c5069.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxFine_8c5069() { var res : vec4 = dpdxFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_8c5069(); } diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl b/test/intrinsics/gen/dpdxFine/9631de.wgsl index 2ca05c3916..f29dffb64f 100644 --- a/test/intrinsics/gen/dpdxFine/9631de.wgsl +++ b/test/intrinsics/gen/dpdxFine/9631de.wgsl @@ -28,7 +28,7 @@ fn dpdxFine_9631de() { var res: vec2 = dpdxFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_9631de(); } diff --git a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl index 002e44e0b8..a56d3c4767 100644 --- a/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxFine/9631de.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxFine_9631de() { var res : vec2 = dpdxFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_9631de(); } diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl b/test/intrinsics/gen/dpdxFine/f401a2.wgsl index a72332878a..405291f316 100644 --- a/test/intrinsics/gen/dpdxFine/f401a2.wgsl +++ b/test/intrinsics/gen/dpdxFine/f401a2.wgsl @@ -28,7 +28,7 @@ fn dpdxFine_f401a2() { var res: f32 = dpdxFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_f401a2(); } diff --git a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl index 2790d8d668..3f5c8360a3 100644 --- a/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxFine/f401a2.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxFine_f401a2() { var res : f32 = dpdxFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_f401a2(); } diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl b/test/intrinsics/gen/dpdxFine/f92fb6.wgsl index 97ceac3cd0..8a3b66db5c 100644 --- a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl +++ b/test/intrinsics/gen/dpdxFine/f92fb6.wgsl @@ -28,7 +28,7 @@ fn dpdxFine_f92fb6() { var res: vec3 = dpdxFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_f92fb6(); } diff --git a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl b/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl index a40c3fb522..5189c7ff54 100644 --- a/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdxFine/f92fb6.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdxFine_f92fb6() { var res : vec3 = dpdxFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdxFine_f92fb6(); } diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl b/test/intrinsics/gen/dpdy/699a05.wgsl index 3ae6234664..dc14668929 100644 --- a/test/intrinsics/gen/dpdy/699a05.wgsl +++ b/test/intrinsics/gen/dpdy/699a05.wgsl @@ -28,7 +28,7 @@ fn dpdy_699a05() { var res: vec4 = dpdy(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_699a05(); } diff --git a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl b/test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl index 5be383d44c..9aa244c286 100644 --- a/test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdy/699a05.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdy_699a05() { var res : vec4 = dpdy(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_699a05(); } diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl b/test/intrinsics/gen/dpdy/7f8d84.wgsl index d712959aa8..c468777ef2 100644 --- a/test/intrinsics/gen/dpdy/7f8d84.wgsl +++ b/test/intrinsics/gen/dpdy/7f8d84.wgsl @@ -28,7 +28,7 @@ fn dpdy_7f8d84() { var res: f32 = dpdy(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_7f8d84(); } diff --git a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl b/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl index 9d96009fa1..732458e2a1 100644 --- a/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdy/7f8d84.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdy_7f8d84() { var res : f32 = dpdy(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_7f8d84(); } diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl b/test/intrinsics/gen/dpdy/a8b56e.wgsl index 011d81398e..e79bff9652 100644 --- a/test/intrinsics/gen/dpdy/a8b56e.wgsl +++ b/test/intrinsics/gen/dpdy/a8b56e.wgsl @@ -28,7 +28,7 @@ fn dpdy_a8b56e() { var res: vec2 = dpdy(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_a8b56e(); } diff --git a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl b/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl index bfe028f522..3493de8b8e 100644 --- a/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdy/a8b56e.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdy_a8b56e() { var res : vec2 = dpdy(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_a8b56e(); } diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl b/test/intrinsics/gen/dpdy/feb40f.wgsl index 31ce8bccf7..f3afdc2db3 100644 --- a/test/intrinsics/gen/dpdy/feb40f.wgsl +++ b/test/intrinsics/gen/dpdy/feb40f.wgsl @@ -28,7 +28,7 @@ fn dpdy_feb40f() { var res: vec3 = dpdy(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_feb40f(); } diff --git a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl b/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl index f75381cb0a..bdcb51d6ee 100644 --- a/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdy/feb40f.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdy_feb40f() { var res : vec3 = dpdy(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdy_feb40f(); } diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl b/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl index 073440f0fc..15007a3276 100644 --- a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl @@ -28,7 +28,7 @@ fn dpdyCoarse_3e1ab4() { var res: vec2 = dpdyCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_3e1ab4(); } diff --git a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl index d109629ac9..347ad7363e 100644 --- a/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/3e1ab4.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyCoarse_3e1ab4() { var res : vec2 = dpdyCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_3e1ab4(); } diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl b/test/intrinsics/gen/dpdyCoarse/445d24.wgsl index eeed8c9d0b..b397d4e87b 100644 --- a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/445d24.wgsl @@ -28,7 +28,7 @@ fn dpdyCoarse_445d24() { var res: vec4 = dpdyCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_445d24(); } diff --git a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl index c5659f6f28..db347c46d7 100644 --- a/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/445d24.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyCoarse_445d24() { var res : vec4 = dpdyCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_445d24(); } diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl b/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl index a2414d70f9..7fc7907d5a 100644 --- a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl @@ -28,7 +28,7 @@ fn dpdyCoarse_870a7e() { var res: f32 = dpdyCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_870a7e(); } diff --git a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl index 1bf505ffdd..b3d75866db 100644 --- a/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/870a7e.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyCoarse_870a7e() { var res : f32 = dpdyCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_870a7e(); } diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl b/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl index 36cfd7b503..b1f32ef5c0 100644 --- a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl @@ -28,7 +28,7 @@ fn dpdyCoarse_ae1873() { var res: vec3 = dpdyCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_ae1873(); } diff --git a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl index e625403961..c116a9e18d 100644 --- a/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyCoarse/ae1873.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyCoarse_ae1873() { var res : vec3 = dpdyCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyCoarse_ae1873(); } diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl b/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl index 352890b0a5..3a28460501 100644 --- a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl +++ b/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl @@ -28,7 +28,7 @@ fn dpdyFine_1fb7ab() { var res: vec3 = dpdyFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_1fb7ab(); } diff --git a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl index 852459c22e..96fd518203 100644 --- a/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyFine/1fb7ab.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyFine_1fb7ab() { var res : vec3 = dpdyFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_1fb7ab(); } diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl b/test/intrinsics/gen/dpdyFine/6eb673.wgsl index d2bb96c901..9469533325 100644 --- a/test/intrinsics/gen/dpdyFine/6eb673.wgsl +++ b/test/intrinsics/gen/dpdyFine/6eb673.wgsl @@ -28,7 +28,7 @@ fn dpdyFine_6eb673() { var res: f32 = dpdyFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_6eb673(); } diff --git a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl index 60caecd2d1..8fbc820a39 100644 --- a/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyFine/6eb673.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyFine_6eb673() { var res : f32 = dpdyFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_6eb673(); } diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl b/test/intrinsics/gen/dpdyFine/d0a648.wgsl index 57e48feb07..436f5a1821 100644 --- a/test/intrinsics/gen/dpdyFine/d0a648.wgsl +++ b/test/intrinsics/gen/dpdyFine/d0a648.wgsl @@ -28,7 +28,7 @@ fn dpdyFine_d0a648() { var res: vec4 = dpdyFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_d0a648(); } diff --git a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl index 160b27b15d..5d4fc7da4a 100644 --- a/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyFine/d0a648.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyFine_d0a648() { var res : vec4 = dpdyFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_d0a648(); } diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl b/test/intrinsics/gen/dpdyFine/df33aa.wgsl index 4d84817e3d..fdfc9c8713 100644 --- a/test/intrinsics/gen/dpdyFine/df33aa.wgsl +++ b/test/intrinsics/gen/dpdyFine/df33aa.wgsl @@ -28,7 +28,7 @@ fn dpdyFine_df33aa() { var res: vec2 = dpdyFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_df33aa(); } diff --git a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl b/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl index b541ecf09c..876948a28b 100644 --- a/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/dpdyFine/df33aa.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn dpdyFine_df33aa() { var res : vec2 = dpdyFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { dpdyFine_df33aa(); } diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl b/test/intrinsics/gen/exp/0f70eb.wgsl index a641b6cb65..e65faa43d3 100644 --- a/test/intrinsics/gen/exp/0f70eb.wgsl +++ b/test/intrinsics/gen/exp/0f70eb.wgsl @@ -28,18 +28,18 @@ fn exp_0f70eb() { var res: vec4 = exp(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_0f70eb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_0f70eb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_0f70eb(); } diff --git a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl index 56d1828921..bdcd32be2b 100644 --- a/test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp/0f70eb.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp_0f70eb() { var res : vec4 = exp(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_0f70eb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_0f70eb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_0f70eb(); } diff --git a/test/intrinsics/gen/exp/1951e7.wgsl b/test/intrinsics/gen/exp/1951e7.wgsl index e8a0ecc0e1..6e006f3abc 100644 --- a/test/intrinsics/gen/exp/1951e7.wgsl +++ b/test/intrinsics/gen/exp/1951e7.wgsl @@ -28,18 +28,18 @@ fn exp_1951e7() { var res: vec2 = exp(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_1951e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_1951e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_1951e7(); } diff --git a/test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl b/test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl index 81e9694843..f3dd502f6a 100644 --- a/test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp/1951e7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp_1951e7() { var res : vec2 = exp(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_1951e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_1951e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_1951e7(); } diff --git a/test/intrinsics/gen/exp/771fd2.wgsl b/test/intrinsics/gen/exp/771fd2.wgsl index e44b635a5f..a1cb3cdbcc 100644 --- a/test/intrinsics/gen/exp/771fd2.wgsl +++ b/test/intrinsics/gen/exp/771fd2.wgsl @@ -28,18 +28,18 @@ fn exp_771fd2() { var res: f32 = exp(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_771fd2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_771fd2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_771fd2(); } diff --git a/test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl b/test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl index 4fdeb25246..31bfd18e2a 100644 --- a/test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp/771fd2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp_771fd2() { var res : f32 = exp(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_771fd2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_771fd2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_771fd2(); } diff --git a/test/intrinsics/gen/exp/d98450.wgsl b/test/intrinsics/gen/exp/d98450.wgsl index c74af047c8..2404a177a6 100644 --- a/test/intrinsics/gen/exp/d98450.wgsl +++ b/test/intrinsics/gen/exp/d98450.wgsl @@ -28,18 +28,18 @@ fn exp_d98450() { var res: vec3 = exp(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_d98450(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_d98450(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_d98450(); } diff --git a/test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl b/test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl index 06ffea3d8e..168c3c2805 100644 --- a/test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp/d98450.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp_d98450() { var res : vec3 = exp(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp_d98450(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp_d98450(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp_d98450(); } diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl b/test/intrinsics/gen/exp2/1f8680.wgsl index 40852d4c95..0fdaeba42f 100644 --- a/test/intrinsics/gen/exp2/1f8680.wgsl +++ b/test/intrinsics/gen/exp2/1f8680.wgsl @@ -28,18 +28,18 @@ fn exp2_1f8680() { var res: vec3 = exp2(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_1f8680(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_1f8680(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_1f8680(); } diff --git a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl index be2ee95fcb..a4cba82f82 100644 --- a/test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp2/1f8680.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp2_1f8680() { var res : vec3 = exp2(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_1f8680(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_1f8680(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_1f8680(); } diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl b/test/intrinsics/gen/exp2/a9d0a7.wgsl index ac6410213c..46e47f7023 100644 --- a/test/intrinsics/gen/exp2/a9d0a7.wgsl +++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl @@ -28,18 +28,18 @@ fn exp2_a9d0a7() { var res: vec4 = exp2(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_a9d0a7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_a9d0a7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_a9d0a7(); } diff --git a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl index ebdaf6d792..6a9160b5d0 100644 --- a/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp2/a9d0a7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp2_a9d0a7() { var res : vec4 = exp2(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_a9d0a7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_a9d0a7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_a9d0a7(); } diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl b/test/intrinsics/gen/exp2/d6777c.wgsl index 7206fe65f5..42933c0030 100644 --- a/test/intrinsics/gen/exp2/d6777c.wgsl +++ b/test/intrinsics/gen/exp2/d6777c.wgsl @@ -28,18 +28,18 @@ fn exp2_d6777c() { var res: vec2 = exp2(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_d6777c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_d6777c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_d6777c(); } diff --git a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl index 3a6b02b840..7c84e158e8 100644 --- a/test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp2/d6777c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp2_d6777c() { var res : vec2 = exp2(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_d6777c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_d6777c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_d6777c(); } diff --git a/test/intrinsics/gen/exp2/dea523.wgsl b/test/intrinsics/gen/exp2/dea523.wgsl index 1ca1f3d7b8..26e836aee7 100644 --- a/test/intrinsics/gen/exp2/dea523.wgsl +++ b/test/intrinsics/gen/exp2/dea523.wgsl @@ -28,18 +28,18 @@ fn exp2_dea523() { var res: f32 = exp2(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_dea523(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_dea523(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_dea523(); } diff --git a/test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl b/test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl index 548eaea659..92ea06dc38 100644 --- a/test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl +++ b/test/intrinsics/gen/exp2/dea523.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn exp2_dea523() { var res : f32 = exp2(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { exp2_dea523(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { exp2_dea523(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { exp2_dea523(); } diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl b/test/intrinsics/gen/faceForward/5afbd5.wgsl index 70d32a9166..3e036f3908 100644 --- a/test/intrinsics/gen/faceForward/5afbd5.wgsl +++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl @@ -28,18 +28,18 @@ fn faceForward_5afbd5() { var res: vec3 = faceForward(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_5afbd5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_5afbd5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_5afbd5(); } diff --git a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl index 60f43f7a88..65e8800732 100644 --- a/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/faceForward/5afbd5.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn faceForward_5afbd5() { var res : vec3 = faceForward(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_5afbd5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_5afbd5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_5afbd5(); } diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl b/test/intrinsics/gen/faceForward/b316e5.wgsl index bccaf38a89..2e31ca60c9 100644 --- a/test/intrinsics/gen/faceForward/b316e5.wgsl +++ b/test/intrinsics/gen/faceForward/b316e5.wgsl @@ -28,18 +28,18 @@ fn faceForward_b316e5() { var res: vec4 = faceForward(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_b316e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_b316e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_b316e5(); } diff --git a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl index accacf2bc0..e3cc002507 100644 --- a/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/faceForward/b316e5.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn faceForward_b316e5() { var res : vec4 = faceForward(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_b316e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_b316e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_b316e5(); } diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl b/test/intrinsics/gen/faceForward/e6908b.wgsl index 626e2ab3b6..4c9a2be79a 100644 --- a/test/intrinsics/gen/faceForward/e6908b.wgsl +++ b/test/intrinsics/gen/faceForward/e6908b.wgsl @@ -28,18 +28,18 @@ fn faceForward_e6908b() { var res: vec2 = faceForward(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_e6908b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_e6908b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_e6908b(); } diff --git a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl index c5a1a40ebc..96c2c876de 100644 --- a/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/faceForward/e6908b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn faceForward_e6908b() { var res : vec2 = faceForward(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { faceForward_e6908b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { faceForward_e6908b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { faceForward_e6908b(); } diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl b/test/intrinsics/gen/floor/3bccc4.wgsl index 21c16ee0b3..3d27b575b7 100644 --- a/test/intrinsics/gen/floor/3bccc4.wgsl +++ b/test/intrinsics/gen/floor/3bccc4.wgsl @@ -28,18 +28,18 @@ fn floor_3bccc4() { var res: vec4 = floor(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_3bccc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_3bccc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_3bccc4(); } diff --git a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl index a9a17da6cc..878e104f59 100644 --- a/test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/floor/3bccc4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn floor_3bccc4() { var res : vec4 = floor(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_3bccc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_3bccc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_3bccc4(); } diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl b/test/intrinsics/gen/floor/5fc9ac.wgsl index 8b9bb2ccbf..49afc11067 100644 --- a/test/intrinsics/gen/floor/5fc9ac.wgsl +++ b/test/intrinsics/gen/floor/5fc9ac.wgsl @@ -28,18 +28,18 @@ fn floor_5fc9ac() { var res: vec2 = floor(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_5fc9ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_5fc9ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_5fc9ac(); } diff --git a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl index 5ab196a080..1b6fadd5e8 100644 --- a/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl +++ b/test/intrinsics/gen/floor/5fc9ac.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn floor_5fc9ac() { var res : vec2 = floor(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_5fc9ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_5fc9ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_5fc9ac(); } diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl b/test/intrinsics/gen/floor/60d7ea.wgsl index 90c0a3be1f..6e4c944ecf 100644 --- a/test/intrinsics/gen/floor/60d7ea.wgsl +++ b/test/intrinsics/gen/floor/60d7ea.wgsl @@ -28,18 +28,18 @@ fn floor_60d7ea() { var res: vec3 = floor(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_60d7ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_60d7ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_60d7ea(); } diff --git a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl index 62b956fc51..bfc5a83dba 100644 --- a/test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl +++ b/test/intrinsics/gen/floor/60d7ea.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn floor_60d7ea() { var res : vec3 = floor(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_60d7ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_60d7ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_60d7ea(); } diff --git a/test/intrinsics/gen/floor/66f154.wgsl b/test/intrinsics/gen/floor/66f154.wgsl index afec159b36..8020bf652a 100644 --- a/test/intrinsics/gen/floor/66f154.wgsl +++ b/test/intrinsics/gen/floor/66f154.wgsl @@ -28,18 +28,18 @@ fn floor_66f154() { var res: f32 = floor(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_66f154(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_66f154(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_66f154(); } diff --git a/test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl b/test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl index 45144a4333..11de386ff3 100644 --- a/test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl +++ b/test/intrinsics/gen/floor/66f154.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn floor_66f154() { var res : f32 = floor(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { floor_66f154(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { floor_66f154(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { floor_66f154(); } diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl b/test/intrinsics/gen/fma/26a7a9.wgsl index 314493b800..bb6f1c0c3a 100644 --- a/test/intrinsics/gen/fma/26a7a9.wgsl +++ b/test/intrinsics/gen/fma/26a7a9.wgsl @@ -28,18 +28,18 @@ fn fma_26a7a9() { var res: vec2 = fma(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_26a7a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_26a7a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_26a7a9(); } diff --git a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl index fb9bdef26b..f1edf4ec43 100644 --- a/test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fma/26a7a9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fma_26a7a9() { var res : vec2 = fma(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_26a7a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_26a7a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_26a7a9(); } diff --git a/test/intrinsics/gen/fma/6a3283.wgsl b/test/intrinsics/gen/fma/6a3283.wgsl index e722ec9c71..2074905d01 100644 --- a/test/intrinsics/gen/fma/6a3283.wgsl +++ b/test/intrinsics/gen/fma/6a3283.wgsl @@ -28,18 +28,18 @@ fn fma_6a3283() { var res: vec4 = fma(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_6a3283(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_6a3283(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_6a3283(); } diff --git a/test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl b/test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl index 5040b3b54a..267c2b107e 100644 --- a/test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fma/6a3283.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fma_6a3283() { var res : vec4 = fma(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_6a3283(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_6a3283(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_6a3283(); } diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl b/test/intrinsics/gen/fma/c10ba3.wgsl index 39b6af37a4..9bd4277631 100644 --- a/test/intrinsics/gen/fma/c10ba3.wgsl +++ b/test/intrinsics/gen/fma/c10ba3.wgsl @@ -28,18 +28,18 @@ fn fma_c10ba3() { var res: f32 = fma(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_c10ba3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_c10ba3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_c10ba3(); } diff --git a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl index f43de8fbb2..baec69d68c 100644 --- a/test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fma/c10ba3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fma_c10ba3() { var res : f32 = fma(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_c10ba3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_c10ba3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_c10ba3(); } diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl b/test/intrinsics/gen/fma/e17c5c.wgsl index 6fa8a4ffd8..a9adbb0fb5 100644 --- a/test/intrinsics/gen/fma/e17c5c.wgsl +++ b/test/intrinsics/gen/fma/e17c5c.wgsl @@ -28,18 +28,18 @@ fn fma_e17c5c() { var res: vec3 = fma(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_e17c5c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_e17c5c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_e17c5c(); } diff --git a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl index 35874f403c..adc6a88802 100644 --- a/test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fma/e17c5c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fma_e17c5c() { var res : vec3 = fma(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fma_e17c5c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fma_e17c5c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fma_e17c5c(); } diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl b/test/intrinsics/gen/fract/8bc1e9.wgsl index 79c96115ed..d064af2427 100644 --- a/test/intrinsics/gen/fract/8bc1e9.wgsl +++ b/test/intrinsics/gen/fract/8bc1e9.wgsl @@ -28,18 +28,18 @@ fn fract_8bc1e9() { var res: vec4 = fract(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_8bc1e9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_8bc1e9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_8bc1e9(); } diff --git a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl index 77b2630405..6476408983 100644 --- a/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fract/8bc1e9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fract_8bc1e9() { var res : vec4 = fract(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_8bc1e9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_8bc1e9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_8bc1e9(); } diff --git a/test/intrinsics/gen/fract/943cb1.wgsl b/test/intrinsics/gen/fract/943cb1.wgsl index 9c9552a3b6..50d0038dec 100644 --- a/test/intrinsics/gen/fract/943cb1.wgsl +++ b/test/intrinsics/gen/fract/943cb1.wgsl @@ -28,18 +28,18 @@ fn fract_943cb1() { var res: vec2 = fract(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_943cb1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_943cb1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_943cb1(); } diff --git a/test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl b/test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl index 26a6f25a69..977e3f95a6 100644 --- a/test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fract/943cb1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fract_943cb1() { var res : vec2 = fract(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_943cb1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_943cb1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_943cb1(); } diff --git a/test/intrinsics/gen/fract/a49758.wgsl b/test/intrinsics/gen/fract/a49758.wgsl index 961795409c..567a336bcd 100644 --- a/test/intrinsics/gen/fract/a49758.wgsl +++ b/test/intrinsics/gen/fract/a49758.wgsl @@ -28,18 +28,18 @@ fn fract_a49758() { var res: vec3 = fract(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_a49758(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_a49758(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_a49758(); } diff --git a/test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl b/test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl index 8adc33c413..7ab47df0dc 100644 --- a/test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fract/a49758.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fract_a49758() { var res : vec3 = fract(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_a49758(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_a49758(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_a49758(); } diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl b/test/intrinsics/gen/fract/fa5c71.wgsl index b6eaefedd4..35a24e1f2d 100644 --- a/test/intrinsics/gen/fract/fa5c71.wgsl +++ b/test/intrinsics/gen/fract/fa5c71.wgsl @@ -28,18 +28,18 @@ fn fract_fa5c71() { var res: f32 = fract(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_fa5c71(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_fa5c71(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_fa5c71(); } diff --git a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl index 292a7bfd9f..3599c793b1 100644 --- a/test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fract/fa5c71.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn fract_fa5c71() { var res : f32 = fract(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { fract_fa5c71(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fract_fa5c71(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { fract_fa5c71(); } diff --git a/test/intrinsics/gen/frexp/368997.wgsl b/test/intrinsics/gen/frexp/368997.wgsl index af00ee5775..f7d9a71371 100644 --- a/test/intrinsics/gen/frexp/368997.wgsl +++ b/test/intrinsics/gen/frexp/368997.wgsl @@ -28,18 +28,18 @@ fn frexp_368997() { var res = frexp(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_368997(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_368997(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_368997(); } diff --git a/test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl b/test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl index d0f86b4196..914f1d5e48 100644 --- a/test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl +++ b/test/intrinsics/gen/frexp/368997.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn frexp_368997() { var res = frexp(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_368997(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_368997(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_368997(); } diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl b/test/intrinsics/gen/frexp/3c4f48.wgsl index ce583252f2..2dd08497c6 100644 --- a/test/intrinsics/gen/frexp/3c4f48.wgsl +++ b/test/intrinsics/gen/frexp/3c4f48.wgsl @@ -28,18 +28,18 @@ fn frexp_3c4f48() { var res = frexp(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_3c4f48(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_3c4f48(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_3c4f48(); } diff --git a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl b/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl index 07b50b673b..2129fb60e0 100644 --- a/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl +++ b/test/intrinsics/gen/frexp/3c4f48.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn frexp_3c4f48() { var res = frexp(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_3c4f48(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_3c4f48(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_3c4f48(); } diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl b/test/intrinsics/gen/frexp/4bdfc7.wgsl index 4b48ab8c76..eff45189c5 100644 --- a/test/intrinsics/gen/frexp/4bdfc7.wgsl +++ b/test/intrinsics/gen/frexp/4bdfc7.wgsl @@ -28,18 +28,18 @@ fn frexp_4bdfc7() { var res = frexp(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_4bdfc7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_4bdfc7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_4bdfc7(); } diff --git a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl b/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl index 6473fd5291..8dfe70c32e 100644 --- a/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn frexp_4bdfc7() { var res = frexp(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_4bdfc7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_4bdfc7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_4bdfc7(); } diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl b/test/intrinsics/gen/frexp/eabd40.wgsl index a2f580f9ac..3f2f00d3ba 100644 --- a/test/intrinsics/gen/frexp/eabd40.wgsl +++ b/test/intrinsics/gen/frexp/eabd40.wgsl @@ -28,18 +28,18 @@ fn frexp_eabd40() { var res = frexp(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_eabd40(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_eabd40(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_eabd40(); } diff --git a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl b/test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl index 8dd5d1c05a..3bcd2b665b 100644 --- a/test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl +++ b/test/intrinsics/gen/frexp/eabd40.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn frexp_eabd40() { var res = frexp(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { frexp_eabd40(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { frexp_eabd40(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { frexp_eabd40(); } diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl b/test/intrinsics/gen/fwidth/5d1b39.wgsl index f323acad63..8400934257 100644 --- a/test/intrinsics/gen/fwidth/5d1b39.wgsl +++ b/test/intrinsics/gen/fwidth/5d1b39.wgsl @@ -28,7 +28,7 @@ fn fwidth_5d1b39() { var res: vec3 = fwidth(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_5d1b39(); } diff --git a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl b/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl index b2f06923fd..f3c53fa70e 100644 --- a/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidth/5d1b39.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidth_5d1b39() { var res : vec3 = fwidth(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_5d1b39(); } diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl b/test/intrinsics/gen/fwidth/b83ebb.wgsl index e528240b8e..36592fd407 100644 --- a/test/intrinsics/gen/fwidth/b83ebb.wgsl +++ b/test/intrinsics/gen/fwidth/b83ebb.wgsl @@ -28,7 +28,7 @@ fn fwidth_b83ebb() { var res: vec2 = fwidth(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_b83ebb(); } diff --git a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl b/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl index a858363c6e..aa9e984c55 100644 --- a/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidth/b83ebb.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidth_b83ebb() { var res : vec2 = fwidth(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_b83ebb(); } diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl b/test/intrinsics/gen/fwidth/d2ab9a.wgsl index 615e25155a..49c41ea61d 100644 --- a/test/intrinsics/gen/fwidth/d2ab9a.wgsl +++ b/test/intrinsics/gen/fwidth/d2ab9a.wgsl @@ -28,7 +28,7 @@ fn fwidth_d2ab9a() { var res: vec4 = fwidth(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_d2ab9a(); } diff --git a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl b/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl index ee3c5511a4..d5ba206bd5 100644 --- a/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidth/d2ab9a.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidth_d2ab9a() { var res : vec4 = fwidth(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_d2ab9a(); } diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl b/test/intrinsics/gen/fwidth/df38ef.wgsl index 5cd698deca..9388812748 100644 --- a/test/intrinsics/gen/fwidth/df38ef.wgsl +++ b/test/intrinsics/gen/fwidth/df38ef.wgsl @@ -28,7 +28,7 @@ fn fwidth_df38ef() { var res: f32 = fwidth(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_df38ef(); } diff --git a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl b/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl index a0fcaec0ea..b98137eccf 100644 --- a/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidth/df38ef.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidth_df38ef() { var res : f32 = fwidth(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidth_df38ef(); } diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl b/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl index 35df109b2b..a7c4cd361a 100644 --- a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl @@ -28,7 +28,7 @@ fn fwidthCoarse_159c8a() { var res: f32 = fwidthCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_159c8a(); } diff --git a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl index f4c9169626..1e592efacf 100644 --- a/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/159c8a.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthCoarse_159c8a() { var res : f32 = fwidthCoarse(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_159c8a(); } diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl b/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl index c1c41e1551..044c58294c 100644 --- a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl @@ -28,7 +28,7 @@ fn fwidthCoarse_1e59d9() { var res: vec3 = fwidthCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_1e59d9(); } diff --git a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl index 838c5e0e5d..1352bf609d 100644 --- a/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/1e59d9.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthCoarse_1e59d9() { var res : vec3 = fwidthCoarse(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_1e59d9(); } diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl b/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl index 1d7272efb8..da66152061 100644 --- a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl @@ -28,7 +28,7 @@ fn fwidthCoarse_4e4fc4() { var res: vec4 = fwidthCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_4e4fc4(); } diff --git a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl index 01eae21e3c..3fea38af1a 100644 --- a/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/4e4fc4.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthCoarse_4e4fc4() { var res : vec4 = fwidthCoarse(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_4e4fc4(); } diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl b/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl index b27d20da8c..bfd46bb2ba 100644 --- a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl @@ -28,7 +28,7 @@ fn fwidthCoarse_e653f7() { var res: vec2 = fwidthCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_e653f7(); } diff --git a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl index 2bed1c7f8d..9e5a1dae57 100644 --- a/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthCoarse/e653f7.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthCoarse_e653f7() { var res : vec2 = fwidthCoarse(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthCoarse_e653f7(); } diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl b/test/intrinsics/gen/fwidthFine/523fdc.wgsl index a882b5cf63..d02b674609 100644 --- a/test/intrinsics/gen/fwidthFine/523fdc.wgsl +++ b/test/intrinsics/gen/fwidthFine/523fdc.wgsl @@ -28,7 +28,7 @@ fn fwidthFine_523fdc() { var res: vec3 = fwidthFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_523fdc(); } diff --git a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl index d0fff429de..41cb66cfa6 100644 --- a/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthFine/523fdc.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthFine_523fdc() { var res : vec3 = fwidthFine(vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_523fdc(); } diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl b/test/intrinsics/gen/fwidthFine/68f4ef.wgsl index f3fce3bece..cd641a0278 100644 --- a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl +++ b/test/intrinsics/gen/fwidthFine/68f4ef.wgsl @@ -28,7 +28,7 @@ fn fwidthFine_68f4ef() { var res: vec4 = fwidthFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_68f4ef(); } diff --git a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl index 19389eb9ba..97f10330e9 100644 --- a/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthFine/68f4ef.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthFine_68f4ef() { var res : vec4 = fwidthFine(vec4()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_68f4ef(); } diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl b/test/intrinsics/gen/fwidthFine/f1742d.wgsl index 8d6c71cbf2..c78f9b0588 100644 --- a/test/intrinsics/gen/fwidthFine/f1742d.wgsl +++ b/test/intrinsics/gen/fwidthFine/f1742d.wgsl @@ -28,7 +28,7 @@ fn fwidthFine_f1742d() { var res: f32 = fwidthFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_f1742d(); } diff --git a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl index 6985860e91..4a764a517f 100644 --- a/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthFine/f1742d.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthFine_f1742d() { var res : f32 = fwidthFine(1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_f1742d(); } diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl b/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl index ba6726e2c0..4176ec26fa 100644 --- a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl +++ b/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl @@ -28,7 +28,7 @@ fn fwidthFine_ff6aa0() { var res: vec2 = fwidthFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_ff6aa0(); } diff --git a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl b/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl index c9b1e2405d..7ca7637da9 100644 --- a/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/fwidthFine/ff6aa0.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn fwidthFine_ff6aa0() { var res : vec2 = fwidthFine(vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fwidthFine_ff6aa0(); } diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl b/test/intrinsics/gen/ignore/2a6ac2.wgsl index a7bb0c61e1..b7543077e6 100644 --- a/test/intrinsics/gen/ignore/2a6ac2.wgsl +++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d; // fn ignore(texture_depth_multisampled_2d) fn ignore_2a6ac2() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_2a6ac2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_2a6ac2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_2a6ac2(); } diff --git a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.wgsl index c035b52849..c6a214563e 100644 --- a/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/2a6ac2.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/2a6ac2.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn ignore_2a6ac2() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_2a6ac2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_2a6ac2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_2a6ac2(); } diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl b/test/intrinsics/gen/ignore/5016e5.wgsl index 8628618393..0e49fb6dae 100644 --- a/test/intrinsics/gen/ignore/5016e5.wgsl +++ b/test/intrinsics/gen/ignore/5016e5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: sampler; +@group(1) @binding(0) var arg_0: sampler; // fn ignore(sampler) fn ignore_5016e5() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_5016e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_5016e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_5016e5(); } diff --git a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.wgsl index e42269323c..2d1c7b668f 100644 --- a/test/intrinsics/gen/ignore/5016e5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/5016e5.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/5016e5.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : sampler; +@group(1) @binding(0) var arg_0 : sampler; fn ignore_5016e5() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_5016e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_5016e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_5016e5(); } diff --git a/test/intrinsics/gen/ignore/509355.wgsl b/test/intrinsics/gen/ignore/509355.wgsl index 161002c0ff..30557aad62 100644 --- a/test/intrinsics/gen/ignore/509355.wgsl +++ b/test/intrinsics/gen/ignore/509355.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; +@group(1) @binding(0) var arg_0: texture_depth_cube; // fn ignore(texture_depth_cube) fn ignore_509355() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_509355(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_509355(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_509355(); } diff --git a/test/intrinsics/gen/ignore/509355.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/509355.wgsl.expected.wgsl index edfc4af013..39d4815b53 100644 --- a/test/intrinsics/gen/ignore/509355.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/509355.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/509355.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; fn ignore_509355() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_509355(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_509355(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_509355(); } diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl b/test/intrinsics/gen/ignore/51aeb7.wgsl index becd6dd05b..1f986d2a68 100644 --- a/test/intrinsics/gen/ignore/51aeb7.wgsl +++ b/test/intrinsics/gen/ignore/51aeb7.wgsl @@ -28,18 +28,18 @@ fn ignore_51aeb7() { ignore(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_51aeb7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_51aeb7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_51aeb7(); } diff --git a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.wgsl index 8d35e83f3e..9ecccc7b42 100644 --- a/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/51aeb7.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn ignore_51aeb7() { ignore(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_51aeb7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_51aeb7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_51aeb7(); } diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl b/test/intrinsics/gen/ignore/5c9edf.wgsl index 74e071700e..e53a664577 100644 --- a/test/intrinsics/gen/ignore/5c9edf.wgsl +++ b/test/intrinsics/gen/ignore/5c9edf.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_external; +@group(1) @binding(0) var arg_0: texture_external; // fn ignore(texture_external) fn ignore_5c9edf() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_5c9edf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_5c9edf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_5c9edf(); } diff --git a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.wgsl index d078cac7c8..8249e9ab38 100644 --- a/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/5c9edf.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/5c9edf.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_external; +@group(1) @binding(0) var arg_0 : texture_external; fn ignore_5c9edf() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_5c9edf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_5c9edf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_5c9edf(); } diff --git a/test/intrinsics/gen/ignore/6698df.wgsl b/test/intrinsics/gen/ignore/6698df.wgsl index 1952b044da..b14856c6ce 100644 --- a/test/intrinsics/gen/ignore/6698df.wgsl +++ b/test/intrinsics/gen/ignore/6698df.wgsl @@ -28,18 +28,18 @@ fn ignore_6698df() { ignore(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_6698df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_6698df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_6698df(); } diff --git a/test/intrinsics/gen/ignore/6698df.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/6698df.wgsl.expected.wgsl index af3f6b5b91..17542767eb 100644 --- a/test/intrinsics/gen/ignore/6698df.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/6698df.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn ignore_6698df() { ignore(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_6698df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_6698df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_6698df(); } diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl b/test/intrinsics/gen/ignore/ad88be.wgsl index b957959730..3812ea10c9 100644 --- a/test/intrinsics/gen/ignore/ad88be.wgsl +++ b/test/intrinsics/gen/ignore/ad88be.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; // fn ignore(texture_depth_cube_array) fn ignore_ad88be() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_ad88be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_ad88be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_ad88be(); } diff --git a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.wgsl index a371726dc8..08fa4ead5c 100644 --- a/test/intrinsics/gen/ignore/ad88be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/ad88be.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/ad88be.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; fn ignore_ad88be() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_ad88be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_ad88be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_ad88be(); } diff --git a/test/intrinsics/gen/ignore/b469af.wgsl b/test/intrinsics/gen/ignore/b469af.wgsl index 581ebefa22..a640d8b871 100644 --- a/test/intrinsics/gen/ignore/b469af.wgsl +++ b/test/intrinsics/gen/ignore/b469af.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: sampler_comparison; +@group(1) @binding(0) var arg_0: sampler_comparison; // fn ignore(sampler_comparison) fn ignore_b469af() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_b469af(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_b469af(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_b469af(); } diff --git a/test/intrinsics/gen/ignore/b469af.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/b469af.wgsl.expected.wgsl index d2270a8583..0c42c5c4ed 100644 --- a/test/intrinsics/gen/ignore/b469af.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/b469af.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/b469af.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : sampler_comparison; +@group(1) @binding(0) var arg_0 : sampler_comparison; fn ignore_b469af() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_b469af(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_b469af(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_b469af(); } diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl b/test/intrinsics/gen/ignore/c8a0ee.wgsl index 747f59b4ad..773996bf9a 100644 --- a/test/intrinsics/gen/ignore/c8a0ee.wgsl +++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn ignore(texture_depth_2d_array) fn ignore_c8a0ee() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_c8a0ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_c8a0ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_c8a0ee(); } diff --git a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.wgsl index abb1ae98a1..6b3aa114cc 100644 --- a/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/c8a0ee.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/c8a0ee.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn ignore_c8a0ee() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_c8a0ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_c8a0ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_c8a0ee(); } diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl b/test/intrinsics/gen/ignore/d91a2f.wgsl index 22a8df522c..5bda0fbb97 100644 --- a/test/intrinsics/gen/ignore/d91a2f.wgsl +++ b/test/intrinsics/gen/ignore/d91a2f.wgsl @@ -28,18 +28,18 @@ fn ignore_d91a2f() { ignore(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_d91a2f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_d91a2f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_d91a2f(); } diff --git a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.wgsl index d1d3f3eaaf..b877665b8e 100644 --- a/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/d91a2f.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn ignore_d91a2f() { ignore(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_d91a2f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_d91a2f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_d91a2f(); } diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl b/test/intrinsics/gen/ignore/e0187b.wgsl index d62957cc26..0a7b36d913 100644 --- a/test/intrinsics/gen/ignore/e0187b.wgsl +++ b/test/intrinsics/gen/ignore/e0187b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; +@group(1) @binding(0) var arg_0: texture_depth_2d; // fn ignore(texture_depth_2d) fn ignore_e0187b() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_e0187b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_e0187b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_e0187b(); } diff --git a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.wgsl index aca8c1439a..0c3eb9d41f 100644 --- a/test/intrinsics/gen/ignore/e0187b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/e0187b.wgsl.expected.wgsl @@ -2,24 +2,24 @@ intrinsics/gen/ignore/e0187b.wgsl:29:3 warning: use of deprecated intrinsic ignore(arg_0); ^^^^^^ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; fn ignore_e0187b() { ignore(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_e0187b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_e0187b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_e0187b(); } diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl b/test/intrinsics/gen/ignore/f414a6.wgsl index 48b3a9bce7..a0323925bc 100644 --- a/test/intrinsics/gen/ignore/f414a6.wgsl +++ b/test/intrinsics/gen/ignore/f414a6.wgsl @@ -28,18 +28,18 @@ fn ignore_f414a6() { ignore(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_f414a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_f414a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_f414a6(); } diff --git a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.wgsl b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.wgsl index 389da667b5..bf60901c3c 100644 --- a/test/intrinsics/gen/ignore/f414a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ignore/f414a6.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn ignore_f414a6() { ignore(bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ignore_f414a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ignore_f414a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ignore_f414a6(); } diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl index 39e9b85f3e..f6160f1b66 100644 --- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl +++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl @@ -28,18 +28,18 @@ fn inverseSqrt_84407e() { var res: f32 = inverseSqrt(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_84407e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_84407e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_84407e(); } diff --git a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl index a8350fcb11..707e3174cc 100644 --- a/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/inverseSqrt/84407e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn inverseSqrt_84407e() { var res : f32 = inverseSqrt(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_84407e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_84407e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_84407e(); } diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl index 96b1555802..e94567ef4b 100644 --- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl +++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl @@ -28,18 +28,18 @@ fn inverseSqrt_8f2bd2() { var res: vec2 = inverseSqrt(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_8f2bd2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_8f2bd2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_8f2bd2(); } diff --git a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl index 303dfafac7..55540308f7 100644 --- a/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/inverseSqrt/8f2bd2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn inverseSqrt_8f2bd2() { var res : vec2 = inverseSqrt(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_8f2bd2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_8f2bd2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_8f2bd2(); } diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl index 1f24f0fb66..c189515017 100644 --- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl +++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl @@ -28,18 +28,18 @@ fn inverseSqrt_b197b1() { var res: vec3 = inverseSqrt(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_b197b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_b197b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_b197b1(); } diff --git a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl index 471c231cd6..dd8bd7161f 100644 --- a/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/inverseSqrt/b197b1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn inverseSqrt_b197b1() { var res : vec3 = inverseSqrt(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_b197b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_b197b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_b197b1(); } diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl index 0d3f7b0e47..20e13f29f4 100644 --- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl +++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl @@ -28,18 +28,18 @@ fn inverseSqrt_c22347() { var res: vec4 = inverseSqrt(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_c22347(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_c22347(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_c22347(); } diff --git a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl index 486a611ea3..cc9c1a9fb2 100644 --- a/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl +++ b/test/intrinsics/gen/inverseSqrt/c22347.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn inverseSqrt_c22347() { var res : vec4 = inverseSqrt(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { inverseSqrt_c22347(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { inverseSqrt_c22347(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { inverseSqrt_c22347(); } diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl b/test/intrinsics/gen/isFinite/34d32b.wgsl index ea71b3985c..20d8b328a9 100644 --- a/test/intrinsics/gen/isFinite/34d32b.wgsl +++ b/test/intrinsics/gen/isFinite/34d32b.wgsl @@ -28,18 +28,18 @@ fn isFinite_34d32b() { var res: vec2 = isFinite(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_34d32b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_34d32b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_34d32b(); } diff --git a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl index e4cfe3fef6..8b38ba94ba 100644 --- a/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isFinite/34d32b.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isFinite_34d32b() { var res : vec2 = isFinite(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_34d32b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_34d32b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_34d32b(); } diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl b/test/intrinsics/gen/isFinite/426f9f.wgsl index fd56d269a1..e43f7a6872 100644 --- a/test/intrinsics/gen/isFinite/426f9f.wgsl +++ b/test/intrinsics/gen/isFinite/426f9f.wgsl @@ -28,18 +28,18 @@ fn isFinite_426f9f() { var res: bool = isFinite(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_426f9f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_426f9f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_426f9f(); } diff --git a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl index a0d931c1bf..6dd95474f4 100644 --- a/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isFinite/426f9f.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isFinite_426f9f() { var res : bool = isFinite(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_426f9f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_426f9f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_426f9f(); } diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl index b5611daafb..24a52c0afb 100644 --- a/test/intrinsics/gen/isFinite/8a23ad.wgsl +++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl @@ -28,18 +28,18 @@ fn isFinite_8a23ad() { var res: vec3 = isFinite(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_8a23ad(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_8a23ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_8a23ad(); } diff --git a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl index 807cfde88a..6aa23a5ac9 100644 --- a/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isFinite/8a23ad.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isFinite_8a23ad() { var res : vec3 = isFinite(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_8a23ad(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_8a23ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_8a23ad(); } diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl b/test/intrinsics/gen/isFinite/f31987.wgsl index f7e6e54af3..0a3f631fab 100644 --- a/test/intrinsics/gen/isFinite/f31987.wgsl +++ b/test/intrinsics/gen/isFinite/f31987.wgsl @@ -28,18 +28,18 @@ fn isFinite_f31987() { var res: vec4 = isFinite(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_f31987(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_f31987(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_f31987(); } diff --git a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl index a1361e18e6..a5e86db6a5 100644 --- a/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isFinite/f31987.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isFinite_f31987() { var res : vec4 = isFinite(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isFinite_f31987(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isFinite_f31987(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isFinite_f31987(); } diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl b/test/intrinsics/gen/isInf/666f2a.wgsl index 7199b08400..7550d277cd 100644 --- a/test/intrinsics/gen/isInf/666f2a.wgsl +++ b/test/intrinsics/gen/isInf/666f2a.wgsl @@ -28,18 +28,18 @@ fn isInf_666f2a() { var res: vec3 = isInf(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_666f2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_666f2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_666f2a(); } diff --git a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl index e5076f5fb6..4fa25cbcf9 100644 --- a/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isInf/666f2a.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isInf_666f2a() { var res : vec3 = isInf(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_666f2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_666f2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_666f2a(); } diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl b/test/intrinsics/gen/isInf/7bd98f.wgsl index e178e40f01..eaea74dbac 100644 --- a/test/intrinsics/gen/isInf/7bd98f.wgsl +++ b/test/intrinsics/gen/isInf/7bd98f.wgsl @@ -28,18 +28,18 @@ fn isInf_7bd98f() { var res: bool = isInf(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_7bd98f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_7bd98f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_7bd98f(); } diff --git a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl index 281dc74a0b..82deb30f9c 100644 --- a/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isInf/7bd98f.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isInf_7bd98f() { var res : bool = isInf(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_7bd98f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_7bd98f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_7bd98f(); } diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl b/test/intrinsics/gen/isInf/7e81b5.wgsl index d6fc7d249e..0a967531a5 100644 --- a/test/intrinsics/gen/isInf/7e81b5.wgsl +++ b/test/intrinsics/gen/isInf/7e81b5.wgsl @@ -28,18 +28,18 @@ fn isInf_7e81b5() { var res: vec4 = isInf(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_7e81b5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_7e81b5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_7e81b5(); } diff --git a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl index 24b76afb4e..3fced5afc3 100644 --- a/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isInf/7e81b5.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isInf_7e81b5() { var res : vec4 = isInf(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_7e81b5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_7e81b5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_7e81b5(); } diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl b/test/intrinsics/gen/isInf/a46d6f.wgsl index 9919b5dddc..5841a4116e 100644 --- a/test/intrinsics/gen/isInf/a46d6f.wgsl +++ b/test/intrinsics/gen/isInf/a46d6f.wgsl @@ -28,18 +28,18 @@ fn isInf_a46d6f() { var res: vec2 = isInf(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_a46d6f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_a46d6f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_a46d6f(); } diff --git a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl index 26cac945aa..3fa68d912a 100644 --- a/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isInf/a46d6f.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isInf_a46d6f() { var res : vec2 = isInf(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isInf_a46d6f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isInf_a46d6f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isInf_a46d6f(); } diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl b/test/intrinsics/gen/isNan/1280ab.wgsl index 6601a115e7..fb5e25c983 100644 --- a/test/intrinsics/gen/isNan/1280ab.wgsl +++ b/test/intrinsics/gen/isNan/1280ab.wgsl @@ -28,18 +28,18 @@ fn isNan_1280ab() { var res: vec3 = isNan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_1280ab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_1280ab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_1280ab(); } diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl index c4fd0591bf..ec27bcdbf1 100644 --- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNan_1280ab() { var res : vec3 = isNan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_1280ab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_1280ab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_1280ab(); } diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl b/test/intrinsics/gen/isNan/4d280d.wgsl index 058d4251d3..330440dfd1 100644 --- a/test/intrinsics/gen/isNan/4d280d.wgsl +++ b/test/intrinsics/gen/isNan/4d280d.wgsl @@ -28,18 +28,18 @@ fn isNan_4d280d() { var res: vec4 = isNan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_4d280d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_4d280d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_4d280d(); } diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl index 097488c2c5..57ba354b47 100644 --- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNan_4d280d() { var res : vec4 = isNan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_4d280d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_4d280d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_4d280d(); } diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl b/test/intrinsics/gen/isNan/67ecd3.wgsl index 7237e054f4..9b082ec3af 100644 --- a/test/intrinsics/gen/isNan/67ecd3.wgsl +++ b/test/intrinsics/gen/isNan/67ecd3.wgsl @@ -28,18 +28,18 @@ fn isNan_67ecd3() { var res: vec2 = isNan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_67ecd3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_67ecd3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_67ecd3(); } diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl index 49b0c8adc4..2f9573dc72 100644 --- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNan_67ecd3() { var res : vec2 = isNan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_67ecd3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_67ecd3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_67ecd3(); } diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl b/test/intrinsics/gen/isNan/e4978e.wgsl index 8cf713019d..f28a7d143c 100644 --- a/test/intrinsics/gen/isNan/e4978e.wgsl +++ b/test/intrinsics/gen/isNan/e4978e.wgsl @@ -28,18 +28,18 @@ fn isNan_e4978e() { var res: bool = isNan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_e4978e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_e4978e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_e4978e(); } diff --git a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl index 12d2aa0b04..0e27431832 100644 --- a/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNan/e4978e.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNan_e4978e() { var res : bool = isNan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNan_e4978e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNan_e4978e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNan_e4978e(); } diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl b/test/intrinsics/gen/isNormal/863dcd.wgsl index ab0f294151..a814ddbd53 100644 --- a/test/intrinsics/gen/isNormal/863dcd.wgsl +++ b/test/intrinsics/gen/isNormal/863dcd.wgsl @@ -28,18 +28,18 @@ fn isNormal_863dcd() { var res: vec4 = isNormal(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_863dcd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_863dcd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_863dcd(); } diff --git a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl index d9ba4288da..79f02614e9 100644 --- a/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNormal/863dcd.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNormal_863dcd() { var res : vec4 = isNormal(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_863dcd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_863dcd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_863dcd(); } diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl index 5a67dee3e3..7113dcc2b4 100644 --- a/test/intrinsics/gen/isNormal/b00ab1.wgsl +++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl @@ -28,18 +28,18 @@ fn isNormal_b00ab1() { var res: vec2 = isNormal(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_b00ab1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_b00ab1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_b00ab1(); } diff --git a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl index b85bc1f5ad..c6b748c8b1 100644 --- a/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNormal/b00ab1.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNormal_b00ab1() { var res : vec2 = isNormal(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_b00ab1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_b00ab1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_b00ab1(); } diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl b/test/intrinsics/gen/isNormal/c286b7.wgsl index 2f870552df..b44cb1f370 100644 --- a/test/intrinsics/gen/isNormal/c286b7.wgsl +++ b/test/intrinsics/gen/isNormal/c286b7.wgsl @@ -28,18 +28,18 @@ fn isNormal_c286b7() { var res: vec3 = isNormal(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_c286b7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_c286b7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_c286b7(); } diff --git a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl index 4b36826717..ca46949e35 100644 --- a/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNormal/c286b7.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNormal_c286b7() { var res : vec3 = isNormal(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_c286b7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_c286b7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_c286b7(); } diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl b/test/intrinsics/gen/isNormal/c6e880.wgsl index d223b08c2a..a5d839055e 100644 --- a/test/intrinsics/gen/isNormal/c6e880.wgsl +++ b/test/intrinsics/gen/isNormal/c6e880.wgsl @@ -28,18 +28,18 @@ fn isNormal_c6e880() { var res: bool = isNormal(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_c6e880(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_c6e880(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_c6e880(); } diff --git a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl index 00613664fe..1dc6685813 100644 --- a/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl +++ b/test/intrinsics/gen/isNormal/c6e880.wgsl.expected.wgsl @@ -6,18 +6,18 @@ fn isNormal_c6e880() { var res : bool = isNormal(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { isNormal_c6e880(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { isNormal_c6e880(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { isNormal_c6e880(); } diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl b/test/intrinsics/gen/ldexp/a31cdc.wgsl index f5df9a3708..2994d5fad8 100644 --- a/test/intrinsics/gen/ldexp/a31cdc.wgsl +++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl @@ -28,18 +28,18 @@ fn ldexp_a31cdc() { var res: vec3 = ldexp(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_a31cdc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_a31cdc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_a31cdc(); } diff --git a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl index 975e921d01..357faa1b9a 100644 --- a/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ldexp/a31cdc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ldexp_a31cdc() { var res : vec3 = ldexp(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_a31cdc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_a31cdc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_a31cdc(); } diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl b/test/intrinsics/gen/ldexp/abd718.wgsl index 94ae023fa0..5fec17846b 100644 --- a/test/intrinsics/gen/ldexp/abd718.wgsl +++ b/test/intrinsics/gen/ldexp/abd718.wgsl @@ -28,18 +28,18 @@ fn ldexp_abd718() { var res: vec2 = ldexp(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_abd718(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_abd718(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_abd718(); } diff --git a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl index bbd48db8de..87314bfa6e 100644 --- a/test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ldexp/abd718.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ldexp_abd718() { var res : vec2 = ldexp(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_abd718(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_abd718(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_abd718(); } diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl b/test/intrinsics/gen/ldexp/cc9cde.wgsl index a2f0de9fae..9f4702e4af 100644 --- a/test/intrinsics/gen/ldexp/cc9cde.wgsl +++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl @@ -28,18 +28,18 @@ fn ldexp_cc9cde() { var res: vec4 = ldexp(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_cc9cde(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_cc9cde(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_cc9cde(); } diff --git a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl index b71f7fb1bf..c2fc1ae7f9 100644 --- a/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ldexp/cc9cde.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ldexp_cc9cde() { var res : vec4 = ldexp(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_cc9cde(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_cc9cde(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_cc9cde(); } diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl b/test/intrinsics/gen/ldexp/db8b49.wgsl index 9975cf42fa..f0f29a1792 100644 --- a/test/intrinsics/gen/ldexp/db8b49.wgsl +++ b/test/intrinsics/gen/ldexp/db8b49.wgsl @@ -28,18 +28,18 @@ fn ldexp_db8b49() { var res: f32 = ldexp(1.0, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_db8b49(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_db8b49(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_db8b49(); } diff --git a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl index 7c5e77d4cc..41f84f9800 100644 --- a/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl +++ b/test/intrinsics/gen/ldexp/db8b49.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn ldexp_db8b49() { var res : f32 = ldexp(1.0, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { ldexp_db8b49(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { ldexp_db8b49(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { ldexp_db8b49(); } diff --git a/test/intrinsics/gen/length/056071.wgsl b/test/intrinsics/gen/length/056071.wgsl index e9ada2cf32..46dfdfeaf1 100644 --- a/test/intrinsics/gen/length/056071.wgsl +++ b/test/intrinsics/gen/length/056071.wgsl @@ -28,18 +28,18 @@ fn length_056071() { var res: f32 = length(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_056071(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_056071(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_056071(); } diff --git a/test/intrinsics/gen/length/056071.wgsl.expected.wgsl b/test/intrinsics/gen/length/056071.wgsl.expected.wgsl index 7487a7a415..a7dddf99b0 100644 --- a/test/intrinsics/gen/length/056071.wgsl.expected.wgsl +++ b/test/intrinsics/gen/length/056071.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn length_056071() { var res : f32 = length(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_056071(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_056071(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_056071(); } diff --git a/test/intrinsics/gen/length/602a17.wgsl b/test/intrinsics/gen/length/602a17.wgsl index e39f84ee3f..4458a540a9 100644 --- a/test/intrinsics/gen/length/602a17.wgsl +++ b/test/intrinsics/gen/length/602a17.wgsl @@ -28,18 +28,18 @@ fn length_602a17() { var res: f32 = length(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_602a17(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_602a17(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_602a17(); } diff --git a/test/intrinsics/gen/length/602a17.wgsl.expected.wgsl b/test/intrinsics/gen/length/602a17.wgsl.expected.wgsl index b00a0e10cc..dbf073b7ea 100644 --- a/test/intrinsics/gen/length/602a17.wgsl.expected.wgsl +++ b/test/intrinsics/gen/length/602a17.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn length_602a17() { var res : f32 = length(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_602a17(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_602a17(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_602a17(); } diff --git a/test/intrinsics/gen/length/afde8b.wgsl b/test/intrinsics/gen/length/afde8b.wgsl index d66503f447..0e7faf2d4b 100644 --- a/test/intrinsics/gen/length/afde8b.wgsl +++ b/test/intrinsics/gen/length/afde8b.wgsl @@ -28,18 +28,18 @@ fn length_afde8b() { var res: f32 = length(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_afde8b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_afde8b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_afde8b(); } diff --git a/test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl b/test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl index 7bc1249497..04d7497f02 100644 --- a/test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/length/afde8b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn length_afde8b() { var res : f32 = length(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_afde8b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_afde8b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_afde8b(); } diff --git a/test/intrinsics/gen/length/becebf.wgsl b/test/intrinsics/gen/length/becebf.wgsl index 5682959bae..5029412f16 100644 --- a/test/intrinsics/gen/length/becebf.wgsl +++ b/test/intrinsics/gen/length/becebf.wgsl @@ -28,18 +28,18 @@ fn length_becebf() { var res: f32 = length(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_becebf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_becebf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_becebf(); } diff --git a/test/intrinsics/gen/length/becebf.wgsl.expected.wgsl b/test/intrinsics/gen/length/becebf.wgsl.expected.wgsl index 2dfa36f6eb..2a90f076c0 100644 --- a/test/intrinsics/gen/length/becebf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/length/becebf.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn length_becebf() { var res : f32 = length(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { length_becebf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { length_becebf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { length_becebf(); } diff --git a/test/intrinsics/gen/log/3da25a.wgsl b/test/intrinsics/gen/log/3da25a.wgsl index 785a7f4167..12e9fe34aa 100644 --- a/test/intrinsics/gen/log/3da25a.wgsl +++ b/test/intrinsics/gen/log/3da25a.wgsl @@ -28,18 +28,18 @@ fn log_3da25a() { var res: vec4 = log(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_3da25a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_3da25a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_3da25a(); } diff --git a/test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl b/test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl index fd72a7e861..2265445957 100644 --- a/test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log/3da25a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log_3da25a() { var res : vec4 = log(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_3da25a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_3da25a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_3da25a(); } diff --git a/test/intrinsics/gen/log/7114a6.wgsl b/test/intrinsics/gen/log/7114a6.wgsl index 3d163574d2..0332f5b484 100644 --- a/test/intrinsics/gen/log/7114a6.wgsl +++ b/test/intrinsics/gen/log/7114a6.wgsl @@ -28,18 +28,18 @@ fn log_7114a6() { var res: f32 = log(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_7114a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_7114a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_7114a6(); } diff --git a/test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl b/test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl index 9e282b4975..6a688f0dcd 100644 --- a/test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log/7114a6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log_7114a6() { var res : f32 = log(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_7114a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_7114a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_7114a6(); } diff --git a/test/intrinsics/gen/log/b2ce28.wgsl b/test/intrinsics/gen/log/b2ce28.wgsl index a30272926f..be0a07bea1 100644 --- a/test/intrinsics/gen/log/b2ce28.wgsl +++ b/test/intrinsics/gen/log/b2ce28.wgsl @@ -28,18 +28,18 @@ fn log_b2ce28() { var res: vec2 = log(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_b2ce28(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_b2ce28(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_b2ce28(); } diff --git a/test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl b/test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl index 1167e0a4c3..023eb1b45b 100644 --- a/test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log/b2ce28.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log_b2ce28() { var res : vec2 = log(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_b2ce28(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_b2ce28(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_b2ce28(); } diff --git a/test/intrinsics/gen/log/f4c570.wgsl b/test/intrinsics/gen/log/f4c570.wgsl index 513e9004ac..e705146812 100644 --- a/test/intrinsics/gen/log/f4c570.wgsl +++ b/test/intrinsics/gen/log/f4c570.wgsl @@ -28,18 +28,18 @@ fn log_f4c570() { var res: vec3 = log(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_f4c570(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_f4c570(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_f4c570(); } diff --git a/test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl b/test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl index 01cb9100d9..9317aad7c3 100644 --- a/test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log/f4c570.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log_f4c570() { var res : vec3 = log(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log_f4c570(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log_f4c570(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log_f4c570(); } diff --git a/test/intrinsics/gen/log2/4036ed.wgsl b/test/intrinsics/gen/log2/4036ed.wgsl index b9e6cda410..0932fb4dfd 100644 --- a/test/intrinsics/gen/log2/4036ed.wgsl +++ b/test/intrinsics/gen/log2/4036ed.wgsl @@ -28,18 +28,18 @@ fn log2_4036ed() { var res: f32 = log2(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_4036ed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_4036ed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_4036ed(); } diff --git a/test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl b/test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl index ab03ce15e8..e64775f525 100644 --- a/test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log2/4036ed.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log2_4036ed() { var res : f32 = log2(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_4036ed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_4036ed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_4036ed(); } diff --git a/test/intrinsics/gen/log2/902988.wgsl b/test/intrinsics/gen/log2/902988.wgsl index 8d01023f38..83325a292b 100644 --- a/test/intrinsics/gen/log2/902988.wgsl +++ b/test/intrinsics/gen/log2/902988.wgsl @@ -28,18 +28,18 @@ fn log2_902988() { var res: vec4 = log2(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_902988(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_902988(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_902988(); } diff --git a/test/intrinsics/gen/log2/902988.wgsl.expected.wgsl b/test/intrinsics/gen/log2/902988.wgsl.expected.wgsl index 9d4277b21e..345da9e439 100644 --- a/test/intrinsics/gen/log2/902988.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log2/902988.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log2_902988() { var res : vec4 = log2(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_902988(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_902988(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_902988(); } diff --git a/test/intrinsics/gen/log2/adb233.wgsl b/test/intrinsics/gen/log2/adb233.wgsl index 32706896a0..f231a4a114 100644 --- a/test/intrinsics/gen/log2/adb233.wgsl +++ b/test/intrinsics/gen/log2/adb233.wgsl @@ -28,18 +28,18 @@ fn log2_adb233() { var res: vec3 = log2(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_adb233(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_adb233(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_adb233(); } diff --git a/test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl b/test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl index e41ac202d9..89634c272c 100644 --- a/test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log2/adb233.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log2_adb233() { var res : vec3 = log2(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_adb233(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_adb233(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_adb233(); } diff --git a/test/intrinsics/gen/log2/aea659.wgsl b/test/intrinsics/gen/log2/aea659.wgsl index 3700f20b87..d87451184b 100644 --- a/test/intrinsics/gen/log2/aea659.wgsl +++ b/test/intrinsics/gen/log2/aea659.wgsl @@ -28,18 +28,18 @@ fn log2_aea659() { var res: vec2 = log2(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_aea659(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_aea659(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_aea659(); } diff --git a/test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl b/test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl index aa490ddad6..a77648e8ed 100644 --- a/test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl +++ b/test/intrinsics/gen/log2/aea659.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn log2_aea659() { var res : vec2 = log2(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { log2_aea659(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { log2_aea659(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { log2_aea659(); } diff --git a/test/intrinsics/gen/max/0c0aae.wgsl b/test/intrinsics/gen/max/0c0aae.wgsl index 97008387ab..1dcd5e80ca 100644 --- a/test/intrinsics/gen/max/0c0aae.wgsl +++ b/test/intrinsics/gen/max/0c0aae.wgsl @@ -28,18 +28,18 @@ fn max_0c0aae() { var res: u32 = max(1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_0c0aae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_0c0aae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_0c0aae(); } diff --git a/test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl b/test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl index b463469148..a34b9ff497 100644 --- a/test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/0c0aae.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_0c0aae() { var res : u32 = max(1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_0c0aae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_0c0aae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_0c0aae(); } diff --git a/test/intrinsics/gen/max/25eafe.wgsl b/test/intrinsics/gen/max/25eafe.wgsl index 4940f1ff15..238cba1f28 100644 --- a/test/intrinsics/gen/max/25eafe.wgsl +++ b/test/intrinsics/gen/max/25eafe.wgsl @@ -28,18 +28,18 @@ fn max_25eafe() { var res: vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_25eafe(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_25eafe(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_25eafe(); } diff --git a/test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl b/test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl index 55e740b957..7b9f06a8c2 100644 --- a/test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/25eafe.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_25eafe() { var res : vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_25eafe(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_25eafe(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_25eafe(); } diff --git a/test/intrinsics/gen/max/320815.wgsl b/test/intrinsics/gen/max/320815.wgsl index 1bf7867874..e4b11d1b36 100644 --- a/test/intrinsics/gen/max/320815.wgsl +++ b/test/intrinsics/gen/max/320815.wgsl @@ -28,18 +28,18 @@ fn max_320815() { var res: vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_320815(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_320815(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_320815(); } diff --git a/test/intrinsics/gen/max/320815.wgsl.expected.wgsl b/test/intrinsics/gen/max/320815.wgsl.expected.wgsl index 16d126ffa0..04e54a0fa5 100644 --- a/test/intrinsics/gen/max/320815.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/320815.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_320815() { var res : vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_320815(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_320815(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_320815(); } diff --git a/test/intrinsics/gen/max/44a39d.wgsl b/test/intrinsics/gen/max/44a39d.wgsl index 039fe2f7e0..9af6704e5e 100644 --- a/test/intrinsics/gen/max/44a39d.wgsl +++ b/test/intrinsics/gen/max/44a39d.wgsl @@ -28,18 +28,18 @@ fn max_44a39d() { var res: f32 = max(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_44a39d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_44a39d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_44a39d(); } diff --git a/test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl b/test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl index d39969c2e2..1913b8fd03 100644 --- a/test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/44a39d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_44a39d() { var res : f32 = max(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_44a39d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_44a39d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_44a39d(); } diff --git a/test/intrinsics/gen/max/453e04.wgsl b/test/intrinsics/gen/max/453e04.wgsl index 14eab28ed7..b3813d96a4 100644 --- a/test/intrinsics/gen/max/453e04.wgsl +++ b/test/intrinsics/gen/max/453e04.wgsl @@ -28,18 +28,18 @@ fn max_453e04() { var res: vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_453e04(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_453e04(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_453e04(); } diff --git a/test/intrinsics/gen/max/453e04.wgsl.expected.wgsl b/test/intrinsics/gen/max/453e04.wgsl.expected.wgsl index ba0921f92e..39e7e48679 100644 --- a/test/intrinsics/gen/max/453e04.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/453e04.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_453e04() { var res : vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_453e04(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_453e04(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_453e04(); } diff --git a/test/intrinsics/gen/max/462050.wgsl b/test/intrinsics/gen/max/462050.wgsl index b6bc2da659..03523b97ad 100644 --- a/test/intrinsics/gen/max/462050.wgsl +++ b/test/intrinsics/gen/max/462050.wgsl @@ -28,18 +28,18 @@ fn max_462050() { var res: vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_462050(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_462050(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_462050(); } diff --git a/test/intrinsics/gen/max/462050.wgsl.expected.wgsl b/test/intrinsics/gen/max/462050.wgsl.expected.wgsl index f0f482f698..eec4107b03 100644 --- a/test/intrinsics/gen/max/462050.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/462050.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_462050() { var res : vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_462050(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_462050(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_462050(); } diff --git a/test/intrinsics/gen/max/4883ac.wgsl b/test/intrinsics/gen/max/4883ac.wgsl index 607e45e4e2..a0244ea1b5 100644 --- a/test/intrinsics/gen/max/4883ac.wgsl +++ b/test/intrinsics/gen/max/4883ac.wgsl @@ -28,18 +28,18 @@ fn max_4883ac() { var res: vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_4883ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_4883ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_4883ac(); } diff --git a/test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl b/test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl index 4f4feab7d6..cc37098330 100644 --- a/test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/4883ac.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_4883ac() { var res : vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_4883ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_4883ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_4883ac(); } diff --git a/test/intrinsics/gen/max/85e6bc.wgsl b/test/intrinsics/gen/max/85e6bc.wgsl index ff478acbde..5e8f666afc 100644 --- a/test/intrinsics/gen/max/85e6bc.wgsl +++ b/test/intrinsics/gen/max/85e6bc.wgsl @@ -28,18 +28,18 @@ fn max_85e6bc() { var res: vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_85e6bc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_85e6bc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_85e6bc(); } diff --git a/test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl b/test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl index b3d937145b..6f6b39f35a 100644 --- a/test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/85e6bc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_85e6bc() { var res : vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_85e6bc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_85e6bc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_85e6bc(); } diff --git a/test/intrinsics/gen/max/a93419.wgsl b/test/intrinsics/gen/max/a93419.wgsl index 60e7ee6a9e..4dc296afb3 100644 --- a/test/intrinsics/gen/max/a93419.wgsl +++ b/test/intrinsics/gen/max/a93419.wgsl @@ -28,18 +28,18 @@ fn max_a93419() { var res: vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_a93419(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_a93419(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_a93419(); } diff --git a/test/intrinsics/gen/max/a93419.wgsl.expected.wgsl b/test/intrinsics/gen/max/a93419.wgsl.expected.wgsl index 9e0642149c..8c1c938493 100644 --- a/test/intrinsics/gen/max/a93419.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/a93419.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_a93419() { var res : vec4 = max(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_a93419(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_a93419(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_a93419(); } diff --git a/test/intrinsics/gen/max/b1b73a.wgsl b/test/intrinsics/gen/max/b1b73a.wgsl index a05dd2a508..17a9808ce4 100644 --- a/test/intrinsics/gen/max/b1b73a.wgsl +++ b/test/intrinsics/gen/max/b1b73a.wgsl @@ -28,18 +28,18 @@ fn max_b1b73a() { var res: vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_b1b73a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_b1b73a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_b1b73a(); } diff --git a/test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl b/test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl index 57ebf45921..ffe0dc5d69 100644 --- a/test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/b1b73a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_b1b73a() { var res : vec3 = max(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_b1b73a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_b1b73a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_b1b73a(); } diff --git a/test/intrinsics/gen/max/ce7c30.wgsl b/test/intrinsics/gen/max/ce7c30.wgsl index 109638ed86..167bd6c915 100644 --- a/test/intrinsics/gen/max/ce7c30.wgsl +++ b/test/intrinsics/gen/max/ce7c30.wgsl @@ -28,18 +28,18 @@ fn max_ce7c30() { var res: i32 = max(1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_ce7c30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_ce7c30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_ce7c30(); } diff --git a/test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl b/test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl index 62b914273a..a9c3618a5a 100644 --- a/test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/ce7c30.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_ce7c30() { var res : i32 = max(1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_ce7c30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_ce7c30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_ce7c30(); } diff --git a/test/intrinsics/gen/max/e8192f.wgsl b/test/intrinsics/gen/max/e8192f.wgsl index 5f81944629..3691990882 100644 --- a/test/intrinsics/gen/max/e8192f.wgsl +++ b/test/intrinsics/gen/max/e8192f.wgsl @@ -28,18 +28,18 @@ fn max_e8192f() { var res: vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_e8192f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_e8192f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_e8192f(); } diff --git a/test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl b/test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl index a0f6b1ba42..08d02f6b9f 100644 --- a/test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/max/e8192f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn max_e8192f() { var res : vec2 = max(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { max_e8192f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { max_e8192f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { max_e8192f(); } diff --git a/test/intrinsics/gen/min/03c7e3.wgsl b/test/intrinsics/gen/min/03c7e3.wgsl index 266a4e7963..ed5cb3d8e4 100644 --- a/test/intrinsics/gen/min/03c7e3.wgsl +++ b/test/intrinsics/gen/min/03c7e3.wgsl @@ -28,18 +28,18 @@ fn min_03c7e3() { var res: vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_03c7e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_03c7e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_03c7e3(); } diff --git a/test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl b/test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl index d1d1273496..8c0cc9355a 100644 --- a/test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/03c7e3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_03c7e3() { var res : vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_03c7e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_03c7e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_03c7e3(); } diff --git a/test/intrinsics/gen/min/0dc614.wgsl b/test/intrinsics/gen/min/0dc614.wgsl index 4834aef88c..976011ec94 100644 --- a/test/intrinsics/gen/min/0dc614.wgsl +++ b/test/intrinsics/gen/min/0dc614.wgsl @@ -28,18 +28,18 @@ fn min_0dc614() { var res: vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_0dc614(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_0dc614(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_0dc614(); } diff --git a/test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl b/test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl index a9ddda4e00..983327093a 100644 --- a/test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/0dc614.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_0dc614() { var res : vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_0dc614(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_0dc614(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_0dc614(); } diff --git a/test/intrinsics/gen/min/3941e1.wgsl b/test/intrinsics/gen/min/3941e1.wgsl index 3583504746..b45498fbc8 100644 --- a/test/intrinsics/gen/min/3941e1.wgsl +++ b/test/intrinsics/gen/min/3941e1.wgsl @@ -28,18 +28,18 @@ fn min_3941e1() { var res: vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_3941e1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_3941e1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_3941e1(); } diff --git a/test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl b/test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl index 8ea9508936..19dd5ee653 100644 --- a/test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/3941e1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_3941e1() { var res : vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_3941e1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_3941e1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_3941e1(); } diff --git a/test/intrinsics/gen/min/46c5d3.wgsl b/test/intrinsics/gen/min/46c5d3.wgsl index 764435e1ff..b3d871093e 100644 --- a/test/intrinsics/gen/min/46c5d3.wgsl +++ b/test/intrinsics/gen/min/46c5d3.wgsl @@ -28,18 +28,18 @@ fn min_46c5d3() { var res: u32 = min(1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_46c5d3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_46c5d3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_46c5d3(); } diff --git a/test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl b/test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl index 18b23e5199..2beab9a8bf 100644 --- a/test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/46c5d3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_46c5d3() { var res : u32 = min(1u, 1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_46c5d3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_46c5d3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_46c5d3(); } diff --git a/test/intrinsics/gen/min/82b28f.wgsl b/test/intrinsics/gen/min/82b28f.wgsl index 37011d3f01..01dfafdffc 100644 --- a/test/intrinsics/gen/min/82b28f.wgsl +++ b/test/intrinsics/gen/min/82b28f.wgsl @@ -28,18 +28,18 @@ fn min_82b28f() { var res: vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_82b28f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_82b28f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_82b28f(); } diff --git a/test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl b/test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl index 7ba2e80954..a942532bc2 100644 --- a/test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/82b28f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_82b28f() { var res : vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_82b28f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_82b28f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_82b28f(); } diff --git a/test/intrinsics/gen/min/93cfc4.wgsl b/test/intrinsics/gen/min/93cfc4.wgsl index 88c9a51298..91bc5af640 100644 --- a/test/intrinsics/gen/min/93cfc4.wgsl +++ b/test/intrinsics/gen/min/93cfc4.wgsl @@ -28,18 +28,18 @@ fn min_93cfc4() { var res: vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_93cfc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_93cfc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_93cfc4(); } diff --git a/test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl b/test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl index 0b0cacd890..c66aae09fc 100644 --- a/test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/93cfc4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_93cfc4() { var res : vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_93cfc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_93cfc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_93cfc4(); } diff --git a/test/intrinsics/gen/min/a45171.wgsl b/test/intrinsics/gen/min/a45171.wgsl index 68aae1787a..01b49b44c4 100644 --- a/test/intrinsics/gen/min/a45171.wgsl +++ b/test/intrinsics/gen/min/a45171.wgsl @@ -28,18 +28,18 @@ fn min_a45171() { var res: vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_a45171(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_a45171(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_a45171(); } diff --git a/test/intrinsics/gen/min/a45171.wgsl.expected.wgsl b/test/intrinsics/gen/min/a45171.wgsl.expected.wgsl index aca606531e..ade6f575c5 100644 --- a/test/intrinsics/gen/min/a45171.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/a45171.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_a45171() { var res : vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_a45171(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_a45171(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_a45171(); } diff --git a/test/intrinsics/gen/min/aa28ad.wgsl b/test/intrinsics/gen/min/aa28ad.wgsl index c197dbf61d..cd9775f98e 100644 --- a/test/intrinsics/gen/min/aa28ad.wgsl +++ b/test/intrinsics/gen/min/aa28ad.wgsl @@ -28,18 +28,18 @@ fn min_aa28ad() { var res: vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_aa28ad(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_aa28ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_aa28ad(); } diff --git a/test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl b/test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl index 63f7e84677..0830734705 100644 --- a/test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/aa28ad.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_aa28ad() { var res : vec2 = min(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_aa28ad(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_aa28ad(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_aa28ad(); } diff --git a/test/intrinsics/gen/min/af326d.wgsl b/test/intrinsics/gen/min/af326d.wgsl index 55c9f806ab..0a1cde9d6f 100644 --- a/test/intrinsics/gen/min/af326d.wgsl +++ b/test/intrinsics/gen/min/af326d.wgsl @@ -28,18 +28,18 @@ fn min_af326d() { var res: f32 = min(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_af326d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_af326d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_af326d(); } diff --git a/test/intrinsics/gen/min/af326d.wgsl.expected.wgsl b/test/intrinsics/gen/min/af326d.wgsl.expected.wgsl index a5bc8f32a1..c0500c38b6 100644 --- a/test/intrinsics/gen/min/af326d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/af326d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_af326d() { var res : f32 = min(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_af326d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_af326d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_af326d(); } diff --git a/test/intrinsics/gen/min/c70bb7.wgsl b/test/intrinsics/gen/min/c70bb7.wgsl index 15bf278a39..20d33ea845 100644 --- a/test/intrinsics/gen/min/c70bb7.wgsl +++ b/test/intrinsics/gen/min/c70bb7.wgsl @@ -28,18 +28,18 @@ fn min_c70bb7() { var res: vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c70bb7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c70bb7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c70bb7(); } diff --git a/test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl b/test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl index 642b600b4e..d113cdb1d7 100644 --- a/test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/c70bb7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_c70bb7() { var res : vec3 = min(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c70bb7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c70bb7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c70bb7(); } diff --git a/test/intrinsics/gen/min/c73147.wgsl b/test/intrinsics/gen/min/c73147.wgsl index 6bf3b77c8f..25b6ce253f 100644 --- a/test/intrinsics/gen/min/c73147.wgsl +++ b/test/intrinsics/gen/min/c73147.wgsl @@ -28,18 +28,18 @@ fn min_c73147() { var res: i32 = min(1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c73147(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c73147(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c73147(); } diff --git a/test/intrinsics/gen/min/c73147.wgsl.expected.wgsl b/test/intrinsics/gen/min/c73147.wgsl.expected.wgsl index 220e922659..3221e2ea57 100644 --- a/test/intrinsics/gen/min/c73147.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/c73147.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_c73147() { var res : i32 = min(1, 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c73147(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c73147(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c73147(); } diff --git a/test/intrinsics/gen/min/c76fa6.wgsl b/test/intrinsics/gen/min/c76fa6.wgsl index b8ab82c0ae..367f8f5d46 100644 --- a/test/intrinsics/gen/min/c76fa6.wgsl +++ b/test/intrinsics/gen/min/c76fa6.wgsl @@ -28,18 +28,18 @@ fn min_c76fa6() { var res: vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c76fa6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c76fa6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c76fa6(); } diff --git a/test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl b/test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl index 460fcc82ec..3a01a8886a 100644 --- a/test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/min/c76fa6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn min_c76fa6() { var res : vec4 = min(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { min_c76fa6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { min_c76fa6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { min_c76fa6(); } diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl b/test/intrinsics/gen/mix/0c8c33.wgsl index 001d31d243..c2ba55d2d1 100644 --- a/test/intrinsics/gen/mix/0c8c33.wgsl +++ b/test/intrinsics/gen/mix/0c8c33.wgsl @@ -28,18 +28,18 @@ fn mix_0c8c33() { var res: vec3 = mix(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_0c8c33(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_0c8c33(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_0c8c33(); } diff --git a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl index 26b1f2e8de..d76f3e3d29 100644 --- a/test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/0c8c33.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_0c8c33() { var res : vec3 = mix(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_0c8c33(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_0c8c33(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_0c8c33(); } diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl b/test/intrinsics/gen/mix/1faeb1.wgsl index 4d436094dc..948163bb75 100644 --- a/test/intrinsics/gen/mix/1faeb1.wgsl +++ b/test/intrinsics/gen/mix/1faeb1.wgsl @@ -28,18 +28,18 @@ fn mix_1faeb1() { var res: vec4 = mix(vec4(), vec4(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_1faeb1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_1faeb1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_1faeb1(); } diff --git a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl index 81537b5253..ffeab6ad15 100644 --- a/test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/1faeb1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_1faeb1() { var res : vec4 = mix(vec4(), vec4(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_1faeb1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_1faeb1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_1faeb1(); } diff --git a/test/intrinsics/gen/mix/2fadab.wgsl b/test/intrinsics/gen/mix/2fadab.wgsl index e20610b114..94551f9519 100644 --- a/test/intrinsics/gen/mix/2fadab.wgsl +++ b/test/intrinsics/gen/mix/2fadab.wgsl @@ -28,18 +28,18 @@ fn mix_2fadab() { var res: vec2 = mix(vec2(), vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_2fadab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_2fadab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_2fadab(); } diff --git a/test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl b/test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl index bcf0f91ae6..d084ab68bf 100644 --- a/test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/2fadab.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_2fadab() { var res : vec2 = mix(vec2(), vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_2fadab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_2fadab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_2fadab(); } diff --git a/test/intrinsics/gen/mix/315264.wgsl b/test/intrinsics/gen/mix/315264.wgsl index 3ccb009fba..3c8a0509a3 100644 --- a/test/intrinsics/gen/mix/315264.wgsl +++ b/test/intrinsics/gen/mix/315264.wgsl @@ -28,18 +28,18 @@ fn mix_315264() { var res: vec3 = mix(vec3(), vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_315264(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_315264(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_315264(); } diff --git a/test/intrinsics/gen/mix/315264.wgsl.expected.wgsl b/test/intrinsics/gen/mix/315264.wgsl.expected.wgsl index a8704236ee..40fae02cce 100644 --- a/test/intrinsics/gen/mix/315264.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/315264.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_315264() { var res : vec3 = mix(vec3(), vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_315264(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_315264(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_315264(); } diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl b/test/intrinsics/gen/mix/4f0b5e.wgsl index fd14e33bd6..327cd1fc3b 100644 --- a/test/intrinsics/gen/mix/4f0b5e.wgsl +++ b/test/intrinsics/gen/mix/4f0b5e.wgsl @@ -28,18 +28,18 @@ fn mix_4f0b5e() { var res: f32 = mix(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_4f0b5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_4f0b5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_4f0b5e(); } diff --git a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl index 7eb76de5cf..67679c4963 100644 --- a/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/4f0b5e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_4f0b5e() { var res : f32 = mix(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_4f0b5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_4f0b5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_4f0b5e(); } diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl b/test/intrinsics/gen/mix/6f8adc.wgsl index 577a0e9f14..ed6872f642 100644 --- a/test/intrinsics/gen/mix/6f8adc.wgsl +++ b/test/intrinsics/gen/mix/6f8adc.wgsl @@ -28,18 +28,18 @@ fn mix_6f8adc() { var res: vec2 = mix(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_6f8adc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_6f8adc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_6f8adc(); } diff --git a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl index ccb03a4475..2bd55cc18e 100644 --- a/test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/6f8adc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_6f8adc() { var res : vec2 = mix(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_6f8adc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_6f8adc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_6f8adc(); } diff --git a/test/intrinsics/gen/mix/c37ede.wgsl b/test/intrinsics/gen/mix/c37ede.wgsl index a66000cc55..59185cf2fd 100644 --- a/test/intrinsics/gen/mix/c37ede.wgsl +++ b/test/intrinsics/gen/mix/c37ede.wgsl @@ -28,18 +28,18 @@ fn mix_c37ede() { var res: vec4 = mix(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_c37ede(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_c37ede(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_c37ede(); } diff --git a/test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl b/test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl index b77b7b7cf9..4d3d087cf6 100644 --- a/test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl +++ b/test/intrinsics/gen/mix/c37ede.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn mix_c37ede() { var res : vec4 = mix(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { mix_c37ede(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { mix_c37ede(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { mix_c37ede(); } diff --git a/test/intrinsics/gen/modf/180fed.wgsl b/test/intrinsics/gen/modf/180fed.wgsl index a819d16e92..c9ad6609e3 100644 --- a/test/intrinsics/gen/modf/180fed.wgsl +++ b/test/intrinsics/gen/modf/180fed.wgsl @@ -28,18 +28,18 @@ fn modf_180fed() { var res = modf(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_180fed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_180fed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_180fed(); } diff --git a/test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl b/test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl index 5bd93a7f48..3865c224a5 100644 --- a/test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl +++ b/test/intrinsics/gen/modf/180fed.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn modf_180fed() { var res = modf(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_180fed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_180fed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_180fed(); } diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl b/test/intrinsics/gen/modf/9b75f7.wgsl index 1f340bce25..982a75c658 100644 --- a/test/intrinsics/gen/modf/9b75f7.wgsl +++ b/test/intrinsics/gen/modf/9b75f7.wgsl @@ -28,18 +28,18 @@ fn modf_9b75f7() { var res = modf(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_9b75f7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_9b75f7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_9b75f7(); } diff --git a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl b/test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl index 3b39732f2f..90eaf3a104 100644 --- a/test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/modf/9b75f7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn modf_9b75f7() { var res = modf(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_9b75f7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_9b75f7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_9b75f7(); } diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl b/test/intrinsics/gen/modf/ec2dbc.wgsl index 7483d40c97..8de77ad972 100644 --- a/test/intrinsics/gen/modf/ec2dbc.wgsl +++ b/test/intrinsics/gen/modf/ec2dbc.wgsl @@ -28,18 +28,18 @@ fn modf_ec2dbc() { var res = modf(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_ec2dbc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_ec2dbc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_ec2dbc(); } diff --git a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl b/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl index 22848f0c28..6c3380d286 100644 --- a/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn modf_ec2dbc() { var res = modf(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_ec2dbc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_ec2dbc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_ec2dbc(); } diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl b/test/intrinsics/gen/modf/f5f20d.wgsl index 4088e0693e..0a0dcf562d 100644 --- a/test/intrinsics/gen/modf/f5f20d.wgsl +++ b/test/intrinsics/gen/modf/f5f20d.wgsl @@ -28,18 +28,18 @@ fn modf_f5f20d() { var res = modf(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_f5f20d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_f5f20d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_f5f20d(); } diff --git a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl b/test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl index ad5bd3d5ad..8dea55c304 100644 --- a/test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/modf/f5f20d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn modf_f5f20d() { var res = modf(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { modf_f5f20d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { modf_f5f20d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { modf_f5f20d(); } diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl b/test/intrinsics/gen/normalize/64d8c0.wgsl index 1f77f33be2..2109b6137a 100644 --- a/test/intrinsics/gen/normalize/64d8c0.wgsl +++ b/test/intrinsics/gen/normalize/64d8c0.wgsl @@ -28,18 +28,18 @@ fn normalize_64d8c0() { var res: vec3 = normalize(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_64d8c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_64d8c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_64d8c0(); } diff --git a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl index 0ea9deffdd..57444c8fc6 100644 --- a/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/normalize/64d8c0.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn normalize_64d8c0() { var res : vec3 = normalize(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_64d8c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_64d8c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_64d8c0(); } diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl b/test/intrinsics/gen/normalize/9a0aab.wgsl index 8786048cc7..12bf4ac8e1 100644 --- a/test/intrinsics/gen/normalize/9a0aab.wgsl +++ b/test/intrinsics/gen/normalize/9a0aab.wgsl @@ -28,18 +28,18 @@ fn normalize_9a0aab() { var res: vec4 = normalize(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_9a0aab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_9a0aab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_9a0aab(); } diff --git a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl index 77bca7fb4f..1b3e0195dd 100644 --- a/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl +++ b/test/intrinsics/gen/normalize/9a0aab.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn normalize_9a0aab() { var res : vec4 = normalize(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_9a0aab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_9a0aab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_9a0aab(); } diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl b/test/intrinsics/gen/normalize/fc2ef1.wgsl index 2c418201af..0c11b89e9e 100644 --- a/test/intrinsics/gen/normalize/fc2ef1.wgsl +++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl @@ -28,18 +28,18 @@ fn normalize_fc2ef1() { var res: vec2 = normalize(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_fc2ef1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_fc2ef1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_fc2ef1(); } diff --git a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl index 5dfa161adf..b92ea5f711 100644 --- a/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/normalize/fc2ef1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn normalize_fc2ef1() { var res : vec2 = normalize(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { normalize_fc2ef1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { normalize_fc2ef1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { normalize_fc2ef1(); } diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl index b46c8bc15c..ae2610c742 100644 --- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl +++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl @@ -28,18 +28,18 @@ fn pack2x16float_0e97b3() { var res: u32 = pack2x16float(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16float_0e97b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16float_0e97b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16float_0e97b3(); } diff --git a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl index 6dfa69ada3..714304fa1e 100644 --- a/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pack2x16float/0e97b3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pack2x16float_0e97b3() { var res : u32 = pack2x16float(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16float_0e97b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16float_0e97b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16float_0e97b3(); } diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl index 859d77a06a..7d0aeb354b 100644 --- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl +++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl @@ -28,18 +28,18 @@ fn pack2x16snorm_6c169b() { var res: u32 = pack2x16snorm(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16snorm_6c169b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16snorm_6c169b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16snorm_6c169b(); } diff --git a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl index cbcc61ddc0..9ccbc2f29f 100644 --- a/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pack2x16snorm/6c169b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pack2x16snorm_6c169b() { var res : u32 = pack2x16snorm(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16snorm_6c169b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16snorm_6c169b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16snorm_6c169b(); } diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl index 1c7cb38bd6..022aaa6576 100644 --- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl +++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl @@ -28,18 +28,18 @@ fn pack2x16unorm_0f08e4() { var res: u32 = pack2x16unorm(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16unorm_0f08e4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16unorm_0f08e4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16unorm_0f08e4(); } diff --git a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl index d73172835f..d523070e3a 100644 --- a/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pack2x16unorm/0f08e4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pack2x16unorm_0f08e4() { var res : u32 = pack2x16unorm(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack2x16unorm_0f08e4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack2x16unorm_0f08e4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack2x16unorm_0f08e4(); } diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl index f1d36e8ab1..6495f5e9ff 100644 --- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl +++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl @@ -28,18 +28,18 @@ fn pack4x8snorm_4d22e7() { var res: u32 = pack4x8snorm(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack4x8snorm_4d22e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack4x8snorm_4d22e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack4x8snorm_4d22e7(); } diff --git a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl index 201c6938e2..53657e09d3 100644 --- a/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pack4x8snorm/4d22e7.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pack4x8snorm_4d22e7() { var res : u32 = pack4x8snorm(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack4x8snorm_4d22e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack4x8snorm_4d22e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack4x8snorm_4d22e7(); } diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl index 8ccefca7de..d76e0755ca 100644 --- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl +++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl @@ -28,18 +28,18 @@ fn pack4x8unorm_95c456() { var res: u32 = pack4x8unorm(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack4x8unorm_95c456(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack4x8unorm_95c456(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack4x8unorm_95c456(); } diff --git a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl index f734559324..55aedf3f62 100644 --- a/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pack4x8unorm/95c456.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pack4x8unorm_95c456() { var res : u32 = pack4x8unorm(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pack4x8unorm_95c456(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pack4x8unorm_95c456(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pack4x8unorm_95c456(); } diff --git a/test/intrinsics/gen/pow/04a908.wgsl b/test/intrinsics/gen/pow/04a908.wgsl index a0fb92eb55..cc17d35d95 100644 --- a/test/intrinsics/gen/pow/04a908.wgsl +++ b/test/intrinsics/gen/pow/04a908.wgsl @@ -28,18 +28,18 @@ fn pow_04a908() { var res: vec4 = pow(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_04a908(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_04a908(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_04a908(); } diff --git a/test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl b/test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl index 55b882dbe4..395fe26772 100644 --- a/test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pow/04a908.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pow_04a908() { var res : vec4 = pow(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_04a908(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_04a908(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_04a908(); } diff --git a/test/intrinsics/gen/pow/46e029.wgsl b/test/intrinsics/gen/pow/46e029.wgsl index 87c47463de..7366f03ad7 100644 --- a/test/intrinsics/gen/pow/46e029.wgsl +++ b/test/intrinsics/gen/pow/46e029.wgsl @@ -28,18 +28,18 @@ fn pow_46e029() { var res: f32 = pow(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_46e029(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_46e029(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_46e029(); } diff --git a/test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl b/test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl index 49a55734c3..167072001a 100644 --- a/test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pow/46e029.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pow_46e029() { var res : f32 = pow(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_46e029(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_46e029(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_46e029(); } diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl b/test/intrinsics/gen/pow/4a46c9.wgsl index c0addcd4be..c6e5af08ef 100644 --- a/test/intrinsics/gen/pow/4a46c9.wgsl +++ b/test/intrinsics/gen/pow/4a46c9.wgsl @@ -28,18 +28,18 @@ fn pow_4a46c9() { var res: vec3 = pow(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_4a46c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_4a46c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_4a46c9(); } diff --git a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl index 8000f56898..4a6f3f9e92 100644 --- a/test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pow/4a46c9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pow_4a46c9() { var res : vec3 = pow(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_4a46c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_4a46c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_4a46c9(); } diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl b/test/intrinsics/gen/pow/e60ea5.wgsl index 72ee0cf487..e2080cb484 100644 --- a/test/intrinsics/gen/pow/e60ea5.wgsl +++ b/test/intrinsics/gen/pow/e60ea5.wgsl @@ -28,18 +28,18 @@ fn pow_e60ea5() { var res: vec2 = pow(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_e60ea5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_e60ea5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_e60ea5(); } diff --git a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl index 388533619d..0c6432ec58 100644 --- a/test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/pow/e60ea5.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn pow_e60ea5() { var res : vec2 = pow(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { pow_e60ea5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { pow_e60ea5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { pow_e60ea5(); } diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl b/test/intrinsics/gen/radians/09b7fc.wgsl index e3e70e6c14..e397d3a4ed 100644 --- a/test/intrinsics/gen/radians/09b7fc.wgsl +++ b/test/intrinsics/gen/radians/09b7fc.wgsl @@ -28,18 +28,18 @@ fn radians_09b7fc() { var res: vec4 = radians(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_09b7fc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_09b7fc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_09b7fc(); } diff --git a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl b/test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl index 4b354c06dc..e8efa0ef7b 100644 --- a/test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/radians/09b7fc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn radians_09b7fc() { var res : vec4 = radians(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_09b7fc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_09b7fc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_09b7fc(); } diff --git a/test/intrinsics/gen/radians/61687a.wgsl b/test/intrinsics/gen/radians/61687a.wgsl index 81db7eea95..9ff856097f 100644 --- a/test/intrinsics/gen/radians/61687a.wgsl +++ b/test/intrinsics/gen/radians/61687a.wgsl @@ -28,18 +28,18 @@ fn radians_61687a() { var res: vec2 = radians(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_61687a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_61687a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_61687a(); } diff --git a/test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl b/test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl index 830d0d6dfa..310425f1b1 100644 --- a/test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/radians/61687a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn radians_61687a() { var res : vec2 = radians(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_61687a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_61687a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_61687a(); } diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl b/test/intrinsics/gen/radians/6b0ff2.wgsl index fab9916d5a..8ceaeb2bbe 100644 --- a/test/intrinsics/gen/radians/6b0ff2.wgsl +++ b/test/intrinsics/gen/radians/6b0ff2.wgsl @@ -28,18 +28,18 @@ fn radians_6b0ff2() { var res: f32 = radians(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_6b0ff2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_6b0ff2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_6b0ff2(); } diff --git a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl b/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl index 1c1ac6b124..05a6fb5bdd 100644 --- a/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/radians/6b0ff2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn radians_6b0ff2() { var res : f32 = radians(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_6b0ff2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_6b0ff2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_6b0ff2(); } diff --git a/test/intrinsics/gen/radians/f96258.wgsl b/test/intrinsics/gen/radians/f96258.wgsl index 4c48ae3387..bca54a5321 100644 --- a/test/intrinsics/gen/radians/f96258.wgsl +++ b/test/intrinsics/gen/radians/f96258.wgsl @@ -28,18 +28,18 @@ fn radians_f96258() { var res: vec3 = radians(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_f96258(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_f96258(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_f96258(); } diff --git a/test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl b/test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl index 9a14173677..c38fe31106 100644 --- a/test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl +++ b/test/intrinsics/gen/radians/f96258.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn radians_f96258() { var res : vec3 = radians(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { radians_f96258(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { radians_f96258(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { radians_f96258(); } diff --git a/test/intrinsics/gen/reflect/05357e.wgsl b/test/intrinsics/gen/reflect/05357e.wgsl index 928e3df88a..97aaac741f 100644 --- a/test/intrinsics/gen/reflect/05357e.wgsl +++ b/test/intrinsics/gen/reflect/05357e.wgsl @@ -28,18 +28,18 @@ fn reflect_05357e() { var res: vec4 = reflect(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_05357e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_05357e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_05357e(); } diff --git a/test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl b/test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl index 5e4b47d527..ba4f95a1d5 100644 --- a/test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reflect/05357e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reflect_05357e() { var res : vec4 = reflect(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_05357e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_05357e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_05357e(); } diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl b/test/intrinsics/gen/reflect/b61e10.wgsl index 441e9a750f..124022ba7d 100644 --- a/test/intrinsics/gen/reflect/b61e10.wgsl +++ b/test/intrinsics/gen/reflect/b61e10.wgsl @@ -28,18 +28,18 @@ fn reflect_b61e10() { var res: vec2 = reflect(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_b61e10(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_b61e10(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_b61e10(); } diff --git a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl index 6cd6d585f0..330eead42a 100644 --- a/test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reflect/b61e10.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reflect_b61e10() { var res : vec2 = reflect(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_b61e10(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_b61e10(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_b61e10(); } diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl b/test/intrinsics/gen/reflect/f47fdb.wgsl index ee0867216a..3048fe03f7 100644 --- a/test/intrinsics/gen/reflect/f47fdb.wgsl +++ b/test/intrinsics/gen/reflect/f47fdb.wgsl @@ -28,18 +28,18 @@ fn reflect_f47fdb() { var res: vec3 = reflect(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_f47fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_f47fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_f47fdb(); } diff --git a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl index 916347c14c..d66212f725 100644 --- a/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reflect/f47fdb.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reflect_f47fdb() { var res : vec3 = reflect(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reflect_f47fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reflect_f47fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reflect_f47fdb(); } diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl b/test/intrinsics/gen/refract/7e02e6.wgsl index 677b01bf51..ff464115bc 100644 --- a/test/intrinsics/gen/refract/7e02e6.wgsl +++ b/test/intrinsics/gen/refract/7e02e6.wgsl @@ -28,18 +28,18 @@ fn refract_7e02e6() { var res: vec4 = refract(vec4(), vec4(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_7e02e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_7e02e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_7e02e6(); } diff --git a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl index f55545f0f1..3950912616 100644 --- a/test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/refract/7e02e6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn refract_7e02e6() { var res : vec4 = refract(vec4(), vec4(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_7e02e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_7e02e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_7e02e6(); } diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl b/test/intrinsics/gen/refract/cbc1d2.wgsl index 5ef26d76a0..40c0531544 100644 --- a/test/intrinsics/gen/refract/cbc1d2.wgsl +++ b/test/intrinsics/gen/refract/cbc1d2.wgsl @@ -28,18 +28,18 @@ fn refract_cbc1d2() { var res: vec3 = refract(vec3(), vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_cbc1d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_cbc1d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_cbc1d2(); } diff --git a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl index d26c8d1119..535c2791e5 100644 --- a/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/refract/cbc1d2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn refract_cbc1d2() { var res : vec3 = refract(vec3(), vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_cbc1d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_cbc1d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_cbc1d2(); } diff --git a/test/intrinsics/gen/refract/cd905f.wgsl b/test/intrinsics/gen/refract/cd905f.wgsl index 4c38ddf7a9..9c9e3fdb79 100644 --- a/test/intrinsics/gen/refract/cd905f.wgsl +++ b/test/intrinsics/gen/refract/cd905f.wgsl @@ -28,18 +28,18 @@ fn refract_cd905f() { var res: vec2 = refract(vec2(), vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_cd905f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_cd905f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_cd905f(); } diff --git a/test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl b/test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl index de43d99437..485ab60302 100644 --- a/test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/refract/cd905f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn refract_cd905f() { var res : vec2 = refract(vec2(), vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { refract_cd905f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { refract_cd905f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { refract_cd905f(); } diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl b/test/intrinsics/gen/reverseBits/222177.wgsl index ac1aef1560..bdbba4a5aa 100644 --- a/test/intrinsics/gen/reverseBits/222177.wgsl +++ b/test/intrinsics/gen/reverseBits/222177.wgsl @@ -28,18 +28,18 @@ fn reverseBits_222177() { var res: vec2 = reverseBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_222177(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_222177(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_222177(); } diff --git a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl index 5e8b89a0f6..cd377693db 100644 --- a/test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/222177.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_222177() { var res : vec2 = reverseBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_222177(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_222177(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_222177(); } diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl b/test/intrinsics/gen/reverseBits/35fea9.wgsl index e8c79b132a..319f6d2039 100644 --- a/test/intrinsics/gen/reverseBits/35fea9.wgsl +++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl @@ -28,18 +28,18 @@ fn reverseBits_35fea9() { var res: vec4 = reverseBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_35fea9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_35fea9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_35fea9(); } diff --git a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl index 6bcd42bb08..6fea80dd69 100644 --- a/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/35fea9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_35fea9() { var res : vec4 = reverseBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_35fea9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_35fea9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_35fea9(); } diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl index f2fea01940..09ab61f0ac 100644 --- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl +++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl @@ -28,18 +28,18 @@ fn reverseBits_4dbd6f() { var res: vec4 = reverseBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_4dbd6f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_4dbd6f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_4dbd6f(); } diff --git a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl index a07bf4d5ab..2e6d0b2b3a 100644 --- a/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/4dbd6f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_4dbd6f() { var res : vec4 = reverseBits(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_4dbd6f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_4dbd6f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_4dbd6f(); } diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl b/test/intrinsics/gen/reverseBits/7c4269.wgsl index 423e9d9e4d..6be3409cbc 100644 --- a/test/intrinsics/gen/reverseBits/7c4269.wgsl +++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl @@ -28,18 +28,18 @@ fn reverseBits_7c4269() { var res: i32 = reverseBits(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_7c4269(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_7c4269(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_7c4269(); } diff --git a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl index 8bf4d05f0d..17f99508d8 100644 --- a/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/7c4269.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_7c4269() { var res : i32 = reverseBits(1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_7c4269(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_7c4269(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_7c4269(); } diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl index e973fe2469..35599044b9 100644 --- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl +++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl @@ -28,18 +28,18 @@ fn reverseBits_a6ccd4() { var res: vec3 = reverseBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_a6ccd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_a6ccd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_a6ccd4(); } diff --git a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl index abcdac121d..713d9c764d 100644 --- a/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/a6ccd4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_a6ccd4() { var res : vec3 = reverseBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_a6ccd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_a6ccd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_a6ccd4(); } diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl index 36367af6e5..985e64ab0f 100644 --- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl +++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl @@ -28,18 +28,18 @@ fn reverseBits_c21bc1() { var res: vec3 = reverseBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_c21bc1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_c21bc1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_c21bc1(); } diff --git a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl index 971a3b036d..6ad70ae5ea 100644 --- a/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/c21bc1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_c21bc1() { var res : vec3 = reverseBits(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_c21bc1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_c21bc1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_c21bc1(); } diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl index 406684b01d..d186157d24 100644 --- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl +++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl @@ -28,18 +28,18 @@ fn reverseBits_e1f4c1() { var res: vec2 = reverseBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_e1f4c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_e1f4c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_e1f4c1(); } diff --git a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl index 6860421548..dc01269bec 100644 --- a/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/e1f4c1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_e1f4c1() { var res : vec2 = reverseBits(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_e1f4c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_e1f4c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_e1f4c1(); } diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl b/test/intrinsics/gen/reverseBits/e31adf.wgsl index 39e56393d4..c32c738ed9 100644 --- a/test/intrinsics/gen/reverseBits/e31adf.wgsl +++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl @@ -28,18 +28,18 @@ fn reverseBits_e31adf() { var res: u32 = reverseBits(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_e31adf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_e31adf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_e31adf(); } diff --git a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl index 2f2c5e8cd7..d99e7a57cf 100644 --- a/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/reverseBits/e31adf.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn reverseBits_e31adf() { var res : u32 = reverseBits(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { reverseBits_e31adf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { reverseBits_e31adf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { reverseBits_e31adf(); } diff --git a/test/intrinsics/gen/round/106c0b.wgsl b/test/intrinsics/gen/round/106c0b.wgsl index 0bcea29f50..52ebd56e2b 100644 --- a/test/intrinsics/gen/round/106c0b.wgsl +++ b/test/intrinsics/gen/round/106c0b.wgsl @@ -28,18 +28,18 @@ fn round_106c0b() { var res: vec4 = round(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_106c0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_106c0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_106c0b(); } diff --git a/test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl b/test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl index de571735cc..338cddf2d9 100644 --- a/test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/round/106c0b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn round_106c0b() { var res : vec4 = round(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_106c0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_106c0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_106c0b(); } diff --git a/test/intrinsics/gen/round/1c7897.wgsl b/test/intrinsics/gen/round/1c7897.wgsl index ff055134b5..c0f13aeadf 100644 --- a/test/intrinsics/gen/round/1c7897.wgsl +++ b/test/intrinsics/gen/round/1c7897.wgsl @@ -28,18 +28,18 @@ fn round_1c7897() { var res: vec3 = round(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_1c7897(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_1c7897(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_1c7897(); } diff --git a/test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl b/test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl index 4abe9aafad..ac2350eb42 100644 --- a/test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl +++ b/test/intrinsics/gen/round/1c7897.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn round_1c7897() { var res : vec3 = round(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_1c7897(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_1c7897(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_1c7897(); } diff --git a/test/intrinsics/gen/round/52c84d.wgsl b/test/intrinsics/gen/round/52c84d.wgsl index 34d2910549..385bb5ebec 100644 --- a/test/intrinsics/gen/round/52c84d.wgsl +++ b/test/intrinsics/gen/round/52c84d.wgsl @@ -28,18 +28,18 @@ fn round_52c84d() { var res: vec2 = round(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_52c84d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_52c84d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_52c84d(); } diff --git a/test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl b/test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl index 5d89ce6c48..9877c2dc65 100644 --- a/test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/round/52c84d.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn round_52c84d() { var res : vec2 = round(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_52c84d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_52c84d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_52c84d(); } diff --git a/test/intrinsics/gen/round/9edc38.wgsl b/test/intrinsics/gen/round/9edc38.wgsl index 01f9211a08..e4fd1767e4 100644 --- a/test/intrinsics/gen/round/9edc38.wgsl +++ b/test/intrinsics/gen/round/9edc38.wgsl @@ -28,18 +28,18 @@ fn round_9edc38() { var res: f32 = round(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_9edc38(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_9edc38(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_9edc38(); } diff --git a/test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl b/test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl index 40588ac979..9753e04491 100644 --- a/test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl +++ b/test/intrinsics/gen/round/9edc38.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn round_9edc38() { var res : f32 = round(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { round_9edc38(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { round_9edc38(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { round_9edc38(); } diff --git a/test/intrinsics/gen/select/00b848.wgsl b/test/intrinsics/gen/select/00b848.wgsl index bf6993fb5b..a1f4834a91 100644 --- a/test/intrinsics/gen/select/00b848.wgsl +++ b/test/intrinsics/gen/select/00b848.wgsl @@ -28,18 +28,18 @@ fn select_00b848() { var res: vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_00b848(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_00b848(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_00b848(); } diff --git a/test/intrinsics/gen/select/00b848.wgsl.expected.wgsl b/test/intrinsics/gen/select/00b848.wgsl.expected.wgsl index 9a72d2d071..bf45b9026d 100644 --- a/test/intrinsics/gen/select/00b848.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/00b848.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_00b848() { var res : vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_00b848(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_00b848(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_00b848(); } diff --git a/test/intrinsics/gen/select/01e2cd.wgsl b/test/intrinsics/gen/select/01e2cd.wgsl index ed51d3398a..c8e04087bd 100644 --- a/test/intrinsics/gen/select/01e2cd.wgsl +++ b/test/intrinsics/gen/select/01e2cd.wgsl @@ -28,18 +28,18 @@ fn select_01e2cd() { var res: vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_01e2cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_01e2cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_01e2cd(); } diff --git a/test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl b/test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl index f52df12a08..7e9d06fa39 100644 --- a/test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/01e2cd.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_01e2cd() { var res : vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_01e2cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_01e2cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_01e2cd(); } diff --git a/test/intrinsics/gen/select/087ea4.wgsl b/test/intrinsics/gen/select/087ea4.wgsl index a89cf61886..f8f79245ac 100644 --- a/test/intrinsics/gen/select/087ea4.wgsl +++ b/test/intrinsics/gen/select/087ea4.wgsl @@ -28,18 +28,18 @@ fn select_087ea4() { var res: vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_087ea4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_087ea4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_087ea4(); } diff --git a/test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl b/test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl index da2621fd06..6258a15d0b 100644 --- a/test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/087ea4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_087ea4() { var res : vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_087ea4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_087ea4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_087ea4(); } diff --git a/test/intrinsics/gen/select/1e960b.wgsl b/test/intrinsics/gen/select/1e960b.wgsl index 7d40c594b4..92c0df6ee7 100644 --- a/test/intrinsics/gen/select/1e960b.wgsl +++ b/test/intrinsics/gen/select/1e960b.wgsl @@ -28,18 +28,18 @@ fn select_1e960b() { var res: vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_1e960b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_1e960b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_1e960b(); } diff --git a/test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl b/test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl index 2fc10506ed..4f78e59e25 100644 --- a/test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/1e960b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_1e960b() { var res : vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_1e960b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_1e960b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_1e960b(); } diff --git a/test/intrinsics/gen/select/266aff.wgsl b/test/intrinsics/gen/select/266aff.wgsl index cd55f3ce6c..6faee8aaf2 100644 --- a/test/intrinsics/gen/select/266aff.wgsl +++ b/test/intrinsics/gen/select/266aff.wgsl @@ -28,18 +28,18 @@ fn select_266aff() { var res: vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_266aff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_266aff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_266aff(); } diff --git a/test/intrinsics/gen/select/266aff.wgsl.expected.wgsl b/test/intrinsics/gen/select/266aff.wgsl.expected.wgsl index 6c5dab67b4..522a10f656 100644 --- a/test/intrinsics/gen/select/266aff.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/266aff.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_266aff() { var res : vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_266aff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_266aff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_266aff(); } diff --git a/test/intrinsics/gen/select/28a27e.wgsl b/test/intrinsics/gen/select/28a27e.wgsl index b58c5caf16..cc515a98c4 100644 --- a/test/intrinsics/gen/select/28a27e.wgsl +++ b/test/intrinsics/gen/select/28a27e.wgsl @@ -28,18 +28,18 @@ fn select_28a27e() { var res: vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_28a27e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_28a27e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_28a27e(); } diff --git a/test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl b/test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl index 42fb13afe3..cbc4bcfa1f 100644 --- a/test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/28a27e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_28a27e() { var res : vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_28a27e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_28a27e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_28a27e(); } diff --git a/test/intrinsics/gen/select/3c25ce.wgsl b/test/intrinsics/gen/select/3c25ce.wgsl index 5a2afbddee..85d68b14c4 100644 --- a/test/intrinsics/gen/select/3c25ce.wgsl +++ b/test/intrinsics/gen/select/3c25ce.wgsl @@ -28,18 +28,18 @@ fn select_3c25ce() { var res: vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_3c25ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_3c25ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_3c25ce(); } diff --git a/test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl b/test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl index cd6c508ff5..48963b4c96 100644 --- a/test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/3c25ce.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_3c25ce() { var res : vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_3c25ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_3c25ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_3c25ce(); } diff --git a/test/intrinsics/gen/select/416e14.wgsl b/test/intrinsics/gen/select/416e14.wgsl index 6427738ff8..c69cd17882 100644 --- a/test/intrinsics/gen/select/416e14.wgsl +++ b/test/intrinsics/gen/select/416e14.wgsl @@ -28,18 +28,18 @@ fn select_416e14() { var res: f32 = select(1.0, 1.0, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_416e14(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_416e14(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_416e14(); } diff --git a/test/intrinsics/gen/select/416e14.wgsl.expected.wgsl b/test/intrinsics/gen/select/416e14.wgsl.expected.wgsl index 847eb7c297..bfa5d2e711 100644 --- a/test/intrinsics/gen/select/416e14.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/416e14.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_416e14() { var res : f32 = select(1.0, 1.0, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_416e14(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_416e14(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_416e14(); } diff --git a/test/intrinsics/gen/select/51b047.wgsl b/test/intrinsics/gen/select/51b047.wgsl index 64fd8ed0e3..f774d3f9b6 100644 --- a/test/intrinsics/gen/select/51b047.wgsl +++ b/test/intrinsics/gen/select/51b047.wgsl @@ -28,18 +28,18 @@ fn select_51b047() { var res: vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_51b047(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_51b047(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_51b047(); } diff --git a/test/intrinsics/gen/select/51b047.wgsl.expected.wgsl b/test/intrinsics/gen/select/51b047.wgsl.expected.wgsl index 8cb55258a2..93097d9a78 100644 --- a/test/intrinsics/gen/select/51b047.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/51b047.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_51b047() { var res : vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_51b047(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_51b047(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_51b047(); } diff --git a/test/intrinsics/gen/select/713567.wgsl b/test/intrinsics/gen/select/713567.wgsl index 2d4d541a4e..9dad142ef7 100644 --- a/test/intrinsics/gen/select/713567.wgsl +++ b/test/intrinsics/gen/select/713567.wgsl @@ -28,18 +28,18 @@ fn select_713567() { var res: vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_713567(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_713567(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_713567(); } diff --git a/test/intrinsics/gen/select/713567.wgsl.expected.wgsl b/test/intrinsics/gen/select/713567.wgsl.expected.wgsl index 8624950a08..d885a74d64 100644 --- a/test/intrinsics/gen/select/713567.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/713567.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_713567() { var res : vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_713567(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_713567(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_713567(); } diff --git a/test/intrinsics/gen/select/78be5f.wgsl b/test/intrinsics/gen/select/78be5f.wgsl index 940450af26..363cb618e1 100644 --- a/test/intrinsics/gen/select/78be5f.wgsl +++ b/test/intrinsics/gen/select/78be5f.wgsl @@ -28,18 +28,18 @@ fn select_78be5f() { var res: vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_78be5f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_78be5f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_78be5f(); } diff --git a/test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl b/test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl index 9f76d0fc56..7c77d66daf 100644 --- a/test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/78be5f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_78be5f() { var res : vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_78be5f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_78be5f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_78be5f(); } diff --git a/test/intrinsics/gen/select/80a9a9.wgsl b/test/intrinsics/gen/select/80a9a9.wgsl index 2d8a8f9f40..970d4b0163 100644 --- a/test/intrinsics/gen/select/80a9a9.wgsl +++ b/test/intrinsics/gen/select/80a9a9.wgsl @@ -28,18 +28,18 @@ fn select_80a9a9() { var res: vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_80a9a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_80a9a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_80a9a9(); } diff --git a/test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl b/test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl index bafde417e7..1f2b1fd8db 100644 --- a/test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/80a9a9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_80a9a9() { var res : vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_80a9a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_80a9a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_80a9a9(); } diff --git a/test/intrinsics/gen/select/8fa62c.wgsl b/test/intrinsics/gen/select/8fa62c.wgsl index edaca3fb5e..6fd149a7c0 100644 --- a/test/intrinsics/gen/select/8fa62c.wgsl +++ b/test/intrinsics/gen/select/8fa62c.wgsl @@ -28,18 +28,18 @@ fn select_8fa62c() { var res: vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_8fa62c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_8fa62c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_8fa62c(); } diff --git a/test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl b/test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl index 7ce550fbb7..431824e250 100644 --- a/test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/8fa62c.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_8fa62c() { var res : vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_8fa62c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_8fa62c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_8fa62c(); } diff --git a/test/intrinsics/gen/select/99f883.wgsl b/test/intrinsics/gen/select/99f883.wgsl index 5ddccad70a..25c5a2591f 100644 --- a/test/intrinsics/gen/select/99f883.wgsl +++ b/test/intrinsics/gen/select/99f883.wgsl @@ -28,18 +28,18 @@ fn select_99f883() { var res: u32 = select(1u, 1u, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_99f883(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_99f883(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_99f883(); } diff --git a/test/intrinsics/gen/select/99f883.wgsl.expected.wgsl b/test/intrinsics/gen/select/99f883.wgsl.expected.wgsl index 17d55988e4..0ceacc22c1 100644 --- a/test/intrinsics/gen/select/99f883.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/99f883.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_99f883() { var res : u32 = select(1u, 1u, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_99f883(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_99f883(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_99f883(); } diff --git a/test/intrinsics/gen/select/a2860e.wgsl b/test/intrinsics/gen/select/a2860e.wgsl index 289e00efb6..6b3b0b2037 100644 --- a/test/intrinsics/gen/select/a2860e.wgsl +++ b/test/intrinsics/gen/select/a2860e.wgsl @@ -28,18 +28,18 @@ fn select_a2860e() { var res: vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_a2860e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_a2860e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_a2860e(); } diff --git a/test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl b/test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl index d52472c2f0..0fd2eb4582 100644 --- a/test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/a2860e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_a2860e() { var res : vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_a2860e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_a2860e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_a2860e(); } diff --git a/test/intrinsics/gen/select/ab069f.wgsl b/test/intrinsics/gen/select/ab069f.wgsl index 3c2265e871..a55fa79c35 100644 --- a/test/intrinsics/gen/select/ab069f.wgsl +++ b/test/intrinsics/gen/select/ab069f.wgsl @@ -28,18 +28,18 @@ fn select_ab069f() { var res: vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ab069f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ab069f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ab069f(); } diff --git a/test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl b/test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl index b64daa0484..ea18846058 100644 --- a/test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/ab069f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_ab069f() { var res : vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ab069f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ab069f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ab069f(); } diff --git a/test/intrinsics/gen/select/b04721.wgsl b/test/intrinsics/gen/select/b04721.wgsl index 13898cf6c9..1de67395b9 100644 --- a/test/intrinsics/gen/select/b04721.wgsl +++ b/test/intrinsics/gen/select/b04721.wgsl @@ -28,18 +28,18 @@ fn select_b04721() { var res: vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_b04721(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_b04721(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_b04721(); } diff --git a/test/intrinsics/gen/select/b04721.wgsl.expected.wgsl b/test/intrinsics/gen/select/b04721.wgsl.expected.wgsl index e92cb25930..86befd9f05 100644 --- a/test/intrinsics/gen/select/b04721.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/b04721.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_b04721() { var res : vec3 = select(vec3(), vec3(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_b04721(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_b04721(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_b04721(); } diff --git a/test/intrinsics/gen/select/bb447f.wgsl b/test/intrinsics/gen/select/bb447f.wgsl index 7bdc0c7f82..f15929a07c 100644 --- a/test/intrinsics/gen/select/bb447f.wgsl +++ b/test/intrinsics/gen/select/bb447f.wgsl @@ -28,18 +28,18 @@ fn select_bb447f() { var res: vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bb447f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bb447f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bb447f(); } diff --git a/test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl b/test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl index dd11e9217b..2ea72e7132 100644 --- a/test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/bb447f.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_bb447f() { var res : vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bb447f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bb447f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bb447f(); } diff --git a/test/intrinsics/gen/select/bb8aae.wgsl b/test/intrinsics/gen/select/bb8aae.wgsl index 5734859fd8..786f619004 100644 --- a/test/intrinsics/gen/select/bb8aae.wgsl +++ b/test/intrinsics/gen/select/bb8aae.wgsl @@ -28,18 +28,18 @@ fn select_bb8aae() { var res: vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bb8aae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bb8aae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bb8aae(); } diff --git a/test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl b/test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl index dca5783714..f64a61b7dc 100644 --- a/test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/bb8aae.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_bb8aae() { var res : vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bb8aae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bb8aae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bb8aae(); } diff --git a/test/intrinsics/gen/select/bf3d29.wgsl b/test/intrinsics/gen/select/bf3d29.wgsl index ac2403957f..db8e8559af 100644 --- a/test/intrinsics/gen/select/bf3d29.wgsl +++ b/test/intrinsics/gen/select/bf3d29.wgsl @@ -28,18 +28,18 @@ fn select_bf3d29() { var res: vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bf3d29(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bf3d29(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bf3d29(); } diff --git a/test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl b/test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl index 1223b7ba0b..87b2f80aab 100644 --- a/test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/bf3d29.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_bf3d29() { var res : vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_bf3d29(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_bf3d29(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_bf3d29(); } diff --git a/test/intrinsics/gen/select/c31f9e.wgsl b/test/intrinsics/gen/select/c31f9e.wgsl index 5694d13fdb..3f04796763 100644 --- a/test/intrinsics/gen/select/c31f9e.wgsl +++ b/test/intrinsics/gen/select/c31f9e.wgsl @@ -28,18 +28,18 @@ fn select_c31f9e() { var res: bool = select(bool(), bool(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c31f9e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c31f9e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c31f9e(); } diff --git a/test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl b/test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl index 289a9044dc..21acae64ef 100644 --- a/test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/c31f9e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_c31f9e() { var res : bool = select(bool(), bool(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c31f9e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c31f9e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c31f9e(); } diff --git a/test/intrinsics/gen/select/c41bd1.wgsl b/test/intrinsics/gen/select/c41bd1.wgsl index cdb49ce1a3..a4a0143bae 100644 --- a/test/intrinsics/gen/select/c41bd1.wgsl +++ b/test/intrinsics/gen/select/c41bd1.wgsl @@ -28,18 +28,18 @@ fn select_c41bd1() { var res: vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c41bd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c41bd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c41bd1(); } diff --git a/test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl b/test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl index c0fffc7574..a314f0c2b4 100644 --- a/test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/c41bd1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_c41bd1() { var res : vec4 = select(vec4(), vec4(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c41bd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c41bd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c41bd1(); } diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl b/test/intrinsics/gen/select/c4a4ef.wgsl index f78392b5f4..5826ca053b 100644 --- a/test/intrinsics/gen/select/c4a4ef.wgsl +++ b/test/intrinsics/gen/select/c4a4ef.wgsl @@ -28,18 +28,18 @@ fn select_c4a4ef() { var res: vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c4a4ef(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c4a4ef(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c4a4ef(); } diff --git a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl index 13731b9a11..adbcc5ddff 100644 --- a/test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/c4a4ef.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_c4a4ef() { var res : vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_c4a4ef(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_c4a4ef(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_c4a4ef(); } diff --git a/test/intrinsics/gen/select/cb9301.wgsl b/test/intrinsics/gen/select/cb9301.wgsl index 397cca1c1f..1de0ad19de 100644 --- a/test/intrinsics/gen/select/cb9301.wgsl +++ b/test/intrinsics/gen/select/cb9301.wgsl @@ -28,18 +28,18 @@ fn select_cb9301() { var res: vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_cb9301(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_cb9301(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_cb9301(); } diff --git a/test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl b/test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl index cbad2688ac..7c85dad3e3 100644 --- a/test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/cb9301.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_cb9301() { var res : vec2 = select(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_cb9301(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_cb9301(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_cb9301(); } diff --git a/test/intrinsics/gen/select/e3e028.wgsl b/test/intrinsics/gen/select/e3e028.wgsl index 2031d9ea6e..7d286667f6 100644 --- a/test/intrinsics/gen/select/e3e028.wgsl +++ b/test/intrinsics/gen/select/e3e028.wgsl @@ -28,18 +28,18 @@ fn select_e3e028() { var res: vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_e3e028(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_e3e028(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_e3e028(); } diff --git a/test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl b/test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl index 200e27da85..2794266003 100644 --- a/test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/e3e028.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_e3e028() { var res : vec4 = select(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_e3e028(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_e3e028(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_e3e028(); } diff --git a/test/intrinsics/gen/select/ebfea2.wgsl b/test/intrinsics/gen/select/ebfea2.wgsl index 8487ca2231..bd572c58eb 100644 --- a/test/intrinsics/gen/select/ebfea2.wgsl +++ b/test/intrinsics/gen/select/ebfea2.wgsl @@ -28,18 +28,18 @@ fn select_ebfea2() { var res: vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ebfea2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ebfea2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ebfea2(); } diff --git a/test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl b/test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl index d7e6f63188..c1815851cb 100644 --- a/test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/ebfea2.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_ebfea2() { var res : vec3 = select(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ebfea2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ebfea2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ebfea2(); } diff --git a/test/intrinsics/gen/select/ed8a15.wgsl b/test/intrinsics/gen/select/ed8a15.wgsl index a8983872a2..df1f6ad259 100644 --- a/test/intrinsics/gen/select/ed8a15.wgsl +++ b/test/intrinsics/gen/select/ed8a15.wgsl @@ -28,18 +28,18 @@ fn select_ed8a15() { var res: i32 = select(1, 1, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ed8a15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ed8a15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ed8a15(); } diff --git a/test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl b/test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl index 7f607beace..ca4b96e16f 100644 --- a/test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/ed8a15.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_ed8a15() { var res : i32 = select(1, 1, bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_ed8a15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_ed8a15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_ed8a15(); } diff --git a/test/intrinsics/gen/select/fb7e53.wgsl b/test/intrinsics/gen/select/fb7e53.wgsl index a213dbd654..92d50f3c50 100644 --- a/test/intrinsics/gen/select/fb7e53.wgsl +++ b/test/intrinsics/gen/select/fb7e53.wgsl @@ -28,18 +28,18 @@ fn select_fb7e53() { var res: vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_fb7e53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_fb7e53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_fb7e53(); } diff --git a/test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl b/test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl index e08a15f9b1..6c6a2873f0 100644 --- a/test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl +++ b/test/intrinsics/gen/select/fb7e53.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn select_fb7e53() { var res : vec2 = select(vec2(), vec2(), bool()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { select_fb7e53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { select_fb7e53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { select_fb7e53(); } diff --git a/test/intrinsics/gen/sign/159665.wgsl b/test/intrinsics/gen/sign/159665.wgsl index 31ef21dd3e..a3d87a4e55 100644 --- a/test/intrinsics/gen/sign/159665.wgsl +++ b/test/intrinsics/gen/sign/159665.wgsl @@ -28,18 +28,18 @@ fn sign_159665() { var res: vec3 = sign(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_159665(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_159665(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_159665(); } diff --git a/test/intrinsics/gen/sign/159665.wgsl.expected.wgsl b/test/intrinsics/gen/sign/159665.wgsl.expected.wgsl index fe38cd6303..b66072bece 100644 --- a/test/intrinsics/gen/sign/159665.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sign/159665.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sign_159665() { var res : vec3 = sign(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_159665(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_159665(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_159665(); } diff --git a/test/intrinsics/gen/sign/b8f634.wgsl b/test/intrinsics/gen/sign/b8f634.wgsl index d16ad92529..c8ced09aad 100644 --- a/test/intrinsics/gen/sign/b8f634.wgsl +++ b/test/intrinsics/gen/sign/b8f634.wgsl @@ -28,18 +28,18 @@ fn sign_b8f634() { var res: vec4 = sign(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_b8f634(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_b8f634(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_b8f634(); } diff --git a/test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl b/test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl index fb4f9f7cbe..c9238d2587 100644 --- a/test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sign/b8f634.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sign_b8f634() { var res : vec4 = sign(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_b8f634(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_b8f634(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_b8f634(); } diff --git a/test/intrinsics/gen/sign/d065d8.wgsl b/test/intrinsics/gen/sign/d065d8.wgsl index 548b2a3410..98d6b5e33d 100644 --- a/test/intrinsics/gen/sign/d065d8.wgsl +++ b/test/intrinsics/gen/sign/d065d8.wgsl @@ -28,18 +28,18 @@ fn sign_d065d8() { var res: vec2 = sign(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_d065d8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_d065d8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_d065d8(); } diff --git a/test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl b/test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl index 7d4de190f6..870041f3db 100644 --- a/test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sign/d065d8.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sign_d065d8() { var res : vec2 = sign(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_d065d8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_d065d8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_d065d8(); } diff --git a/test/intrinsics/gen/sign/dd790e.wgsl b/test/intrinsics/gen/sign/dd790e.wgsl index 57e5b924d8..7765ea307e 100644 --- a/test/intrinsics/gen/sign/dd790e.wgsl +++ b/test/intrinsics/gen/sign/dd790e.wgsl @@ -28,18 +28,18 @@ fn sign_dd790e() { var res: f32 = sign(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_dd790e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_dd790e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_dd790e(); } diff --git a/test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl b/test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl index 9faa91bc85..d987517179 100644 --- a/test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sign/dd790e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sign_dd790e() { var res : f32 = sign(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sign_dd790e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sign_dd790e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sign_dd790e(); } diff --git a/test/intrinsics/gen/sin/01f241.wgsl b/test/intrinsics/gen/sin/01f241.wgsl index 6b385b346e..58c1794148 100644 --- a/test/intrinsics/gen/sin/01f241.wgsl +++ b/test/intrinsics/gen/sin/01f241.wgsl @@ -28,18 +28,18 @@ fn sin_01f241() { var res: vec3 = sin(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_01f241(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_01f241(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_01f241(); } diff --git a/test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl b/test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl index 6e7b72ee18..8188006663 100644 --- a/test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sin/01f241.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sin_01f241() { var res : vec3 = sin(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_01f241(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_01f241(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_01f241(); } diff --git a/test/intrinsics/gen/sin/4e3979.wgsl b/test/intrinsics/gen/sin/4e3979.wgsl index 4b616c749b..ae447d2db1 100644 --- a/test/intrinsics/gen/sin/4e3979.wgsl +++ b/test/intrinsics/gen/sin/4e3979.wgsl @@ -28,18 +28,18 @@ fn sin_4e3979() { var res: vec4 = sin(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_4e3979(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_4e3979(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_4e3979(); } diff --git a/test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl b/test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl index 1ec3ddd058..6d037783ed 100644 --- a/test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sin/4e3979.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sin_4e3979() { var res : vec4 = sin(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_4e3979(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_4e3979(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_4e3979(); } diff --git a/test/intrinsics/gen/sin/b78c91.wgsl b/test/intrinsics/gen/sin/b78c91.wgsl index 977b1c8922..d8ecd403ea 100644 --- a/test/intrinsics/gen/sin/b78c91.wgsl +++ b/test/intrinsics/gen/sin/b78c91.wgsl @@ -28,18 +28,18 @@ fn sin_b78c91() { var res: f32 = sin(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_b78c91(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_b78c91(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_b78c91(); } diff --git a/test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl b/test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl index f3532b1c3e..e4a2d42162 100644 --- a/test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sin/b78c91.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sin_b78c91() { var res : f32 = sin(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_b78c91(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_b78c91(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_b78c91(); } diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl b/test/intrinsics/gen/sin/fc8bc4.wgsl index 0c81e503d4..b828689a6d 100644 --- a/test/intrinsics/gen/sin/fc8bc4.wgsl +++ b/test/intrinsics/gen/sin/fc8bc4.wgsl @@ -28,18 +28,18 @@ fn sin_fc8bc4() { var res: vec2 = sin(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_fc8bc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_fc8bc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_fc8bc4(); } diff --git a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl index fbe00f8a08..30e0918779 100644 --- a/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sin/fc8bc4.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sin_fc8bc4() { var res : vec2 = sin(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sin_fc8bc4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sin_fc8bc4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sin_fc8bc4(); } diff --git a/test/intrinsics/gen/sinh/445e33.wgsl b/test/intrinsics/gen/sinh/445e33.wgsl index d3e94795e0..2bb1e20387 100644 --- a/test/intrinsics/gen/sinh/445e33.wgsl +++ b/test/intrinsics/gen/sinh/445e33.wgsl @@ -28,18 +28,18 @@ fn sinh_445e33() { var res: vec4 = sinh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_445e33(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_445e33(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_445e33(); } diff --git a/test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl b/test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl index 9f27e00448..4eac92e7cf 100644 --- a/test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sinh/445e33.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sinh_445e33() { var res : vec4 = sinh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_445e33(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_445e33(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_445e33(); } diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl b/test/intrinsics/gen/sinh/7bb598.wgsl index 112d966399..872b87b42b 100644 --- a/test/intrinsics/gen/sinh/7bb598.wgsl +++ b/test/intrinsics/gen/sinh/7bb598.wgsl @@ -28,18 +28,18 @@ fn sinh_7bb598() { var res: f32 = sinh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_7bb598(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_7bb598(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_7bb598(); } diff --git a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl index c9037e9002..8df3fa0831 100644 --- a/test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sinh/7bb598.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sinh_7bb598() { var res : f32 = sinh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_7bb598(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_7bb598(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_7bb598(); } diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl b/test/intrinsics/gen/sinh/b9860e.wgsl index 738b4b0dbf..3039b48173 100644 --- a/test/intrinsics/gen/sinh/b9860e.wgsl +++ b/test/intrinsics/gen/sinh/b9860e.wgsl @@ -28,18 +28,18 @@ fn sinh_b9860e() { var res: vec2 = sinh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_b9860e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_b9860e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_b9860e(); } diff --git a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl index 189d1a874c..b0698d04f3 100644 --- a/test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sinh/b9860e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sinh_b9860e() { var res : vec2 = sinh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_b9860e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_b9860e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_b9860e(); } diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl b/test/intrinsics/gen/sinh/c9a5eb.wgsl index 59a9e385c8..9c79e98d3e 100644 --- a/test/intrinsics/gen/sinh/c9a5eb.wgsl +++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl @@ -28,18 +28,18 @@ fn sinh_c9a5eb() { var res: vec3 = sinh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_c9a5eb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_c9a5eb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_c9a5eb(); } diff --git a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl index ccbf252c6e..642d72c8c4 100644 --- a/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sinh/c9a5eb.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sinh_c9a5eb() { var res : vec3 = sinh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sinh_c9a5eb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sinh_c9a5eb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sinh_c9a5eb(); } diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl b/test/intrinsics/gen/smoothStep/5f615b.wgsl index d4ba632c19..4b1a4aba1a 100644 --- a/test/intrinsics/gen/smoothStep/5f615b.wgsl +++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl @@ -28,18 +28,18 @@ fn smoothStep_5f615b() { var res: vec4 = smoothStep(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_5f615b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_5f615b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_5f615b(); } diff --git a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl index 62fe376f1e..55a7561b06 100644 --- a/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/smoothStep/5f615b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn smoothStep_5f615b() { var res : vec4 = smoothStep(vec4(), vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_5f615b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_5f615b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_5f615b(); } diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl b/test/intrinsics/gen/smoothStep/658be3.wgsl index 11d397148d..8e3936459b 100644 --- a/test/intrinsics/gen/smoothStep/658be3.wgsl +++ b/test/intrinsics/gen/smoothStep/658be3.wgsl @@ -28,18 +28,18 @@ fn smoothStep_658be3() { var res: vec3 = smoothStep(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_658be3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_658be3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_658be3(); } diff --git a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl index 2d994431b9..d81b745f91 100644 --- a/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/smoothStep/658be3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn smoothStep_658be3() { var res : vec3 = smoothStep(vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_658be3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_658be3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_658be3(); } diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl b/test/intrinsics/gen/smoothStep/c11eef.wgsl index 9d88a6729a..7839f09149 100644 --- a/test/intrinsics/gen/smoothStep/c11eef.wgsl +++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl @@ -28,18 +28,18 @@ fn smoothStep_c11eef() { var res: vec2 = smoothStep(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_c11eef(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_c11eef(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_c11eef(); } diff --git a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl index 54a6fb772c..7b34ffb349 100644 --- a/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl +++ b/test/intrinsics/gen/smoothStep/c11eef.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn smoothStep_c11eef() { var res : vec2 = smoothStep(vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_c11eef(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_c11eef(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_c11eef(); } diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl index a823893bf3..5c6c8c21ac 100644 --- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl +++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl @@ -28,18 +28,18 @@ fn smoothStep_cb0bfb() { var res: f32 = smoothStep(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_cb0bfb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_cb0bfb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_cb0bfb(); } diff --git a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl index dd78c16296..6b8ab78e9e 100644 --- a/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/smoothStep/cb0bfb.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn smoothStep_cb0bfb() { var res : f32 = smoothStep(1.0, 1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { smoothStep_cb0bfb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { smoothStep_cb0bfb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { smoothStep_cb0bfb(); } diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl b/test/intrinsics/gen/sqrt/20c74e.wgsl index 8b85622e7c..b954397b85 100644 --- a/test/intrinsics/gen/sqrt/20c74e.wgsl +++ b/test/intrinsics/gen/sqrt/20c74e.wgsl @@ -28,18 +28,18 @@ fn sqrt_20c74e() { var res: f32 = sqrt(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_20c74e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_20c74e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_20c74e(); } diff --git a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl index 944a81ec0e..3b9fe0a266 100644 --- a/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sqrt/20c74e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sqrt_20c74e() { var res : f32 = sqrt(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_20c74e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_20c74e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_20c74e(); } diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl b/test/intrinsics/gen/sqrt/8c7024.wgsl index 3cc8b8b313..4e929d6360 100644 --- a/test/intrinsics/gen/sqrt/8c7024.wgsl +++ b/test/intrinsics/gen/sqrt/8c7024.wgsl @@ -28,18 +28,18 @@ fn sqrt_8c7024() { var res: vec2 = sqrt(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_8c7024(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_8c7024(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_8c7024(); } diff --git a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl index 7021231f4a..36b4a8b6cc 100644 --- a/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sqrt/8c7024.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sqrt_8c7024() { var res : vec2 = sqrt(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_8c7024(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_8c7024(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_8c7024(); } diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl index a9b5ec2ea3..e15b17039d 100644 --- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl +++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl @@ -28,18 +28,18 @@ fn sqrt_aa0d7a() { var res: vec4 = sqrt(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_aa0d7a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_aa0d7a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_aa0d7a(); } diff --git a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl index 3158248bcc..47ab81a39d 100644 --- a/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sqrt/aa0d7a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sqrt_aa0d7a() { var res : vec4 = sqrt(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_aa0d7a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_aa0d7a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_aa0d7a(); } diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl b/test/intrinsics/gen/sqrt/f8c59a.wgsl index f201a13908..5916a9fc89 100644 --- a/test/intrinsics/gen/sqrt/f8c59a.wgsl +++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl @@ -28,18 +28,18 @@ fn sqrt_f8c59a() { var res: vec3 = sqrt(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_f8c59a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_f8c59a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_f8c59a(); } diff --git a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl index 61da933f19..e12b65861c 100644 --- a/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/sqrt/f8c59a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn sqrt_f8c59a() { var res : vec3 = sqrt(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { sqrt_f8c59a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { sqrt_f8c59a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { sqrt_f8c59a(); } diff --git a/test/intrinsics/gen/step/0b073b.wgsl b/test/intrinsics/gen/step/0b073b.wgsl index e8f04ccae4..5d88c864c8 100644 --- a/test/intrinsics/gen/step/0b073b.wgsl +++ b/test/intrinsics/gen/step/0b073b.wgsl @@ -28,18 +28,18 @@ fn step_0b073b() { var res: f32 = step(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_0b073b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_0b073b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_0b073b(); } diff --git a/test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl b/test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl index 313c3c6128..36e47ddeaa 100644 --- a/test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/step/0b073b.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn step_0b073b() { var res : f32 = step(1.0, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_0b073b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_0b073b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_0b073b(); } diff --git a/test/intrinsics/gen/step/19accd.wgsl b/test/intrinsics/gen/step/19accd.wgsl index 6dceca1690..9493036cb7 100644 --- a/test/intrinsics/gen/step/19accd.wgsl +++ b/test/intrinsics/gen/step/19accd.wgsl @@ -28,18 +28,18 @@ fn step_19accd() { var res: vec2 = step(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_19accd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_19accd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_19accd(); } diff --git a/test/intrinsics/gen/step/19accd.wgsl.expected.wgsl b/test/intrinsics/gen/step/19accd.wgsl.expected.wgsl index 08da07c606..ce2b50bada 100644 --- a/test/intrinsics/gen/step/19accd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/step/19accd.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn step_19accd() { var res : vec2 = step(vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_19accd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_19accd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_19accd(); } diff --git a/test/intrinsics/gen/step/334303.wgsl b/test/intrinsics/gen/step/334303.wgsl index a4ecbd89a0..63d3ead5fb 100644 --- a/test/intrinsics/gen/step/334303.wgsl +++ b/test/intrinsics/gen/step/334303.wgsl @@ -28,18 +28,18 @@ fn step_334303() { var res: vec3 = step(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_334303(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_334303(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_334303(); } diff --git a/test/intrinsics/gen/step/334303.wgsl.expected.wgsl b/test/intrinsics/gen/step/334303.wgsl.expected.wgsl index 3b2f197e8a..e1cb6317b3 100644 --- a/test/intrinsics/gen/step/334303.wgsl.expected.wgsl +++ b/test/intrinsics/gen/step/334303.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn step_334303() { var res : vec3 = step(vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_334303(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_334303(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_334303(); } diff --git a/test/intrinsics/gen/step/e2b337.wgsl b/test/intrinsics/gen/step/e2b337.wgsl index bbe16f1cd0..e6911303a1 100644 --- a/test/intrinsics/gen/step/e2b337.wgsl +++ b/test/intrinsics/gen/step/e2b337.wgsl @@ -28,18 +28,18 @@ fn step_e2b337() { var res: vec4 = step(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_e2b337(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_e2b337(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_e2b337(); } diff --git a/test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl b/test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl index f626625a06..a6efd8626f 100644 --- a/test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl +++ b/test/intrinsics/gen/step/e2b337.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn step_e2b337() { var res : vec4 = step(vec4(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { step_e2b337(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { step_e2b337(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { step_e2b337(); } diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl b/test/intrinsics/gen/storageBarrier/d87211.wgsl index cf5d8e13dd..293117455d 100644 --- a/test/intrinsics/gen/storageBarrier/d87211.wgsl +++ b/test/intrinsics/gen/storageBarrier/d87211.wgsl @@ -28,7 +28,7 @@ fn storageBarrier_d87211() { storageBarrier(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { storageBarrier_d87211(); } diff --git a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl b/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl index 2f0b7411b1..4c87708134 100644 --- a/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl +++ b/test/intrinsics/gen/storageBarrier/d87211.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn storageBarrier_d87211() { storageBarrier(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { storageBarrier_d87211(); } diff --git a/test/intrinsics/gen/tan/244e2a.wgsl b/test/intrinsics/gen/tan/244e2a.wgsl index 7e816e4e11..599499f46e 100644 --- a/test/intrinsics/gen/tan/244e2a.wgsl +++ b/test/intrinsics/gen/tan/244e2a.wgsl @@ -28,18 +28,18 @@ fn tan_244e2a() { var res: vec4 = tan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_244e2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_244e2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_244e2a(); } diff --git a/test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl b/test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl index 6e5647ea3e..77ac6d8afb 100644 --- a/test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tan/244e2a.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tan_244e2a() { var res : vec4 = tan(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_244e2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_244e2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_244e2a(); } diff --git a/test/intrinsics/gen/tan/2f030e.wgsl b/test/intrinsics/gen/tan/2f030e.wgsl index 52504f79d7..3ee8e7277c 100644 --- a/test/intrinsics/gen/tan/2f030e.wgsl +++ b/test/intrinsics/gen/tan/2f030e.wgsl @@ -28,18 +28,18 @@ fn tan_2f030e() { var res: f32 = tan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_2f030e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_2f030e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_2f030e(); } diff --git a/test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl b/test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl index b638e2c1d2..3c12969c53 100644 --- a/test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tan/2f030e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tan_2f030e() { var res : f32 = tan(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_2f030e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_2f030e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_2f030e(); } diff --git a/test/intrinsics/gen/tan/7ea104.wgsl b/test/intrinsics/gen/tan/7ea104.wgsl index 5c8437ece4..6250daab60 100644 --- a/test/intrinsics/gen/tan/7ea104.wgsl +++ b/test/intrinsics/gen/tan/7ea104.wgsl @@ -28,18 +28,18 @@ fn tan_7ea104() { var res: vec3 = tan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_7ea104(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_7ea104(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_7ea104(); } diff --git a/test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl b/test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl index 078d91fd15..f859e5063e 100644 --- a/test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tan/7ea104.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tan_7ea104() { var res : vec3 = tan(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_7ea104(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_7ea104(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_7ea104(); } diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl b/test/intrinsics/gen/tan/8ce3e9.wgsl index 1ddcfa9a90..85765f1e46 100644 --- a/test/intrinsics/gen/tan/8ce3e9.wgsl +++ b/test/intrinsics/gen/tan/8ce3e9.wgsl @@ -28,18 +28,18 @@ fn tan_8ce3e9() { var res: vec2 = tan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_8ce3e9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_8ce3e9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_8ce3e9(); } diff --git a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl index 756d55f3c3..a43d8095c5 100644 --- a/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tan/8ce3e9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tan_8ce3e9() { var res : vec2 = tan(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tan_8ce3e9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tan_8ce3e9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tan_8ce3e9(); } diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl b/test/intrinsics/gen/tanh/5663c5.wgsl index ed50ced8d6..96b2fdb4ca 100644 --- a/test/intrinsics/gen/tanh/5663c5.wgsl +++ b/test/intrinsics/gen/tanh/5663c5.wgsl @@ -28,18 +28,18 @@ fn tanh_5663c5() { var res: vec4 = tanh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_5663c5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_5663c5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_5663c5(); } diff --git a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl index 5158816122..717091bf70 100644 --- a/test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tanh/5663c5.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tanh_5663c5() { var res : vec4 = tanh(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_5663c5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_5663c5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_5663c5(); } diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl b/test/intrinsics/gen/tanh/5724b3.wgsl index fdee4518fc..c0f3509894 100644 --- a/test/intrinsics/gen/tanh/5724b3.wgsl +++ b/test/intrinsics/gen/tanh/5724b3.wgsl @@ -28,18 +28,18 @@ fn tanh_5724b3() { var res: vec2 = tanh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_5724b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_5724b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_5724b3(); } diff --git a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl index 2856696f16..7fbd481e1b 100644 --- a/test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tanh/5724b3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tanh_5724b3() { var res : vec2 = tanh(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_5724b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_5724b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_5724b3(); } diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl b/test/intrinsics/gen/tanh/9f9fb9.wgsl index 81579ef150..e83ed57e42 100644 --- a/test/intrinsics/gen/tanh/9f9fb9.wgsl +++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl @@ -28,18 +28,18 @@ fn tanh_9f9fb9() { var res: vec3 = tanh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_9f9fb9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_9f9fb9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_9f9fb9(); } diff --git a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl index 32f523a7f2..20184fd0f8 100644 --- a/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tanh/9f9fb9.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tanh_9f9fb9() { var res : vec3 = tanh(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_9f9fb9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_9f9fb9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_9f9fb9(); } diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl b/test/intrinsics/gen/tanh/c15fdb.wgsl index 32a04fc572..20c69fdd2d 100644 --- a/test/intrinsics/gen/tanh/c15fdb.wgsl +++ b/test/intrinsics/gen/tanh/c15fdb.wgsl @@ -28,18 +28,18 @@ fn tanh_c15fdb() { var res: f32 = tanh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_c15fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_c15fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_c15fdb(); } diff --git a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl index d7a1379eb5..fb6e8e7cf4 100644 --- a/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/tanh/c15fdb.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn tanh_c15fdb() { var res : f32 = tanh(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { tanh_c15fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { tanh_c15fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { tanh_c15fdb(); } diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl index 205bae6dd5..96f16b23c6 100644 --- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl +++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d) -> i32 fn textureDimensions_002b2a() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_002b2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_002b2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_002b2a(); } diff --git a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl index b0ea57366e..a21a8c0b16 100644 --- a/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/002b2a.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_002b2a() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_002b2a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_002b2a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_002b2a(); } diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl b/test/intrinsics/gen/textureDimensions/012b82.wgsl index 40caed2db1..b1697be83d 100644 --- a/test/intrinsics/gen/textureDimensions/012b82.wgsl +++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_012b82() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_012b82(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_012b82(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_012b82(); } diff --git a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl index dfe7af6722..7ebcab6b4e 100644 --- a/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/012b82.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_012b82() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_012b82(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_012b82(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_012b82(); } diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl b/test/intrinsics/gen/textureDimensions/08753d.wgsl index 52e02545a7..05fcbdd628 100644 --- a/test/intrinsics/gen/textureDimensions/08753d.wgsl +++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_08753d() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_08753d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_08753d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_08753d(); } diff --git a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl index 95f36297d2..45dce4b559 100644 --- a/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/08753d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_08753d() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_08753d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_08753d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_08753d(); } diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl index 7ba349c261..daad04270d 100644 --- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl +++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_0c4772() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0c4772(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0c4772(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0c4772(); } diff --git a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl index 026264987d..dc5fc35cb9 100644 --- a/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0c4772.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_0c4772() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0c4772(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0c4772(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0c4772(); } diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl index 1c710adde6..a9ae1338d8 100644 --- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl +++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_0cce40() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0cce40(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0cce40(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0cce40(); } diff --git a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl index 8c156ca06d..04b0e24fd1 100644 --- a/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0cce40.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_0cce40() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0cce40(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0cce40(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0cce40(); } diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl index 74f7f3cfcb..1fef317e9e 100644 --- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl +++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_0cf2ff() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0cf2ff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0cf2ff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0cf2ff(); } diff --git a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl index cea5440ad1..36e3e6109f 100644 --- a/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0cf2ff.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_0cf2ff() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0cf2ff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0cf2ff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0cf2ff(); } diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl index dce0780db8..255f1eedd6 100644 --- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl +++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_0d8b7e() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0d8b7e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0d8b7e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0d8b7e(); } diff --git a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl index 4427b17c84..b4a1350a3b 100644 --- a/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0d8b7e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_0d8b7e() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0d8b7e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0d8b7e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0d8b7e(); } diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl index ed94fd3efb..be5b433144 100644 --- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl +++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_0e32ee() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0e32ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0e32ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0e32ee(); } diff --git a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl index 971c451d2a..9f0e1d1347 100644 --- a/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0e32ee.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_0e32ee() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0e32ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0e32ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0e32ee(); } diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl index 99bab7ed2d..2cc8fece11 100644 --- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl +++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array) -> vec2 fn textureDimensions_0f3c50() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0f3c50(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0f3c50(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0f3c50(); } diff --git a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl index 57309a9bbb..553f57ea88 100644 --- a/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/0f3c50.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_0f3c50() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_0f3c50(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_0f3c50(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_0f3c50(); } diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl index 714a92cb86..6b0382b47b 100644 --- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl +++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d) -> vec2 fn textureDimensions_1191a5() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1191a5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1191a5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1191a5(); } diff --git a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl index 51c403e37e..2131304dac 100644 --- a/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/1191a5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_1191a5() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1191a5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1191a5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1191a5(); } diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl index bb7a3b0464..b2fa3efe21 100644 --- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl +++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; +@group(1) @binding(0) var arg_0: texture_depth_2d; // fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2 fn textureDimensions_12c9bb() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_12c9bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_12c9bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_12c9bb(); } diff --git a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl index 1dd859ff46..14d7f89b88 100644 --- a/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/12c9bb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureDimensions_12c9bb() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_12c9bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_12c9bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_12c9bb(); } diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl b/test/intrinsics/gen/textureDimensions/147998.wgsl index 66e2d277ec..41ebd8158c 100644 --- a/test/intrinsics/gen/textureDimensions/147998.wgsl +++ b/test/intrinsics/gen/textureDimensions/147998.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_147998() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_147998(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_147998(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_147998(); } diff --git a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl index b587cb2824..3cd6855640 100644 --- a/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/147998.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_147998() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_147998(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_147998(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_147998(); } diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl b/test/intrinsics/gen/textureDimensions/16036c.wgsl index 85e3656a6e..c231cc4676 100644 --- a/test/intrinsics/gen/textureDimensions/16036c.wgsl +++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_16036c() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_16036c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_16036c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_16036c(); } diff --git a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl index be39823fe2..072b71e684 100644 --- a/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/16036c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_16036c() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_16036c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_16036c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_16036c(); } diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl index 7963585509..558f3e3662 100644 --- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl +++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_1b71f0() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1b71f0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1b71f0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1b71f0(); } diff --git a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl index 3b1d91be0d..8fedb781ff 100644 --- a/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/1b71f0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_1b71f0() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1b71f0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1b71f0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1b71f0(); } diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl index 34ee0931c1..d2d2980ac6 100644 --- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl +++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_1d6c26() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1d6c26(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1d6c26(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1d6c26(); } diff --git a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl index c6b9da7d3a..1ca754c28d 100644 --- a/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/1d6c26.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_1d6c26() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1d6c26(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1d6c26(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1d6c26(); } diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl index 12af798b68..a30fbe0416 100644 --- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl +++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_1e9e39() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1e9e39(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1e9e39(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1e9e39(); } diff --git a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl index 84a7f69a13..938b1048a4 100644 --- a/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/1e9e39.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_1e9e39() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1e9e39(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1e9e39(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1e9e39(); } diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl index 8cde2faf48..0e4971756a 100644 --- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl +++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array) -> vec2 fn textureDimensions_1f20c5() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1f20c5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1f20c5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1f20c5(); } diff --git a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl index ca2cab1227..2cbde3e854 100644 --- a/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/1f20c5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_1f20c5() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_1f20c5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_1f20c5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_1f20c5(); } diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl index 4c1391f185..27c2d8a12b 100644 --- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl +++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_214dd4() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_214dd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_214dd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_214dd4(); } diff --git a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl index 7e96034535..a6e1919e1b 100644 --- a/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/214dd4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_214dd4() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_214dd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_214dd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_214dd4(); } diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl b/test/intrinsics/gen/textureDimensions/221f22.wgsl index c431bbd999..70098d7b63 100644 --- a/test/intrinsics/gen/textureDimensions/221f22.wgsl +++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array, level: i32) -> vec2 fn textureDimensions_221f22() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_221f22(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_221f22(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_221f22(); } diff --git a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl index 55707cdd7f..e05c6f5a2e 100644 --- a/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/221f22.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_221f22() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_221f22(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_221f22(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_221f22(); } diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl b/test/intrinsics/gen/textureDimensions/267788.wgsl index 36846b6a13..d431dc77f0 100644 --- a/test/intrinsics/gen/textureDimensions/267788.wgsl +++ b/test/intrinsics/gen/textureDimensions/267788.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array, level: i32) -> vec2 fn textureDimensions_267788() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_267788(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_267788(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_267788(); } diff --git a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl index baf7d3a624..99d3c54fe9 100644 --- a/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/267788.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_267788() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_267788(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_267788(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_267788(); } diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl index 7f84a66784..4100047e76 100644 --- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl +++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d, level: i32) -> vec3 fn textureDimensions_26bdfa() { var res: vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_26bdfa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_26bdfa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_26bdfa(); } diff --git a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl index 7a1e888306..5f9267e000 100644 --- a/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/26bdfa.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_26bdfa() { var res : vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_26bdfa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_26bdfa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_26bdfa(); } diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl index 310190dda8..ec36468153 100644 --- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl +++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_26ef6c() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_26ef6c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_26ef6c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_26ef6c(); } diff --git a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl index 99ebb20f33..960c66d5b8 100644 --- a/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/26ef6c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_26ef6c() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_26ef6c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_26ef6c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_26ef6c(); } diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl index 6dbbd7c5e6..74ab99e4e5 100644 --- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl +++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_2ad087() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2ad087(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2ad087(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2ad087(); } diff --git a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl index cf87608b43..c2b8327fa5 100644 --- a/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/2ad087.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_2ad087() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2ad087(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2ad087(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2ad087(); } diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl index 4752fc105c..b5da2061c3 100644 --- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl +++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d, level: i32) -> vec3 fn textureDimensions_2efa05() { var res: vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2efa05(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2efa05(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2efa05(); } diff --git a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl index faea123b49..0b9afd8376 100644 --- a/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/2efa05.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_2efa05() { var res : vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2efa05(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2efa05(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2efa05(); } diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl index ea31afdeda..0ac6e35bb9 100644 --- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl +++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_2f289f() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2f289f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2f289f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2f289f(); } diff --git a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl index 3157ff0412..7ffc030342 100644 --- a/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/2f289f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_2f289f() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2f289f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2f289f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2f289f(); } diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl index 5fe606eb9a..0bd62a0c66 100644 --- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl +++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d, level: i32) -> vec2 fn textureDimensions_2fe1cc() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2fe1cc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2fe1cc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2fe1cc(); } diff --git a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl index 38712921ca..4b03276e15 100644 --- a/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/2fe1cc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_2fe1cc() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_2fe1cc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_2fe1cc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_2fe1cc(); } diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl index 7227955f86..015839ceae 100644 --- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl +++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_318ecc() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_318ecc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_318ecc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_318ecc(); } diff --git a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl index cc92f6c78f..d1c53d49be 100644 --- a/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/318ecc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_318ecc() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_318ecc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_318ecc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_318ecc(); } diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl b/test/intrinsics/gen/textureDimensions/340d06.wgsl index 5f474472c3..71af9d0be3 100644 --- a/test/intrinsics/gen/textureDimensions/340d06.wgsl +++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_340d06() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_340d06(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_340d06(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_340d06(); } diff --git a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl index 5c15e76565..7ae21b4ce9 100644 --- a/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/340d06.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_340d06() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_340d06(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_340d06(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_340d06(); } diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl b/test/intrinsics/gen/textureDimensions/398e30.wgsl index f29525ada4..0bdd487a38 100644 --- a/test/intrinsics/gen/textureDimensions/398e30.wgsl +++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_398e30() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_398e30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_398e30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_398e30(); } diff --git a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl index 0b87c39405..457ff70cff 100644 --- a/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/398e30.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_398e30() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_398e30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_398e30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_398e30(); } diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl index 137c6501bb..eb60d1edbe 100644 --- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl +++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_3a94ea() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3a94ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3a94ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3a94ea(); } diff --git a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl index 57ea93e8e7..29d95790f2 100644 --- a/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/3a94ea.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_3a94ea() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3a94ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3a94ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3a94ea(); } diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl index edc753e7e2..3d96944139 100644 --- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl +++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_3aca08() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3aca08(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3aca08(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3aca08(); } diff --git a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl index 2645276b9f..ba8e34f7ca 100644 --- a/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/3aca08.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_3aca08() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3aca08(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3aca08(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3aca08(); } diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl index 92694795f9..e3837a8c72 100644 --- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl +++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_3c5ad8() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3c5ad8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3c5ad8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3c5ad8(); } diff --git a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl index 4df025d6ed..dc42b19d97 100644 --- a/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/3c5ad8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_3c5ad8() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_3c5ad8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_3c5ad8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_3c5ad8(); } diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl index adb9641746..f13d3ce789 100644 --- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl +++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array) -> vec2 fn textureDimensions_4152a6() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4152a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4152a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4152a6(); } diff --git a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl index b21bb80e3f..f9ec8d52a2 100644 --- a/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/4152a6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_4152a6() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4152a6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4152a6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4152a6(); } diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl b/test/intrinsics/gen/textureDimensions/423f99.wgsl index 1b37e7e016..d76008debb 100644 --- a/test/intrinsics/gen/textureDimensions/423f99.wgsl +++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d) -> i32 fn textureDimensions_423f99() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_423f99(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_423f99(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_423f99(); } diff --git a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl index bb1db6bd94..b84b03300c 100644 --- a/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/423f99.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_423f99() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_423f99(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_423f99(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_423f99(); } diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl index 159dff4d03..77143ecbab 100644 --- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl +++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_4267ee() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4267ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4267ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4267ee(); } diff --git a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl index b421e45a96..909269f2bc 100644 --- a/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/4267ee.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_4267ee() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4267ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4267ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4267ee(); } diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl index 0d81325bbd..8638394832 100644 --- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl +++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_42d4e6() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_42d4e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_42d4e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_42d4e6(); } diff --git a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl index 8269c4b3ca..bc98490a9e 100644 --- a/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/42d4e6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_42d4e6() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_42d4e6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_42d4e6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_42d4e6(); } diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl index c9273a3945..12414cd810 100644 --- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl +++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_48cb89() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_48cb89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_48cb89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_48cb89(); } diff --git a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl index 0aad3e79fa..cdc0578bd2 100644 --- a/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/48cb89.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_48cb89() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_48cb89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_48cb89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_48cb89(); } diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl b/test/intrinsics/gen/textureDimensions/49d274.wgsl index 6443529790..b4569f083f 100644 --- a/test/intrinsics/gen/textureDimensions/49d274.wgsl +++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_49d274() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_49d274(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_49d274(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_49d274(); } diff --git a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl index a265975b45..00ebf3628e 100644 --- a/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/49d274.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_49d274() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_49d274(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_49d274(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_49d274(); } diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl index e931a04523..5c8a80e24d 100644 --- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl +++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_4df9a8() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4df9a8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4df9a8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4df9a8(); } diff --git a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl index a4b1a79628..4078aa2b55 100644 --- a/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/4df9a8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_4df9a8() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_4df9a8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_4df9a8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_4df9a8(); } diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl index 67e2a6bc68..ab5dab132f 100644 --- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl +++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array, level: i32) -> vec2 fn textureDimensions_50a9ee() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_50a9ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_50a9ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_50a9ee(); } diff --git a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl index b8e312eefe..f6e1440830 100644 --- a/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/50a9ee.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_50a9ee() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_50a9ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_50a9ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_50a9ee(); } diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl b/test/intrinsics/gen/textureDimensions/52045c.wgsl index bf44ca6a6d..25dfd9d02b 100644 --- a/test/intrinsics/gen/textureDimensions/52045c.wgsl +++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d, level: i32) -> i32 fn textureDimensions_52045c() { var res: i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_52045c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_52045c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_52045c(); } diff --git a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl index a031fe44eb..9df7fc20d2 100644 --- a/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/52045c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_52045c() { var res : i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_52045c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_52045c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_52045c(); } diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl index e814f28579..182bd4f859 100644 --- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl +++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_55b23e() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_55b23e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_55b23e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_55b23e(); } diff --git a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl index ec3c9507be..32b929ccf5 100644 --- a/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/55b23e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_55b23e() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_55b23e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_55b23e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_55b23e(); } diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl b/test/intrinsics/gen/textureDimensions/579629.wgsl index a6bce4c105..3892c0a4ae 100644 --- a/test/intrinsics/gen/textureDimensions/579629.wgsl +++ b/test/intrinsics/gen/textureDimensions/579629.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureDimensions(texture: texture_multisampled_2d) -> vec2 fn textureDimensions_579629() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_579629(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_579629(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_579629(); } diff --git a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl index b3b0817cd7..e157439e3d 100644 --- a/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/579629.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureDimensions_579629() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_579629(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_579629(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_579629(); } diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl index e5b764e5b3..92e1e1a5b7 100644 --- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl +++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_57da0b() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_57da0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_57da0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_57da0b(); } diff --git a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl index 7d9bbff730..f05ee1cf65 100644 --- a/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/57da0b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_57da0b() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_57da0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_57da0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_57da0b(); } diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl index cabf1d2095..b0cf7ccde5 100644 --- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl +++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; +@group(1) @binding(0) var arg_0: texture_depth_cube; // fn textureDimensions(texture: texture_depth_cube) -> vec2 fn textureDimensions_57e28f() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_57e28f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_57e28f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_57e28f(); } diff --git a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl index 3c13313774..3d257471e3 100644 --- a/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/57e28f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; fn textureDimensions_57e28f() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_57e28f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_57e28f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_57e28f(); } diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl b/test/intrinsics/gen/textureDimensions/58a515.wgsl index 2444556a1a..9cbebcbfa4 100644 --- a/test/intrinsics/gen/textureDimensions/58a515.wgsl +++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_58a515() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_58a515(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_58a515(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_58a515(); } diff --git a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl index 28165700dc..c395b923f7 100644 --- a/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/58a515.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_58a515() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_58a515(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_58a515(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_58a515(); } diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl index 5b7caaad5f..9c37e5f674 100644 --- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl +++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_5985f3() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5985f3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5985f3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5985f3(); } diff --git a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl index 58c715bb4c..cc73d08dc7 100644 --- a/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/5985f3.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_5985f3() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5985f3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5985f3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5985f3(); } diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl index 310d15c02f..37017637eb 100644 --- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl +++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_5caa5e() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5caa5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5caa5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5caa5e(); } diff --git a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl index f53a80597c..3f834431a1 100644 --- a/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/5caa5e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_5caa5e() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5caa5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5caa5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5caa5e(); } diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl index 137a22019f..3e4cd1bdce 100644 --- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl +++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_5e295d() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5e295d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5e295d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5e295d(); } diff --git a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl index 3a032e6f0e..d8bceb6fec 100644 --- a/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/5e295d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_5e295d() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_5e295d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_5e295d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_5e295d(); } diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl index 13bc63ef7f..fd0c02b251 100644 --- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl +++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_60bf54() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_60bf54(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_60bf54(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_60bf54(); } diff --git a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl index 2e204799cf..f9347deb41 100644 --- a/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/60bf54.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_60bf54() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_60bf54(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_60bf54(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_60bf54(); } diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl index 2a23c47300..7cab4b85cf 100644 --- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl +++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_63f3cf() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_63f3cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_63f3cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_63f3cf(); } diff --git a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl index 8586c9865a..43e5f1573d 100644 --- a/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/63f3cf.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_63f3cf() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_63f3cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_63f3cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_63f3cf(); } diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl b/test/intrinsics/gen/textureDimensions/68105c.wgsl index e1486149d4..9e15d77034 100644 --- a/test/intrinsics/gen/textureDimensions/68105c.wgsl +++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_68105c() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_68105c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_68105c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_68105c(); } diff --git a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl index 07b857d4ec..853c631dc4 100644 --- a/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/68105c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_68105c() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_68105c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_68105c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_68105c(); } diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl index 28f3f1aecf..6ed1d53858 100644 --- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl +++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube, level: i32) -> vec2 fn textureDimensions_686ef2() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_686ef2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_686ef2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_686ef2(); } diff --git a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl index 2fcfe40403..ba69786d40 100644 --- a/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/686ef2.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_686ef2() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_686ef2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_686ef2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_686ef2(); } diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl index ba2b0e3724..f35d628e52 100644 --- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl +++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_6adac6() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6adac6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6adac6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6adac6(); } diff --git a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl index 126bf446c2..c48c479c52 100644 --- a/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/6adac6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_6adac6() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6adac6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6adac6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6adac6(); } diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl index 5c4e785a64..a8718fb7fc 100644 --- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl +++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d) -> vec3 fn textureDimensions_6ec1b4() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6ec1b4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6ec1b4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6ec1b4(); } diff --git a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl index db9a3ed870..6cc7cc1946 100644 --- a/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/6ec1b4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_6ec1b4() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6ec1b4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6ec1b4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6ec1b4(); } diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl index f17c87eeae..395a6e0c13 100644 --- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl +++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_6f0d79() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6f0d79(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6f0d79(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6f0d79(); } diff --git a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl index 046b26379c..7b1f32c816 100644 --- a/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/6f0d79.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_6f0d79() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_6f0d79(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_6f0d79(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_6f0d79(); } diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl b/test/intrinsics/gen/textureDimensions/702c53.wgsl index 75321d7fcb..401f1eaf95 100644 --- a/test/intrinsics/gen/textureDimensions/702c53.wgsl +++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_702c53() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_702c53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_702c53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_702c53(); } diff --git a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl index 484d6be9ab..27d3074777 100644 --- a/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/702c53.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_702c53() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_702c53(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_702c53(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_702c53(); } diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl index cdf8de1cee..309d93fd47 100644 --- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl +++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2 fn textureDimensions_72e5d6() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_72e5d6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_72e5d6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_72e5d6(); } diff --git a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl index 967f86aa26..b00bd04ce6 100644 --- a/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/72e5d6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureDimensions_72e5d6() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_72e5d6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_72e5d6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_72e5d6(); } diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl b/test/intrinsics/gen/textureDimensions/79df87.wgsl index 43b59bf8bb..4319d63e9f 100644 --- a/test/intrinsics/gen/textureDimensions/79df87.wgsl +++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d, level: i32) -> i32 fn textureDimensions_79df87() { var res: i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_79df87(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_79df87(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_79df87(); } diff --git a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl index d604e488ba..63b16bfca0 100644 --- a/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/79df87.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_79df87() { var res : i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_79df87(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_79df87(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_79df87(); } diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl index d32e46811a..5f5b47c712 100644 --- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl +++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn textureDimensions(texture: texture_depth_2d_array) -> vec2 fn textureDimensions_7bf826() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_7bf826(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_7bf826(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_7bf826(); } diff --git a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl index cf2686704c..50ddae7146 100644 --- a/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/7bf826.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureDimensions_7bf826() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_7bf826(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_7bf826(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_7bf826(); } diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl index 6a6865a3c1..f74769cbaa 100644 --- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl +++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_7f5c2e() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_7f5c2e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_7f5c2e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_7f5c2e(); } diff --git a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl index d85d35788e..0eecf68fd2 100644 --- a/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/7f5c2e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_7f5c2e() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_7f5c2e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_7f5c2e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_7f5c2e(); } diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl index 2f8952c461..ade160db90 100644 --- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl +++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_8028f3() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8028f3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8028f3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8028f3(); } diff --git a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl index 038913d801..7ad57279ae 100644 --- a/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/8028f3.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_8028f3() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8028f3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8028f3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8028f3(); } diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl b/test/intrinsics/gen/textureDimensions/811679.wgsl index 8fa0f143bf..70b9a6ca80 100644 --- a/test/intrinsics/gen/textureDimensions/811679.wgsl +++ b/test/intrinsics/gen/textureDimensions/811679.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_811679() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_811679(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_811679(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_811679(); } diff --git a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl index 25c0214683..154cddebb4 100644 --- a/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/811679.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_811679() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_811679(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_811679(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_811679(); } diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl b/test/intrinsics/gen/textureDimensions/820596.wgsl index f06ab5e457..f17caf070f 100644 --- a/test/intrinsics/gen/textureDimensions/820596.wgsl +++ b/test/intrinsics/gen/textureDimensions/820596.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_820596() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_820596(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_820596(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_820596(); } diff --git a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl index c448f30852..93106d5a90 100644 --- a/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/820596.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_820596() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_820596(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_820596(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_820596(); } diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl index caa919dbd5..ff1a2bbc3c 100644 --- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl +++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_83ee5a() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_83ee5a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_83ee5a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_83ee5a(); } diff --git a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl index fe3b5456e0..3481e3c102 100644 --- a/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/83ee5a.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_83ee5a() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_83ee5a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_83ee5a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_83ee5a(); } diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl b/test/intrinsics/gen/textureDimensions/85d556.wgsl index 565c566772..91d1ef85b1 100644 --- a/test/intrinsics/gen/textureDimensions/85d556.wgsl +++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array, level: i32) -> vec2 fn textureDimensions_85d556() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_85d556(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_85d556(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_85d556(); } diff --git a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl index 66fc1a852c..504544199b 100644 --- a/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/85d556.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_85d556() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_85d556(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_85d556(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_85d556(); } diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl index 867ebdee01..7d9e6a81af 100644 --- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl +++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube, level: i32) -> vec2 fn textureDimensions_88ad17() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_88ad17(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_88ad17(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_88ad17(); } diff --git a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl index b2cb3690bf..85f6381583 100644 --- a/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/88ad17.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_88ad17() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_88ad17(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_88ad17(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_88ad17(); } diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl index 90593b630d..abe1be423f 100644 --- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl +++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d) -> vec3 fn textureDimensions_8aa4c4() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8aa4c4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8aa4c4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8aa4c4(); } diff --git a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl index 787b378bc7..3a59eb68df 100644 --- a/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/8aa4c4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_8aa4c4() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8aa4c4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8aa4c4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8aa4c4(); } diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl index 3aefda0fc6..1e056c53aa 100644 --- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl +++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d) -> vec3 fn textureDimensions_8deb5e() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8deb5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8deb5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8deb5e(); } diff --git a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl index 9daad0cede..1f088c3858 100644 --- a/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/8deb5e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_8deb5e() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8deb5e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8deb5e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8deb5e(); } diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl index 87f2d27721..11b2d272c4 100644 --- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl +++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array) -> vec2 fn textureDimensions_8f20bf() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8f20bf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8f20bf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8f20bf(); } diff --git a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl index 4908444230..e299daf159 100644 --- a/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/8f20bf.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_8f20bf() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8f20bf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8f20bf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8f20bf(); } diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl index 336af29be2..e86c3933fb 100644 --- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl +++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_8fca0f() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8fca0f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8fca0f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8fca0f(); } diff --git a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl index eee587005c..4599b2e29a 100644 --- a/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/8fca0f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_8fca0f() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_8fca0f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_8fca0f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_8fca0f(); } diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl b/test/intrinsics/gen/textureDimensions/90340b.wgsl index 619bdb9aa4..3528ecf1fa 100644 --- a/test/intrinsics/gen/textureDimensions/90340b.wgsl +++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; // fn textureDimensions(texture: texture_depth_cube_array) -> vec2 fn textureDimensions_90340b() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_90340b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_90340b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_90340b(); } diff --git a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl index d8668d3967..2addbf1322 100644 --- a/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/90340b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; fn textureDimensions_90340b() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_90340b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_90340b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_90340b(); } diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl index 549dc910e6..6a02da1009 100644 --- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl +++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_9042ab() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9042ab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9042ab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9042ab(); } diff --git a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl index 49e1251068..a2d866661b 100644 --- a/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9042ab.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_9042ab() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9042ab(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9042ab(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9042ab(); } diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl index 0fd7903e75..0ce4834e88 100644 --- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl +++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; +@group(1) @binding(0) var arg_0: texture_depth_cube; // fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2 fn textureDimensions_9393b0() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9393b0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9393b0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9393b0(); } diff --git a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl index ddf6ecde2e..caacfdc0e9 100644 --- a/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9393b0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; fn textureDimensions_9393b0() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9393b0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9393b0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9393b0(); } diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl index 3e5b64df6e..d29eec0b43 100644 --- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl +++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; +@group(1) @binding(0) var arg_0: texture_depth_2d; // fn textureDimensions(texture: texture_depth_2d) -> vec2 fn textureDimensions_939fdb() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_939fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_939fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_939fdb(); } diff --git a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl index 3884061ebd..12cc53592c 100644 --- a/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/939fdb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureDimensions_939fdb() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_939fdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_939fdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_939fdb(); } diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl index 5ffeb6ebf5..8831eb6551 100644 --- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl +++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube) -> vec2 fn textureDimensions_962dcd() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_962dcd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_962dcd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_962dcd(); } diff --git a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl index e6edbf56cf..8c1d2563a5 100644 --- a/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/962dcd.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_962dcd() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_962dcd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_962dcd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_962dcd(); } diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl index 10553f9194..463f89781e 100644 --- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl +++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_9abfe5() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9abfe5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9abfe5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9abfe5(); } diff --git a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl index 82561993d9..fd979941fa 100644 --- a/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9abfe5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_9abfe5() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9abfe5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9abfe5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9abfe5(); } diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl index edd2e9edd6..62bdec3f07 100644 --- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl +++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array, level: i32) -> vec2 fn textureDimensions_9c9c57() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9c9c57(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9c9c57(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9c9c57(); } diff --git a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl index 4ee4826d28..ff8d3211e8 100644 --- a/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9c9c57.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_9c9c57() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9c9c57(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9c9c57(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9c9c57(); } diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl index 0493107c54..6c82fccd88 100644 --- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl +++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_9da9e2() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9da9e2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9da9e2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9da9e2(); } diff --git a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl index adf06c2f3b..3e1f941fcb 100644 --- a/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9da9e2.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_9da9e2() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9da9e2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9da9e2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9da9e2(); } diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl index 76733f78a2..09afe70352 100644 --- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl +++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_9eb8d8() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9eb8d8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9eb8d8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9eb8d8(); } diff --git a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl index d530b91070..58bc54ffae 100644 --- a/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9eb8d8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_9eb8d8() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9eb8d8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9eb8d8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9eb8d8(); } diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl index 6eb973a5a7..1892e828b5 100644 --- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl +++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d) -> vec2 fn textureDimensions_9f8e46() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9f8e46(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9f8e46(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9f8e46(); } diff --git a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl index b4eaffd540..df7b1a7e59 100644 --- a/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/9f8e46.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_9f8e46() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_9f8e46(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_9f8e46(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_9f8e46(); } diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl b/test/intrinsics/gen/textureDimensions/a01845.wgsl index 85a6007f91..3b7b1933ec 100644 --- a/test/intrinsics/gen/textureDimensions/a01845.wgsl +++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; // fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2 fn textureDimensions_a01845() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a01845(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a01845(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a01845(); } diff --git a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl index ab0f9eba14..9f7a0da832 100644 --- a/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/a01845.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; fn textureDimensions_a01845() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a01845(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a01845(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a01845(); } diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl index b571c6033e..88779cb226 100644 --- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl +++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d) -> i32 fn textureDimensions_a7d565() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a7d565(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a7d565(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a7d565(); } diff --git a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl index 73e5bfd688..4cd2c97081 100644 --- a/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/a7d565.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_a7d565() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a7d565(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a7d565(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a7d565(); } diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl index 8be9e9a2d1..61b668c79d 100644 --- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl +++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_a863f2() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a863f2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a863f2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a863f2(); } diff --git a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl index 820ab3b6c3..257be4e0f7 100644 --- a/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/a863f2.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_a863f2() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a863f2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a863f2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a863f2(); } diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl index a2f5e33c7f..e10dcd1f44 100644 --- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl +++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube, level: i32) -> vec2 fn textureDimensions_a9c9c1() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a9c9c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a9c9c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a9c9c1(); } diff --git a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl index 754fc3197c..e4125c9e17 100644 --- a/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/a9c9c1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_a9c9c1() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_a9c9c1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_a9c9c1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_a9c9c1(); } diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl index b4a35f03cf..a1cc174146 100644 --- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl +++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d, level: i32) -> vec2 fn textureDimensions_b0e16d() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b0e16d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b0e16d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b0e16d(); } diff --git a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl index 665a62b8ed..1bd9327c65 100644 --- a/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/b0e16d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_b0e16d() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b0e16d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b0e16d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b0e16d(); } diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl index 82f5c1f713..bdd81735af 100644 --- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl +++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube) -> vec2 fn textureDimensions_b3c954() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b3c954(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b3c954(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b3c954(); } diff --git a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl index 8f79cc096c..de3b872866 100644 --- a/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/b3c954.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_b3c954() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b3c954(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b3c954(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b3c954(); } diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl index e190837b43..8c7d95cb55 100644 --- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl +++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureDimensions(texture: texture_1d, level: i32) -> i32 fn textureDimensions_b3e407() { var res: i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b3e407(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b3e407(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b3e407(); } diff --git a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl index f39a1ad94b..8ebb58e84a 100644 --- a/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/b3e407.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureDimensions_b3e407() { var res : i32 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b3e407(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b3e407(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b3e407(); } diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl b/test/intrinsics/gen/textureDimensions/b91240.wgsl index e1f304cf0c..baf25910bd 100644 --- a/test/intrinsics/gen/textureDimensions/b91240.wgsl +++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_b91240() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b91240(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b91240(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b91240(); } diff --git a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl index 62d79c4fcc..105338f1c8 100644 --- a/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/b91240.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_b91240() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_b91240(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_b91240(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_b91240(); } diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl index c684259c02..c372ea12d7 100644 --- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl +++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_external; +@group(1) @binding(0) var arg_0: texture_external; // fn textureDimensions(texture: texture_external) -> vec2 fn textureDimensions_ba1481() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_ba1481(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_ba1481(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_ba1481(); } diff --git a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl index 2ea9581bfe..0bcf4af3de 100644 --- a/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/ba1481.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_external; +@group(1) @binding(0) var arg_0 : texture_external; fn textureDimensions_ba1481() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_ba1481(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_ba1481(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_ba1481(); } diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl index b284560014..5519317f4e 100644 --- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl +++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_bb3dde() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_bb3dde(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_bb3dde(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_bb3dde(); } diff --git a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl index 006743e657..005cae6f32 100644 --- a/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/bb3dde.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_bb3dde() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_bb3dde(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_bb3dde(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_bb3dde(); } diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl index 1cffed581f..275a7ca3d4 100644 --- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl +++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_c30e75() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_c30e75(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_c30e75(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_c30e75(); } diff --git a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl index a73590e0d8..ecf60b5c6b 100644 --- a/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/c30e75.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_c30e75() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_c30e75(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_c30e75(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_c30e75(); } diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl index 887906f5e7..98ad655a18 100644 --- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl +++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_c7943d() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_c7943d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_c7943d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_c7943d(); } diff --git a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl index fb7bb2bc48..d664f33756 100644 --- a/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/c7943d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_c7943d() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_c7943d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_c7943d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_c7943d(); } diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl index 9bdef45dad..2c32bb9896 100644 --- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl +++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_cc968c() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cc968c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cc968c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cc968c(); } diff --git a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl index 2fc8088a94..8198585683 100644 --- a/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cc968c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_cc968c() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cc968c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cc968c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cc968c(); } diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl index 887baef99d..71072cca40 100644 --- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl +++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_cccc8f() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cccc8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cccc8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cccc8f(); } diff --git a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl index 5d2c26df68..a4d44f0df9 100644 --- a/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cccc8f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_cccc8f() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cccc8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cccc8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cccc8f(); } diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl index b6bcb47065..79da9f10e1 100644 --- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl +++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_cd76a7() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cd76a7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cd76a7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cd76a7(); } diff --git a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl index 99d7eac38e..139070fb82 100644 --- a/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cd76a7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_cd76a7() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cd76a7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cd76a7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cd76a7(); } diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl index aad5966f37..25ceca33a0 100644 --- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl +++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_cdf473() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cdf473(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cdf473(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cdf473(); } diff --git a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl index 4b41e3c3f1..31373c0050 100644 --- a/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cdf473.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_cdf473() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cdf473(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cdf473(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cdf473(); } diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl b/test/intrinsics/gen/textureDimensions/cec841.wgsl index be24ab4ee7..0710769138 100644 --- a/test/intrinsics/gen/textureDimensions/cec841.wgsl +++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureDimensions(texture: texture_2d_array) -> vec2 fn textureDimensions_cec841() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cec841(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cec841(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cec841(); } diff --git a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl index 0ae00a7102..d1667a0f6d 100644 --- a/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cec841.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureDimensions_cec841() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cec841(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cec841(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cec841(); } diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl index e855d3fc57..2768ccea77 100644 --- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl +++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_cf7e43() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cf7e43(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cf7e43(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cf7e43(); } diff --git a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl index ea45fb6af6..fd5550b6bb 100644 --- a/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/cf7e43.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_cf7e43() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_cf7e43(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_cf7e43(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_cf7e43(); } diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl index 3f7648000c..e380cb25fc 100644 --- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl +++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureDimensions(texture: texture_cube) -> vec2 fn textureDimensions_d125bc() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_d125bc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_d125bc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_d125bc(); } diff --git a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl index e7de8ad104..e8b2c56e33 100644 --- a/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/d125bc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureDimensions_d125bc() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_d125bc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_d125bc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_d125bc(); } diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl index a15bcc559e..feec4d5b2a 100644 --- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl +++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array, level: i32) -> vec2 fn textureDimensions_d83c45() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_d83c45(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_d83c45(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_d83c45(); } diff --git a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl index 36e283fad0..4134f65c33 100644 --- a/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/d83c45.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_d83c45() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_d83c45(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_d83c45(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_d83c45(); } diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl index 0a934aa84f..5fe4ee1768 100644 --- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl +++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureDimensions(texture: texture_multisampled_2d) -> vec2 fn textureDimensions_daf7c0() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_daf7c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_daf7c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_daf7c0(); } diff --git a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl index 6660e211e3..6d2fbebf54 100644 --- a/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/daf7c0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureDimensions_daf7c0() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_daf7c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_daf7c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_daf7c0(); } diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl index 5bc63180e8..d9da1be565 100644 --- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl +++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureDimensions(texture: texture_storage_1d) -> i32 fn textureDimensions_dc2dd0() { var res: i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_dc2dd0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_dc2dd0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_dc2dd0(); } diff --git a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl index 311cfefeae..5151ae90a7 100644 --- a/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/dc2dd0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureDimensions_dc2dd0() { var res : i32 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_dc2dd0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_dc2dd0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_dc2dd0(); } diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl b/test/intrinsics/gen/textureDimensions/e927be.wgsl index cd3d11490d..38da82e243 100644 --- a/test/intrinsics/gen/textureDimensions/e927be.wgsl +++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureDimensions(texture: texture_cube_array) -> vec2 fn textureDimensions_e927be() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_e927be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_e927be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_e927be(); } diff --git a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl index 3fa38e7a57..637bad6a3b 100644 --- a/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/e927be.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureDimensions_e927be() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_e927be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_e927be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_e927be(); } diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl index 55fcd5f779..e2ae8ec98c 100644 --- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl +++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_e9e96c() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_e9e96c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_e9e96c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_e9e96c(); } diff --git a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl index 2a7e11bc92..0f84facc76 100644 --- a/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/e9e96c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_e9e96c() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_e9e96c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_e9e96c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_e9e96c(); } diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl index 2ee889a6ac..80750e30ed 100644 --- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl +++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureDimensions(texture: texture_multisampled_2d) -> vec2 fn textureDimensions_ef5b89() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_ef5b89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_ef5b89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_ef5b89(); } diff --git a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl index be6e29601a..f7589624bb 100644 --- a/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/ef5b89.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureDimensions_ef5b89() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_ef5b89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_ef5b89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_ef5b89(); } diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl index 121c855ab8..b7dc738a7c 100644 --- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl +++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureDimensions(texture: texture_3d, level: i32) -> vec3 fn textureDimensions_efc8a4() { var res: vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_efc8a4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_efc8a4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_efc8a4(); } diff --git a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl index 213bf04e2b..ba6f1dbf9d 100644 --- a/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/efc8a4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureDimensions_efc8a4() { var res : vec3 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_efc8a4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_efc8a4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_efc8a4(); } diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl index dd3c2da58b..13edf77e7b 100644 --- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl +++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d; // fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2 fn textureDimensions_f60bdb() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f60bdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f60bdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f60bdb(); } diff --git a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl index 9a0b4b56c2..04d24555c7 100644 --- a/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/f60bdb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureDimensions_f60bdb() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f60bdb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f60bdb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f60bdb(); } diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl index f0887c3fb9..f8da7e1078 100644 --- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl +++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d, level: i32) -> vec2 fn textureDimensions_f7145b() { var res: vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f7145b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f7145b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f7145b(); } diff --git a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl index 86aa13fa48..dd3335d8b2 100644 --- a/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/f7145b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_f7145b() { var res : vec2 = textureDimensions(arg_0, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f7145b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f7145b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f7145b(); } diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl index 5fdab3252d..aa29d977b6 100644 --- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl +++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureDimensions(texture: texture_storage_2d) -> vec2 fn textureDimensions_f931c7() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f931c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f931c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f931c7(); } diff --git a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl index caf7d5928b..14de15ab0c 100644 --- a/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/f931c7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureDimensions_f931c7() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_f931c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_f931c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_f931c7(); } diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl index 13815d7859..b6a1a04524 100644 --- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl +++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureDimensions(texture: texture_2d) -> vec2 fn textureDimensions_fa9859() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fa9859(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fa9859(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fa9859(); } diff --git a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl index 772b8b8b58..58b2bd0e55 100644 --- a/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/fa9859.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureDimensions_fa9859() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fa9859(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fa9859(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fa9859(); } diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl index a6b1d315b4..51515974dc 100644 --- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl +++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureDimensions(texture: texture_storage_2d_array) -> vec2 fn textureDimensions_fb5670() { var res: vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fb5670(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fb5670(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fb5670(); } diff --git a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl index e5d460d2a2..79fcdb8375 100644 --- a/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/fb5670.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureDimensions_fb5670() { var res : vec2 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fb5670(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fb5670(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fb5670(); } diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl index beaf94ce6e..6a3c215c7b 100644 --- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl +++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureDimensions(texture: texture_storage_3d) -> vec3 fn textureDimensions_fcac78() { var res: vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fcac78(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fcac78(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fcac78(); } diff --git a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl index 6b708dc56a..bd243ab9de 100644 --- a/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureDimensions/fcac78.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureDimensions_fcac78() { var res : vec3 = textureDimensions(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureDimensions_fcac78(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureDimensions_fcac78(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureDimensions_fcac78(); } diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl b/test/intrinsics/gen/textureGather/01305f.wgsl index 15f035c2bb..55af300885 100644 --- a/test/intrinsics/gen/textureGather/01305f.wgsl +++ b/test/intrinsics/gen/textureGather/01305f.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_01305f() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_01305f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_01305f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_01305f(); } diff --git a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl index da4c38f7a8..b683348097 100644 --- a/test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/01305f.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_01305f() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_01305f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_01305f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_01305f(); } diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl b/test/intrinsics/gen/textureGather/06030a.wgsl index 1e4204211c..3ae410647c 100644 --- a/test/intrinsics/gen/textureGather/06030a.wgsl +++ b/test/intrinsics/gen/textureGather/06030a.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> vec4 fn textureGather_06030a() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_06030a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_06030a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_06030a(); } diff --git a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl index 7faad626ca..6709ed63bc 100644 --- a/test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/06030a.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_06030a() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_06030a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_06030a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_06030a(); } diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl b/test/intrinsics/gen/textureGather/10c554.wgsl index d64a317c49..7abaa7f5fa 100644 --- a/test/intrinsics/gen/textureGather/10c554.wgsl +++ b/test/intrinsics/gen/textureGather/10c554.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_10c554() { var res: vec4 = textureGather(arg_0, arg_1, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_10c554(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_10c554(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_10c554(); } diff --git a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl index 748e379f39..71d449e971 100644 --- a/test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/10c554.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_10c554() { var res : vec4 = textureGather(arg_0, arg_1, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_10c554(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_10c554(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_10c554(); } diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl b/test/intrinsics/gen/textureGather/15d79c.wgsl index 55c4e46d0d..47bc2dad95 100644 --- a/test/intrinsics/gen/textureGather/15d79c.wgsl +++ b/test/intrinsics/gen/textureGather/15d79c.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2, offset: vec2) -> vec4 fn textureGather_15d79c() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_15d79c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_15d79c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_15d79c(); } diff --git a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl index 53190460ab..14d9203b1a 100644 --- a/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/15d79c.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_15d79c() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_15d79c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_15d79c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_15d79c(); } diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl b/test/intrinsics/gen/textureGather/2e0ed5.wgsl index c8c1104310..ff561c9adc 100644 --- a/test/intrinsics/gen/textureGather/2e0ed5.wgsl +++ b/test/intrinsics/gen/textureGather/2e0ed5.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_2e0ed5() { var res: vec4 = textureGather(arg_0, arg_1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_2e0ed5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_2e0ed5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_2e0ed5(); } diff --git a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl index 3439a780e9..f3b60b86e5 100644 --- a/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/2e0ed5.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_2e0ed5() { var res : vec4 = textureGather(arg_0, arg_1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_2e0ed5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_2e0ed5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_2e0ed5(); } diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl b/test/intrinsics/gen/textureGather/3112e8.wgsl index e556b3031f..a08ae70d6b 100644 --- a/test/intrinsics/gen/textureGather/3112e8.wgsl +++ b/test/intrinsics/gen/textureGather/3112e8.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_3112e8() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_3112e8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_3112e8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_3112e8(); } diff --git a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl index 5b0bd78a76..3f7ac9ee8a 100644 --- a/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/3112e8.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube_array; +@group(1) @binding(1) var arg_1 : texture_cube_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_3112e8() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_3112e8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_3112e8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_3112e8(); } diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl b/test/intrinsics/gen/textureGather/3c527e.wgsl index 1877c388df..f6f8f6765c 100644 --- a/test/intrinsics/gen/textureGather/3c527e.wgsl +++ b/test/intrinsics/gen/textureGather/3c527e.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_3c527e() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_3c527e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_3c527e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_3c527e(); } diff --git a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl index 4aeb58735e..9753db49b7 100644 --- a/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/3c527e.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube_array; +@group(1) @binding(1) var arg_1 : texture_cube_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_3c527e() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_3c527e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_3c527e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_3c527e(); } diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl b/test/intrinsics/gen/textureGather/43025d.wgsl index 219cd0a029..2cf28ef7e5 100644 --- a/test/intrinsics/gen/textureGather/43025d.wgsl +++ b/test/intrinsics/gen/textureGather/43025d.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_43025d() { var res: vec4 = textureGather(arg_0, arg_1, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_43025d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_43025d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_43025d(); } diff --git a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl index 121a1da4fa..f94fa457a6 100644 --- a/test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/43025d.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_43025d() { var res : vec4 = textureGather(arg_0, arg_1, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_43025d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_43025d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_43025d(); } diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl b/test/intrinsics/gen/textureGather/4f2350.wgsl index 296c243ef4..69459680a2 100644 --- a/test/intrinsics/gen/textureGather/4f2350.wgsl +++ b/test/intrinsics/gen/textureGather/4f2350.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> vec4 fn textureGather_4f2350() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_4f2350(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_4f2350(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_4f2350(); } diff --git a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl index 4dade7f9aa..75a6912f6a 100644 --- a/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/4f2350.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_4f2350() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_4f2350(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_4f2350(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_4f2350(); } diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl b/test/intrinsics/gen/textureGather/51cf0b.wgsl index 349aaa6444..6e503ce049 100644 --- a/test/intrinsics/gen/textureGather/51cf0b.wgsl +++ b/test/intrinsics/gen/textureGather/51cf0b.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_51cf0b() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_51cf0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_51cf0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_51cf0b(); } diff --git a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl index d14de6e9be..e326e20388 100644 --- a/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/51cf0b.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_51cf0b() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_51cf0b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_51cf0b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_51cf0b(); } diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl b/test/intrinsics/gen/textureGather/53ece6.wgsl index b2184965b8..045f2ba30b 100644 --- a/test/intrinsics/gen/textureGather/53ece6.wgsl +++ b/test/intrinsics/gen/textureGather/53ece6.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> vec4 fn textureGather_53ece6() { var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_53ece6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_53ece6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_53ece6(); } diff --git a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl index 8cf894a8c9..27c47cfc4d 100644 --- a/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/53ece6.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_53ece6() { var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_53ece6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_53ece6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_53ece6(); } diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl b/test/intrinsics/gen/textureGather/57bfc6.wgsl index 27ab26671b..daf1cc0371 100644 --- a/test/intrinsics/gen/textureGather/57bfc6.wgsl +++ b/test/intrinsics/gen/textureGather/57bfc6.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_57bfc6() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_57bfc6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_57bfc6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_57bfc6(); } diff --git a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl index 5be66ca9c9..8273199c8e 100644 --- a/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/57bfc6.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube; +@group(1) @binding(1) var arg_1 : texture_cube; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_57bfc6() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_57bfc6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_57bfc6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_57bfc6(); } diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl b/test/intrinsics/gen/textureGather/587ba3.wgsl index ac9a29220d..5bc617cfe0 100644 --- a/test/intrinsics/gen/textureGather/587ba3.wgsl +++ b/test/intrinsics/gen/textureGather/587ba3.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_587ba3() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_587ba3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_587ba3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_587ba3(); } diff --git a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl index 8ef9c1ff7f..d906b0b34b 100644 --- a/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/587ba3.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_587ba3() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_587ba3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_587ba3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_587ba3(); } diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl b/test/intrinsics/gen/textureGather/69e0fb.wgsl index d8c23765d4..3d4a9fae3f 100644 --- a/test/intrinsics/gen/textureGather/69e0fb.wgsl +++ b/test/intrinsics/gen/textureGather/69e0fb.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2, offset: vec2) -> vec4 fn textureGather_69e0fb() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_69e0fb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_69e0fb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_69e0fb(); } diff --git a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl index 21d5efd94d..a23c38fa43 100644 --- a/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/69e0fb.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_69e0fb() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_69e0fb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_69e0fb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_69e0fb(); } diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl b/test/intrinsics/gen/textureGather/93003d.wgsl index fcbedcb3c6..c194b51c4f 100644 --- a/test/intrinsics/gen/textureGather/93003d.wgsl +++ b/test/intrinsics/gen/textureGather/93003d.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2, offset: vec2) -> vec4 fn textureGather_93003d() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_93003d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_93003d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_93003d(); } diff --git a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl index 64c3ad0e4f..c4adea5eea 100644 --- a/test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/93003d.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_93003d() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_93003d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_93003d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_93003d(); } diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl b/test/intrinsics/gen/textureGather/9a6358.wgsl index 7b84b028c9..0aff04cb26 100644 --- a/test/intrinsics/gen/textureGather/9a6358.wgsl +++ b/test/intrinsics/gen/textureGather/9a6358.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_9a6358() { var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_9a6358(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_9a6358(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_9a6358(); } diff --git a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl index 9721e3a122..984ff98743 100644 --- a/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/9a6358.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_9a6358() { var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_9a6358(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_9a6358(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_9a6358(); } diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl b/test/intrinsics/gen/textureGather/9efca2.wgsl index 2008c2edd0..d1fd63fbfb 100644 --- a/test/intrinsics/gen/textureGather/9efca2.wgsl +++ b/test/intrinsics/gen/textureGather/9efca2.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_9efca2() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_9efca2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_9efca2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_9efca2(); } diff --git a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl index 07113dd043..c9774286eb 100644 --- a/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/9efca2.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_9efca2() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_9efca2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_9efca2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_9efca2(); } diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl b/test/intrinsics/gen/textureGather/bd0b1e.wgsl index 9b5982417e..e7bf959804 100644 --- a/test/intrinsics/gen/textureGather/bd0b1e.wgsl +++ b/test/intrinsics/gen/textureGather/bd0b1e.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_bd0b1e() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_bd0b1e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_bd0b1e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_bd0b1e(); } diff --git a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl index 6094dd2c6c..c4f05ce89f 100644 --- a/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/bd0b1e.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_bd0b1e() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_bd0b1e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_bd0b1e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_bd0b1e(); } diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl b/test/intrinsics/gen/textureGather/c409ae.wgsl index 95088b0015..8778bb7f46 100644 --- a/test/intrinsics/gen/textureGather/c409ae.wgsl +++ b/test/intrinsics/gen/textureGather/c409ae.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2, offset: vec2) -> vec4 fn textureGather_c409ae() { var res: vec4 = textureGather(arg_0, arg_1, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_c409ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_c409ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_c409ae(); } diff --git a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl index 88bc15d494..3610a5df80 100644 --- a/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/c409ae.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureGather_c409ae() { var res : vec4 = textureGather(arg_0, arg_1, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_c409ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_c409ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_c409ae(); } diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl b/test/intrinsics/gen/textureGather/c55822.wgsl index e91568d734..9cedd5927b 100644 --- a/test/intrinsics/gen/textureGather/c55822.wgsl +++ b/test/intrinsics/gen/textureGather/c55822.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_c55822() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_c55822(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_c55822(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_c55822(); } diff --git a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl index 58bbb428b6..261b01b039 100644 --- a/test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/c55822.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube_array; +@group(1) @binding(1) var arg_1 : texture_cube_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_c55822() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_c55822(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_c55822(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_c55822(); } diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl b/test/intrinsics/gen/textureGather/e1b67d.wgsl index d24347414c..ac8f15ae9a 100644 --- a/test/intrinsics/gen/textureGather/e1b67d.wgsl +++ b/test/intrinsics/gen/textureGather/e1b67d.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_e1b67d() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_e1b67d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_e1b67d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_e1b67d(); } diff --git a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl index 125d649b09..4f60ac795e 100644 --- a/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/e1b67d.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube; +@group(1) @binding(1) var arg_1 : texture_cube; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_e1b67d() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_e1b67d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_e1b67d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_e1b67d(); } diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl b/test/intrinsics/gen/textureGather/e9eff6.wgsl index 02702a4a16..b0477f985f 100644 --- a/test/intrinsics/gen/textureGather/e9eff6.wgsl +++ b/test/intrinsics/gen/textureGather/e9eff6.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_e9eff6() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_e9eff6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_e9eff6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_e9eff6(); } diff --git a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl index 1f11f53e43..708a011d5c 100644 --- a/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/e9eff6.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d; +@group(1) @binding(1) var arg_1 : texture_2d; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_e9eff6() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_e9eff6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_e9eff6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_e9eff6(); } diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl b/test/intrinsics/gen/textureGather/f5f3ba.wgsl index 9b998b49ad..f2632569db 100644 --- a/test/intrinsics/gen/textureGather/f5f3ba.wgsl +++ b/test/intrinsics/gen/textureGather/f5f3ba.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_2d_array; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_2d_array; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> vec4 fn textureGather_f5f3ba() { var res: vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_f5f3ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_f5f3ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_f5f3ba(); } diff --git a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl index 0505f50073..b5ddcdc14f 100644 --- a/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/f5f3ba.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_2d_array; +@group(1) @binding(1) var arg_1 : texture_2d_array; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_f5f3ba() { var res : vec4 = textureGather(1, arg_1, arg_2, vec2(), 1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_f5f3ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_f5f3ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_f5f3ba(); } diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl b/test/intrinsics/gen/textureGather/f7995a.wgsl index b4f7aacb95..19c42fc5a2 100644 --- a/test/intrinsics/gen/textureGather/f7995a.wgsl +++ b/test/intrinsics/gen/textureGather/f7995a.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(1)]] var arg_1: texture_cube; -[[group(1), binding(2)]] var arg_2: sampler; +@group(1) @binding(1) var arg_1: texture_cube; +@group(1) @binding(2) var arg_2: sampler; // fn textureGather(component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_f7995a() { var res: vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_f7995a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_f7995a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_f7995a(); } diff --git a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl b/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl index 273f5992ea..59c890e172 100644 --- a/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGather/f7995a.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(1)]] var arg_1 : texture_cube; +@group(1) @binding(1) var arg_1 : texture_cube; -[[group(1), binding(2)]] var arg_2 : sampler; +@group(1) @binding(2) var arg_2 : sampler; fn textureGather_f7995a() { var res : vec4 = textureGather(1, arg_1, arg_2, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGather_f7995a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGather_f7995a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGather_f7995a(); } diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl b/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl index 732eb5a1d1..afaaa84fa8 100644 --- a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> vec4 fn textureGatherCompare_182fd4() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_182fd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_182fd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_182fd4(); } diff --git a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl index f04178c4b3..3a4d029793 100644 --- a/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/182fd4.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_182fd4() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_182fd4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_182fd4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_182fd4(); } diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl b/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl index fcb9b53a8a..53ed423d13 100644 --- a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_60d2d1() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_60d2d1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_60d2d1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_60d2d1(); } diff --git a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl index 005cc8df8a..e22b1fc91a 100644 --- a/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/60d2d1.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_60d2d1() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_60d2d1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_60d2d1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_60d2d1(); } diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl b/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl index 16611ce456..5a577ba54f 100644 --- a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> vec4 fn textureGatherCompare_6d9352() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_6d9352(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_6d9352(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_6d9352(); } diff --git a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl index de6fa2c104..6fc40cef35 100644 --- a/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/6d9352.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_6d9352() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_6d9352(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_6d9352(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_6d9352(); } diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl b/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl index b2eb4b74a6..c71a6996c1 100644 --- a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, offset: vec2) -> vec4 fn textureGatherCompare_6f1267() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_6f1267(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_6f1267(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_6f1267(); } diff --git a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl index 096891c3a6..19e782d584 100644 --- a/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/6f1267.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_6f1267() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_6f1267(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_6f1267(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_6f1267(); } diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl b/test/intrinsics/gen/textureGatherCompare/783e65.wgsl index f10cee1ec3..8bd4779d57 100644 --- a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/783e65.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_783e65() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_783e65(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_783e65(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_783e65(); } diff --git a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl index 0ee58ce97a..9800261052 100644 --- a/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/783e65.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_783e65() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_783e65(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_783e65(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_783e65(); } diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl b/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl index 803c4f16aa..b8a27188f5 100644 --- a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, offset: vec2) -> vec4 fn textureGatherCompare_a5f587() { var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_a5f587(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_a5f587(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_a5f587(); } diff --git a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl b/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl index 95903269f1..44b3cf1515 100644 --- a/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureGatherCompare/a5f587.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_a5f587() { var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureGatherCompare_a5f587(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureGatherCompare_a5f587(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureGatherCompare_a5f587(); } diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl b/test/intrinsics/gen/textureLoad/19cf87.wgsl index d65003117b..609ce46ae8 100644 --- a/test/intrinsics/gen/textureLoad/19cf87.wgsl +++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; +@group(1) @binding(0) var arg_0: texture_depth_2d; // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: i32) -> f32 fn textureLoad_19cf87() { var res: f32 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_19cf87(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_19cf87(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_19cf87(); } diff --git a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl index ec9ae1e24b..886136a295 100644 --- a/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/19cf87.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_19cf87() { var res : f32 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_19cf87(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_19cf87(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_19cf87(); } diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl b/test/intrinsics/gen/textureLoad/1b8588.wgsl index 3801d853b8..80a4cae5de 100644 --- a/test/intrinsics/gen/textureLoad/1b8588.wgsl +++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureLoad(texture: texture_1d, coords: i32, level: i32) -> vec4 fn textureLoad_1b8588() { var res: vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_1b8588(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_1b8588(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_1b8588(); } diff --git a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl index 58a627ca59..07481f8864 100644 --- a/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/1b8588.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureLoad_1b8588() { var res : vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_1b8588(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_1b8588(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_1b8588(); } diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl b/test/intrinsics/gen/textureLoad/1f2016.wgsl index c95d6d10f6..9e3a286bd5 100644 --- a/test/intrinsics/gen/textureLoad/1f2016.wgsl +++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_1f2016() { var res: vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_1f2016(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_1f2016(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_1f2016(); } diff --git a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl index 70c8e6278a..910f641da9 100644 --- a/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/1f2016.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_1f2016() { var res : vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_1f2016(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_1f2016(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_1f2016(); } diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl b/test/intrinsics/gen/textureLoad/484344.wgsl index 37b5a5fb8e..920d8e06b6 100644 --- a/test/intrinsics/gen/textureLoad/484344.wgsl +++ b/test/intrinsics/gen/textureLoad/484344.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_484344() { var res: vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_484344(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_484344(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_484344(); } diff --git a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl index d198e1e0c9..e87d195f49 100644 --- a/test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/484344.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_484344() { var res : vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_484344(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_484344(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_484344(); } diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl b/test/intrinsics/gen/textureLoad/4fd803.wgsl index bde90c7acc..d309c2b7d1 100644 --- a/test/intrinsics/gen/textureLoad/4fd803.wgsl +++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_4fd803() { var res: vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_4fd803(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_4fd803(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_4fd803(); } diff --git a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl index 08653d9b85..c4f10d680a 100644 --- a/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/4fd803.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_4fd803() { var res : vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_4fd803(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_4fd803(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_4fd803(); } diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl index 5fd2dccaf6..5f19cb5d05 100644 --- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl +++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureLoad(texture: texture_1d, coords: i32, level: i32) -> vec4 fn textureLoad_5a2f9d() { var res: vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_5a2f9d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_5a2f9d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_5a2f9d(); } diff --git a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl index ecaf9a0fad..3e020592bf 100644 --- a/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/5a2f9d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureLoad_5a2f9d() { var res : vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_5a2f9d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_5a2f9d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_5a2f9d(); } diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl b/test/intrinsics/gen/textureLoad/6154d4.wgsl index 5786c34ac6..ba6d63319f 100644 --- a/test/intrinsics/gen/textureLoad/6154d4.wgsl +++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_6154d4() { var res: vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_6154d4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_6154d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_6154d4(); } diff --git a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl index 64e28d75d8..811bfc69ca 100644 --- a/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/6154d4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_6154d4() { var res : vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_6154d4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_6154d4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_6154d4(); } diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl b/test/intrinsics/gen/textureLoad/6273b1.wgsl index 600fb453dd..944e5a328a 100644 --- a/test/intrinsics/gen/textureLoad/6273b1.wgsl +++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d; // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: i32) -> f32 fn textureLoad_6273b1() { var res: f32 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_6273b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_6273b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_6273b1(); } diff --git a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl index 9d21c59327..ec3f25bde9 100644 --- a/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/6273b1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6273b1() { var res : f32 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_6273b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_6273b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_6273b1(); } diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl b/test/intrinsics/gen/textureLoad/79e697.wgsl index 3ce2841e08..4ed308ec18 100644 --- a/test/intrinsics/gen/textureLoad/79e697.wgsl +++ b/test/intrinsics/gen/textureLoad/79e697.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_79e697() { var res: vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_79e697(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_79e697(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_79e697(); } diff --git a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl index f93cbe07dd..3e269171cd 100644 --- a/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/79e697.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_79e697() { var res : vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_79e697(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_79e697(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_79e697(); } diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl index 3207c052e4..29da0dc24b 100644 --- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl +++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_7c90e5() { var res: vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_7c90e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_7c90e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_7c90e5(); } diff --git a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl index 779b955604..3308f0f6c1 100644 --- a/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/7c90e5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_7c90e5() { var res : vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_7c90e5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_7c90e5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_7c90e5(); } diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl b/test/intrinsics/gen/textureLoad/81c381.wgsl index 4c156c61d7..dccf1b8f2c 100644 --- a/test/intrinsics/gen/textureLoad/81c381.wgsl +++ b/test/intrinsics/gen/textureLoad/81c381.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureLoad(texture: texture_1d, coords: i32, level: i32) -> vec4 fn textureLoad_81c381() { var res: vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_81c381(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_81c381(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_81c381(); } diff --git a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl index 06588639c8..7671a385e0 100644 --- a/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/81c381.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureLoad_81c381() { var res : vec4 = textureLoad(arg_0, 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_81c381(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_81c381(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_81c381(); } diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl b/test/intrinsics/gen/textureLoad/87be85.wgsl index 39366e5f33..b1124d7ad2 100644 --- a/test/intrinsics/gen/textureLoad/87be85.wgsl +++ b/test/intrinsics/gen/textureLoad/87be85.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_87be85() { var res: vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_87be85(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_87be85(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_87be85(); } diff --git a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl index 4543559295..febe014343 100644 --- a/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/87be85.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_87be85() { var res : vec4 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_87be85(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_87be85(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_87be85(); } diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl b/test/intrinsics/gen/textureLoad/8acf41.wgsl index b19c731b5c..effdecdc3b 100644 --- a/test/intrinsics/gen/textureLoad/8acf41.wgsl +++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_external; +@group(1) @binding(0) var arg_0: texture_external; // fn textureLoad(texture: texture_external, coords: vec2) -> vec4 fn textureLoad_8acf41() { var res: vec4 = textureLoad(arg_0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_8acf41(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_8acf41(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_8acf41(); } diff --git a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl index 769efb3533..a25ef5f1a1 100644 --- a/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/8acf41.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_external; +@group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_8acf41() { var res : vec4 = textureLoad(arg_0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_8acf41(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_8acf41(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_8acf41(); } diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl b/test/intrinsics/gen/textureLoad/9b2667.wgsl index 0e09fa448a..4372cdb61a 100644 --- a/test/intrinsics/gen/textureLoad/9b2667.wgsl +++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: i32) -> f32 fn textureLoad_9b2667() { var res: f32 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_9b2667(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_9b2667(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_9b2667(); } diff --git a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl index 271bb61e48..5d857d05c0 100644 --- a/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/9b2667.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_9b2667() { var res : f32 = textureLoad(arg_0, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_9b2667(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_9b2667(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_9b2667(); } diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl b/test/intrinsics/gen/textureLoad/a583c9.wgsl index 39adb02725..5f67c51324 100644 --- a/test/intrinsics/gen/textureLoad/a583c9.wgsl +++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_a583c9() { var res: vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_a583c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_a583c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_a583c9(); } diff --git a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl index 0ffac21078..1b4fb0f27b 100644 --- a/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/a583c9.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_a583c9() { var res : vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_a583c9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_a583c9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_a583c9(); } diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl index 58ebcd21cb..236927bb72 100644 --- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl +++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_a9a9f5() { var res: vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_a9a9f5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_a9a9f5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_a9a9f5(); } diff --git a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl index 0a21560e6d..ac36fdc9d3 100644 --- a/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/a9a9f5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_a9a9f5() { var res : vec4 = textureLoad(arg_0, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_a9a9f5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_a9a9f5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_a9a9f5(); } diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl b/test/intrinsics/gen/textureLoad/c2a480.wgsl index f9149e74f5..6aa17f76b0 100644 --- a/test/intrinsics/gen/textureLoad/c2a480.wgsl +++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_c2a480() { var res: vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_c2a480(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_c2a480(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_c2a480(); } diff --git a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl index e8cee3fe10..ce9e2c7c7f 100644 --- a/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/c2a480.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_c2a480() { var res : vec4 = textureLoad(arg_0, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_c2a480(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_c2a480(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_c2a480(); } diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl b/test/intrinsics/gen/textureLoad/c378ee.wgsl index 7a31013826..2ddc52a5a2 100644 --- a/test/intrinsics/gen/textureLoad/c378ee.wgsl +++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_c378ee() { var res: vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_c378ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_c378ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_c378ee(); } diff --git a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl index 0a7ba1a727..d47f7562f0 100644 --- a/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/c378ee.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_c378ee() { var res : vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_c378ee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_c378ee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_c378ee(); } diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl index 3450bb647a..65b9d1756f 100644 --- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl +++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_e3d2cc() { var res: vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_e3d2cc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_e3d2cc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_e3d2cc(); } diff --git a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl index b77d03726e..f8a1af7a91 100644 --- a/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureLoad/e3d2cc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_e3d2cc() { var res : vec4 = textureLoad(arg_0, vec2(), 1); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureLoad_e3d2cc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureLoad_e3d2cc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureLoad_e3d2cc(); } diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl b/test/intrinsics/gen/textureNumLayers/024820.wgsl index c8b519d996..e0ad9de094 100644 --- a/test/intrinsics/gen/textureNumLayers/024820.wgsl +++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLayers(texture: texture_2d_array) -> i32 fn textureNumLayers_024820() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_024820(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_024820(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_024820(); } diff --git a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl index 7725c8ac5b..f58c93cef4 100644 --- a/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/024820.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLayers_024820() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_024820(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_024820(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_024820(); } diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl index b8913bee04..dcb5cf3e63 100644 --- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl +++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLayers(texture: texture_cube_array) -> i32 fn textureNumLayers_053df7() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_053df7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_053df7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_053df7(); } diff --git a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl index 3184b30c97..fae44b9a2b 100644 --- a/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/053df7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLayers_053df7() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_053df7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_053df7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_053df7(); } diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl index e8845622c3..189755949d 100644 --- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl +++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_058cc3() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_058cc3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_058cc3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_058cc3(); } diff --git a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl index 6f96e170a9..ee5d2e0686 100644 --- a/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/058cc3.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_058cc3() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_058cc3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_058cc3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_058cc3(); } diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl index bdf8cfe0bb..e39514f853 100644 --- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl +++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_09d05d() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_09d05d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_09d05d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_09d05d(); } diff --git a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl index db04a65ddc..2034fa4019 100644 --- a/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/09d05d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_09d05d() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_09d05d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_09d05d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_09d05d(); } diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl index 31fc91a081..f6361f1d70 100644 --- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl +++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_13b4ce() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_13b4ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_13b4ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_13b4ce(); } diff --git a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl index 2314463ae7..5061e7e950 100644 --- a/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/13b4ce.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_13b4ce() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_13b4ce(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_13b4ce(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_13b4ce(); } diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl index 4c830ac00d..c9101c081a 100644 --- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl +++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_22e53b() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_22e53b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_22e53b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_22e53b(); } diff --git a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl index f407b3fa32..6d9957b55d 100644 --- a/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/22e53b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_22e53b() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_22e53b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_22e53b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_22e53b(); } diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl b/test/intrinsics/gen/textureNumLayers/562013.wgsl index 764c381eb6..18c77ad104 100644 --- a/test/intrinsics/gen/textureNumLayers/562013.wgsl +++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_562013() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_562013(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_562013(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_562013(); } diff --git a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl index c34ef1c50e..72231707de 100644 --- a/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/562013.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_562013() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_562013(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_562013(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_562013(); } diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl index 201defd20f..2a0f4de9cc 100644 --- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl +++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLayers(texture: texture_cube_array) -> i32 fn textureNumLayers_5d59cd() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_5d59cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_5d59cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_5d59cd(); } diff --git a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl index 57e2cf6bb7..170c76310d 100644 --- a/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/5d59cd.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLayers_5d59cd() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_5d59cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_5d59cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_5d59cd(); } diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl index 2832cf4870..f551fc2b36 100644 --- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl +++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_68a65b() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_68a65b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_68a65b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_68a65b(); } diff --git a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl index 4aad50abeb..f358993084 100644 --- a/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/68a65b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_68a65b() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_68a65b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_68a65b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_68a65b(); } diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl index 4ca7348be7..ec88c84026 100644 --- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl +++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; // fn textureNumLayers(texture: texture_depth_cube_array) -> i32 fn textureNumLayers_778bd1() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_778bd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_778bd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_778bd1(); } diff --git a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl index d71f24bb33..c13e994169 100644 --- a/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/778bd1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; fn textureNumLayers_778bd1() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_778bd1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_778bd1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_778bd1(); } diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl index 581a2db918..7652201627 100644 --- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl +++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_7f1937() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_7f1937(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_7f1937(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_7f1937(); } diff --git a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl index 279ac3c30e..4450cebde7 100644 --- a/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/7f1937.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_7f1937() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_7f1937(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_7f1937(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_7f1937(); } diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl index 7f2e7ea462..c91c09d417 100644 --- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl +++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLayers(texture: texture_cube_array) -> i32 fn textureNumLayers_85f980() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_85f980(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_85f980(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_85f980(); } diff --git a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl index b7e09af029..4dc70c7371 100644 --- a/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/85f980.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLayers_85f980() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_85f980(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_85f980(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_85f980(); } diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl index 249897c193..d4b3e5acc7 100644 --- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl +++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLayers(texture: texture_2d_array) -> i32 fn textureNumLayers_87953e() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_87953e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_87953e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_87953e(); } diff --git a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl index 49b2809d5e..26f73eaa53 100644 --- a/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/87953e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLayers_87953e() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_87953e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_87953e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_87953e(); } diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl index 0f09f81973..b00bdbd9b6 100644 --- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl +++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLayers(texture: texture_2d_array) -> i32 fn textureNumLayers_893e7c() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_893e7c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_893e7c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_893e7c(); } diff --git a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl index 3e73652f31..3cda54612f 100644 --- a/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/893e7c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLayers_893e7c() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_893e7c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_893e7c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_893e7c(); } diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl index 0bc05ecf01..474b691e83 100644 --- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl +++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_9700fb() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_9700fb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_9700fb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_9700fb(); } diff --git a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl index 21c77a5053..ce6acab433 100644 --- a/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/9700fb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_9700fb() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_9700fb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_9700fb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_9700fb(); } diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl index 155ad2756e..f64da9ead0 100644 --- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl +++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_a216d2() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_a216d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_a216d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_a216d2(); } diff --git a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl index 48e65b1034..38fbc8960b 100644 --- a/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/a216d2.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_a216d2() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_a216d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_a216d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_a216d2(); } diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl index c7fd877e47..3756b005eb 100644 --- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl +++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_cd5dc8() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_cd5dc8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_cd5dc8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_cd5dc8(); } diff --git a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl index 05e08ffb38..870778b6dd 100644 --- a/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/cd5dc8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_cd5dc8() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_cd5dc8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_cd5dc8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_cd5dc8(); } diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl index 3426387422..ccc1d48a27 100644 --- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl +++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_d5b228() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_d5b228(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_d5b228(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_d5b228(); } diff --git a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl index 8cce42ac7d..798b0a815f 100644 --- a/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/d5b228.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_d5b228() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_d5b228(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_d5b228(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_d5b228(); } diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl index ce3f74ae34..d80689a6f1 100644 --- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl +++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_e31be1() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_e31be1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_e31be1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_e31be1(); } diff --git a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl index e24d1ef28d..e47d202e0d 100644 --- a/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/e31be1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_e31be1() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_e31be1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_e31be1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_e31be1(); } diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl index 8558800757..44cb31cde7 100644 --- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl +++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn textureNumLayers(texture: texture_depth_2d_array) -> i32 fn textureNumLayers_e653c0() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_e653c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_e653c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_e653c0(); } diff --git a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl index d4d6394835..4adddfbea7 100644 --- a/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/e653c0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureNumLayers_e653c0() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_e653c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_e653c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_e653c0(); } diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl index 360560829b..7c4e1b4c6b 100644 --- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl +++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_ee942f() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_ee942f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_ee942f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_ee942f(); } diff --git a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl index ec81d1d998..4d48facccd 100644 --- a/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/ee942f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_ee942f() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_ee942f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_ee942f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_ee942f(); } diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl index 8f0efdd974..6d5b10c042 100644 --- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl +++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_f33005() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_f33005(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_f33005(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_f33005(); } diff --git a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl index b4da2c1a55..35bd8cab44 100644 --- a/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/f33005.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_f33005() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_f33005(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_f33005(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_f33005(); } diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl index 3e33fda544..aab70d9a78 100644 --- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl +++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_fcec98() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_fcec98(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_fcec98(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_fcec98(); } diff --git a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl index c1ab9b5a75..6a1723e7cf 100644 --- a/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/fcec98.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_fcec98() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_fcec98(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_fcec98(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_fcec98(); } diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl index df16a2d8be..e6fe277432 100644 --- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl +++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureNumLayers(texture: texture_storage_2d_array) -> i32 fn textureNumLayers_ff5e89() { var res: i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_ff5e89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_ff5e89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_ff5e89(); } diff --git a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl index b5f5e98f2e..cd8cb2d9c7 100644 --- a/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLayers/ff5e89.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureNumLayers_ff5e89() { var res : i32 = textureNumLayers(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLayers_ff5e89(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLayers_ff5e89(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLayers_ff5e89(); } diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl index 3b07e8c293..367dac4fc0 100644 --- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl +++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; +@group(1) @binding(0) var arg_0: texture_depth_cube; // fn textureNumLevels(texture: texture_depth_cube) -> i32 fn textureNumLevels_076cb5() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_076cb5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_076cb5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_076cb5(); } diff --git a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl index 9730ca42e1..c04d6e6144 100644 --- a/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/076cb5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; fn textureNumLevels_076cb5() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_076cb5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_076cb5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_076cb5(); } diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl index c918197228..b3bbba3524 100644 --- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl +++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureNumLevels(texture: texture_cube) -> i32 fn textureNumLevels_080d95() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_080d95(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_080d95(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_080d95(); } diff --git a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl index adbd0e5936..686c90849d 100644 --- a/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/080d95.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureNumLevels_080d95() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_080d95(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_080d95(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_080d95(); } diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl index 566b3fbeb1..b68221cf6b 100644 --- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl +++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureNumLevels(texture: texture_2d) -> i32 fn textureNumLevels_09ddd0() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_09ddd0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_09ddd0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_09ddd0(); } diff --git a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl index df0f042782..7a4d344a1a 100644 --- a/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/09ddd0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureNumLevels_09ddd0() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_09ddd0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_09ddd0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_09ddd0(); } diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl b/test/intrinsics/gen/textureNumLevels/105988.wgsl index af619bd38b..9f03753bcf 100644 --- a/test/intrinsics/gen/textureNumLevels/105988.wgsl +++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLevels(texture: texture_2d_array) -> i32 fn textureNumLevels_105988() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_105988(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_105988(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_105988(); } diff --git a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl index 776a1cc7d1..1466976b06 100644 --- a/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/105988.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLevels_105988() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_105988(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_105988(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_105988(); } diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl index 02e002fe93..fc14600b56 100644 --- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl +++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureNumLevels(texture: texture_1d) -> i32 fn textureNumLevels_1e6f3b() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_1e6f3b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_1e6f3b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_1e6f3b(); } diff --git a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl index 1aa011235d..3643d3efef 100644 --- a/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/1e6f3b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureNumLevels_1e6f3b() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_1e6f3b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_1e6f3b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_1e6f3b(); } diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl index 01cef5e0ce..4b914fc729 100644 --- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl +++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureNumLevels(texture: texture_2d) -> i32 fn textureNumLevels_23f750() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_23f750(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_23f750(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_23f750(); } diff --git a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl index 9589607490..86bf58889a 100644 --- a/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/23f750.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureNumLevels_23f750() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_23f750(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_23f750(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_23f750(); } diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl index 51dcb5fbc6..556e1032f4 100644 --- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl +++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; // fn textureNumLevels(texture: texture_depth_cube_array) -> i32 fn textureNumLevels_2c3575() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_2c3575(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_2c3575(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_2c3575(); } diff --git a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl index 2709a15412..6f2f54dcfc 100644 --- a/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/2c3575.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; fn textureNumLevels_2c3575() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_2c3575(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_2c3575(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_2c3575(); } diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl index 1509fb9a12..04ae341661 100644 --- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl +++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureNumLevels(texture: texture_1d) -> i32 fn textureNumLevels_32a0ae() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_32a0ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_32a0ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_32a0ae(); } diff --git a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl index 2ec9379002..e5016ebb3f 100644 --- a/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/32a0ae.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureNumLevels_32a0ae() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_32a0ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_32a0ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_32a0ae(); } diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl index 9dcd78bf31..cab75517e1 100644 --- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl +++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLevels(texture: texture_2d_array) -> i32 fn textureNumLevels_5101cf() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_5101cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_5101cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_5101cf(); } diff --git a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl index fb10b8018e..694397b7ed 100644 --- a/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/5101cf.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLevels_5101cf() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_5101cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_5101cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_5101cf(); } diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl index 5dfe6726dd..04be5cba8d 100644 --- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl +++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; +@group(1) @binding(0) var arg_0: texture_1d; // fn textureNumLevels(texture: texture_1d) -> i32 fn textureNumLevels_51b5bb() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_51b5bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_51b5bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_51b5bb(); } diff --git a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl index 61beb7adff..2ee7aa9d7d 100644 --- a/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/51b5bb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; fn textureNumLevels_51b5bb() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_51b5bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_51b5bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_51b5bb(); } diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl index 00c1fa3a4c..6daf4db3d9 100644 --- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl +++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureNumLevels(texture: texture_cube) -> i32 fn textureNumLevels_897aaf() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_897aaf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_897aaf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_897aaf(); } diff --git a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl index f2084279dc..97e927523f 100644 --- a/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/897aaf.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureNumLevels_897aaf() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_897aaf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_897aaf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_897aaf(); } diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl index d7c908ffe3..c471ebaf19 100644 --- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl +++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureNumLevels(texture: texture_3d) -> i32 fn textureNumLevels_9da7a5() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_9da7a5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_9da7a5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_9da7a5(); } diff --git a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl index aeb50809a5..5980b48cae 100644 --- a/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/9da7a5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureNumLevels_9da7a5() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_9da7a5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_9da7a5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_9da7a5(); } diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl index 9dfd01139b..0d9d2014ad 100644 --- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl +++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLevels(texture: texture_cube_array) -> i32 fn textureNumLevels_a91c03() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_a91c03(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_a91c03(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_a91c03(); } diff --git a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl index e367038540..72128538a7 100644 --- a/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/a91c03.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLevels_a91c03() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_a91c03(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_a91c03(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_a91c03(); } diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl index baf3a5b5ae..701dd1e43a 100644 --- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl +++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLevels(texture: texture_cube_array) -> i32 fn textureNumLevels_aee7c8() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_aee7c8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_aee7c8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_aee7c8(); } diff --git a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl index dc4a3925c6..32c8b5a215 100644 --- a/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/aee7c8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLevels_aee7c8() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_aee7c8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_aee7c8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_aee7c8(); } diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl index bb46fdb0fa..9f8980a2a5 100644 --- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl +++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; +@group(1) @binding(0) var arg_0: texture_depth_2d; // fn textureNumLevels(texture: texture_depth_2d) -> i32 fn textureNumLevels_b1b12b() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_b1b12b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_b1b12b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_b1b12b(); } diff --git a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl index 2fe948a08f..97fd9a280c 100644 --- a/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/b1b12b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureNumLevels_b1b12b() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_b1b12b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_b1b12b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_b1b12b(); } diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl index 6c791059b2..57d2353efd 100644 --- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl +++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureNumLevels(texture: texture_3d) -> i32 fn textureNumLevels_b4f5ea() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_b4f5ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_b4f5ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_b4f5ea(); } diff --git a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl index 70c5658078..ff1823d064 100644 --- a/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/b4f5ea.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureNumLevels_b4f5ea() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_b4f5ea(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_b4f5ea(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_b4f5ea(); } diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl index 1353492518..862bc8d779 100644 --- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl +++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; +@group(1) @binding(0) var arg_0: texture_2d_array; // fn textureNumLevels(texture: texture_2d_array) -> i32 fn textureNumLevels_d004a9() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_d004a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_d004a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_d004a9(); } diff --git a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl index 23230e9d1c..e6efa4a6b1 100644 --- a/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/d004a9.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; fn textureNumLevels_d004a9() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_d004a9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_d004a9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_d004a9(); } diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl index 52bc5de807..85fb619609 100644 --- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl +++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; +@group(1) @binding(0) var arg_0: texture_3d; // fn textureNumLevels(texture: texture_3d) -> i32 fn textureNumLevels_dca09e() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_dca09e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_dca09e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_dca09e(); } diff --git a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl index bbf325d9d6..81c2ed177f 100644 --- a/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/dca09e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; fn textureNumLevels_dca09e() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_dca09e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_dca09e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_dca09e(); } diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl index 817b334357..05f8db01cd 100644 --- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl +++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; +@group(1) @binding(0) var arg_0: texture_2d; // fn textureNumLevels(texture: texture_2d) -> i32 fn textureNumLevels_e67231() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_e67231(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_e67231(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_e67231(); } diff --git a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl index 1db03ef2c7..b9b5a95d56 100644 --- a/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/e67231.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; fn textureNumLevels_e67231() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_e67231(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_e67231(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_e67231(); } diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl index 739603d953..76ac64c793 100644 --- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl +++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; +@group(1) @binding(0) var arg_0: texture_cube; // fn textureNumLevels(texture: texture_cube) -> i32 fn textureNumLevels_ed078b() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_ed078b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_ed078b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_ed078b(); } diff --git a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl index 4684f74b65..1eb3d87ad7 100644 --- a/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/ed078b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; fn textureNumLevels_ed078b() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_ed078b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_ed078b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_ed078b(); } diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl index 05a871010d..10ccf4e00b 100644 --- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl +++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; +@group(1) @binding(0) var arg_0: texture_cube_array; // fn textureNumLevels(texture: texture_cube_array) -> i32 fn textureNumLevels_f46ec6() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_f46ec6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_f46ec6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_f46ec6(); } diff --git a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl index ecf4daf1ba..d380d9b72a 100644 --- a/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/f46ec6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; fn textureNumLevels_f46ec6() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_f46ec6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_f46ec6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_f46ec6(); } diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl index 68737ce02e..bdfcc52065 100644 --- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl +++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; // fn textureNumLevels(texture: texture_depth_2d_array) -> i32 fn textureNumLevels_f5828d() { var res: i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_f5828d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_f5828d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_f5828d(); } diff --git a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl index 531413439b..501fe61734 100644 --- a/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumLevels/f5828d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureNumLevels_f5828d() { var res : i32 = textureNumLevels(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumLevels_f5828d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumLevels_f5828d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumLevels_f5828d(); } diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl index 4015d4195d..8a28fd4cdc 100644 --- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl +++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureNumSamples(texture: texture_multisampled_2d) -> i32 fn textureNumSamples_2c6f14() { var res: i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_2c6f14(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_2c6f14(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_2c6f14(); } diff --git a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl index a8d25bc506..be4993462f 100644 --- a/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumSamples/2c6f14.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureNumSamples_2c6f14() { var res : i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_2c6f14(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_2c6f14(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_2c6f14(); } diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl index 606e5be554..143f3a8951 100644 --- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl +++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureNumSamples(texture: texture_multisampled_2d) -> i32 fn textureNumSamples_42f8bb() { var res: i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_42f8bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_42f8bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_42f8bb(); } diff --git a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl index 2f1e941f9c..ef11b63656 100644 --- a/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumSamples/42f8bb.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureNumSamples_42f8bb() { var res : i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_42f8bb(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_42f8bb(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_42f8bb(); } diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl index 9f1de6ea76..c34a440c78 100644 --- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl +++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_multisampled_2d; // fn textureNumSamples(texture: texture_multisampled_2d) -> i32 fn textureNumSamples_449d23() { var res: i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_449d23(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_449d23(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_449d23(); } diff --git a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl index 74b98a5b0e..9cab69e2c1 100644 --- a/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumSamples/449d23.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureNumSamples_449d23() { var res : i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_449d23(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_449d23(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_449d23(); } diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl index 4cc3843dd6..bafea1aae3 100644 --- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl +++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d; // fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32 fn textureNumSamples_a3c8a0() { var res: i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_a3c8a0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_a3c8a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_a3c8a0(); } diff --git a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl index 141f059c71..29a914ad8b 100644 --- a/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureNumSamples/a3c8a0.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureNumSamples_a3c8a0() { var res : i32 = textureNumSamples(arg_0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureNumSamples_a3c8a0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureNumSamples_a3c8a0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureNumSamples_a3c8a0(); } diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl b/test/intrinsics/gen/textureSample/02aa9b.wgsl index 2827f6f63e..006a838851 100644 --- a/test/intrinsics/gen/textureSample/02aa9b.wgsl +++ b/test/intrinsics/gen/textureSample/02aa9b.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> vec4 fn textureSample_02aa9b() { var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_02aa9b(); } diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl index b005caac98..855799167a 100644 --- a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_02aa9b() { var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_02aa9b(); } diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl b/test/intrinsics/gen/textureSample/100dc0.wgsl index 49ea8de957..a5f95e7da2 100644 --- a/test/intrinsics/gen/textureSample/100dc0.wgsl +++ b/test/intrinsics/gen/textureSample/100dc0.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3, offset: vec3) -> vec4 fn textureSample_100dc0() { var res: vec4 = textureSample(arg_0, arg_1, vec3(), vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_100dc0(); } diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl index 6fcbb13e02..b972855ab8 100644 --- a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_100dc0() { var res : vec4 = textureSample(arg_0, arg_1, vec3(), vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_100dc0(); } diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl b/test/intrinsics/gen/textureSample/38bbb9.wgsl index effaac2656..ee2abbd8bf 100644 --- a/test/intrinsics/gen/textureSample/38bbb9.wgsl +++ b/test/intrinsics/gen/textureSample/38bbb9.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> f32 fn textureSample_38bbb9() { var res: f32 = textureSample(arg_0, arg_1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_38bbb9(); } diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl index 3d321ed2a9..438d008290 100644 --- a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_38bbb9() { var res : f32 = textureSample(arg_0, arg_1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_38bbb9(); } diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl b/test/intrinsics/gen/textureSample/3b50bd.wgsl index c429a99985..0c0b55f3b8 100644 --- a/test/intrinsics/gen/textureSample/3b50bd.wgsl +++ b/test/intrinsics/gen/textureSample/3b50bd.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3) -> vec4 fn textureSample_3b50bd() { var res: vec4 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_3b50bd(); } diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl index 268e4e4e7f..03ccde3ebe 100644 --- a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_3b50bd() { var res : vec4 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_3b50bd(); } diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl b/test/intrinsics/gen/textureSample/4dd1bf.wgsl index 7e331263b9..f722cd1109 100644 --- a/test/intrinsics/gen/textureSample/4dd1bf.wgsl +++ b/test/intrinsics/gen/textureSample/4dd1bf.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureSample_4dd1bf() { var res: vec4 = textureSample(arg_0, arg_1, vec3(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_4dd1bf(); } diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl index 25c98d3b14..77ad88a393 100644 --- a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_4dd1bf() { var res : vec4 = textureSample(arg_0, arg_1, vec3(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_4dd1bf(); } diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl b/test/intrinsics/gen/textureSample/51b514.wgsl index 4ba2216795..54334606b1 100644 --- a/test/intrinsics/gen/textureSample/51b514.wgsl +++ b/test/intrinsics/gen/textureSample/51b514.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureSample_51b514() { var res: vec4 = textureSample(arg_0, arg_1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_51b514(); } diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl index 825becdb2c..f866a59b78 100644 --- a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/51b514.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_51b514() { var res : vec4 = textureSample(arg_0, arg_1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_51b514(); } diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl b/test/intrinsics/gen/textureSample/667d76.wgsl index 73ba79a460..23d98a9321 100644 --- a/test/intrinsics/gen/textureSample/667d76.wgsl +++ b/test/intrinsics/gen/textureSample/667d76.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2, offset: vec2) -> f32 fn textureSample_667d76() { var res: f32 = textureSample(arg_0, arg_1, vec2(), vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_667d76(); } diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl index 3e92695b6b..d541431fc6 100644 --- a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_667d76() { var res : f32 = textureSample(arg_0, arg_1, vec2(), vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_667d76(); } diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl b/test/intrinsics/gen/textureSample/6717ca.wgsl index 35f06578df..fc09cca1c5 100644 --- a/test/intrinsics/gen/textureSample/6717ca.wgsl +++ b/test/intrinsics/gen/textureSample/6717ca.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureSample_6717ca() { var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_6717ca(); } diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl index 9d9e6955a6..b767d29334 100644 --- a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_6717ca() { var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_6717ca(); } diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl b/test/intrinsics/gen/textureSample/6e64fb.wgsl index 24a8ae7fe2..d49bb9c491 100644 --- a/test/intrinsics/gen/textureSample/6e64fb.wgsl +++ b/test/intrinsics/gen/textureSample/6e64fb.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_1d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_1d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_1d, sampler: sampler, coords: f32) -> vec4 fn textureSample_6e64fb() { var res: vec4 = textureSample(arg_0, arg_1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_6e64fb(); } diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl index 7e7d7ec2f6..4d7b6ce81d 100644 --- a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_1d; +@group(1) @binding(0) var arg_0 : texture_1d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_6e64fb() { var res : vec4 = textureSample(arg_0, arg_1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_6e64fb(); } diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl b/test/intrinsics/gen/textureSample/7c3baa.wgsl index 6486d89549..9f32596e53 100644 --- a/test/intrinsics/gen/textureSample/7c3baa.wgsl +++ b/test/intrinsics/gen/textureSample/7c3baa.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2, offset: vec2) -> vec4 fn textureSample_7c3baa() { var res: vec4 = textureSample(arg_0, arg_1, vec2(), vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_7c3baa(); } diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl index 74917629c8..f4105d88d3 100644 --- a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_7c3baa() { var res : vec4 = textureSample(arg_0, arg_1, vec2(), vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_7c3baa(); } diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl b/test/intrinsics/gen/textureSample/7e9ffd.wgsl index 3e4a681790..d5242f6fe0 100644 --- a/test/intrinsics/gen/textureSample/7e9ffd.wgsl +++ b/test/intrinsics/gen/textureSample/7e9ffd.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> f32 fn textureSample_7e9ffd() { var res: f32 = textureSample(arg_0, arg_1, vec2(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_7e9ffd(); } diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl index b5709403e7..ba76347178 100644 --- a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_7e9ffd() { var res : f32 = textureSample(arg_0, arg_1, vec2(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_7e9ffd(); } diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl b/test/intrinsics/gen/textureSample/8522e7.wgsl index afc06467b3..2ac3071481 100644 --- a/test/intrinsics/gen/textureSample/8522e7.wgsl +++ b/test/intrinsics/gen/textureSample/8522e7.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, offset: vec2) -> f32 fn textureSample_8522e7() { var res: f32 = textureSample(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_8522e7(); } diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl index 4133cdea77..a3d93c8f81 100644 --- a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_8522e7() { var res : f32 = textureSample(arg_0, arg_1, vec2(), 1, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_8522e7(); } diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl b/test/intrinsics/gen/textureSample/c2f4e8.wgsl index cd23dcc8e7..e6c03a1f7c 100644 --- a/test/intrinsics/gen/textureSample/c2f4e8.wgsl +++ b/test/intrinsics/gen/textureSample/c2f4e8.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> f32 fn textureSample_c2f4e8() { var res: f32 = textureSample(arg_0, arg_1, vec3(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_c2f4e8(); } diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl index 835f3c2a0e..0a6f332709 100644 --- a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_c2f4e8() { var res : f32 = textureSample(arg_0, arg_1, vec3(), 1); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_c2f4e8(); } diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl b/test/intrinsics/gen/textureSample/e53267.wgsl index 14163e126b..6ac4cd6a89 100644 --- a/test/intrinsics/gen/textureSample/e53267.wgsl +++ b/test/intrinsics/gen/textureSample/e53267.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureSample_e53267() { var res: vec4 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_e53267(); } diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl index 64f9da93a5..b1d17e78d4 100644 --- a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/e53267.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_e53267() { var res : vec4 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_e53267(); } diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl b/test/intrinsics/gen/textureSample/ea7030.wgsl index f36a76e27f..482686a194 100644 --- a/test/intrinsics/gen/textureSample/ea7030.wgsl +++ b/test/intrinsics/gen/textureSample/ea7030.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> f32 fn textureSample_ea7030() { var res: f32 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_ea7030(); } diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl b/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl index 580b0b0a89..4fffe530b2 100644 --- a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSample_ea7030() { var res : f32 = textureSample(arg_0, arg_1, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSample_ea7030(); } diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl index 976b690a58..17b3557f62 100644 --- a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl +++ b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_cube, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_53b9f7() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_53b9f7(); } diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl index aaeec48293..58e2030565 100644 --- a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_53b9f7() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_53b9f7(); } diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl index e3c0a2286f..5a95380b4e 100644 --- a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl +++ b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32, offset: vec2) -> vec4 fn textureSampleBias_65ac50() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_65ac50(); } diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl index 915c1f4b6b..ca8e190b66 100644 --- a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_65ac50() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_65ac50(); } diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl index e7648e42de..8c17b477ac 100644 --- a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl +++ b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32) -> vec4 fn textureSampleBias_6a9113() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_6a9113(); } diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl index 36043aabf0..a5ff76e529 100644 --- a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_6a9113() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_6a9113(); } diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl b/test/intrinsics/gen/textureSampleBias/80e579.wgsl index 37e99401cc..0ae5cc84be 100644 --- a/test/intrinsics/gen/textureSampleBias/80e579.wgsl +++ b/test/intrinsics/gen/textureSampleBias/80e579.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_80e579() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_80e579(); } diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl index 6134ecb5bf..164c81e917 100644 --- a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_80e579() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_80e579(); } diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl index 145a1e951f..f6f996f905 100644 --- a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl +++ b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32, offset: vec2) -> vec4 fn textureSampleBias_81c19a() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_81c19a(); } diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl index 88ef14b1a4..2719198c9e 100644 --- a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_81c19a() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_81c19a(); } diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl index 5ec074c167..d70657e241 100644 --- a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl +++ b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_d3fa1b() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_d3fa1b(); } diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl index 40dc89e097..7a07c3093d 100644 --- a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_d3fa1b() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_d3fa1b(); } diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl index 41c7990d01..b35e5a4ef5 100644 --- a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl +++ b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32, offset: vec3) -> vec4 fn textureSampleBias_df91bb() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_df91bb(); } diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl index c361dd70cc..9f530da746 100644 --- a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_df91bb() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0, vec3()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_df91bb(); } diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl index a2df185415..408326aa9e 100644 --- a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl +++ b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_eed7c4() { var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_eed7c4(); } diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl index c106d85d4f..e2c3aa7712 100644 --- a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_eed7c4() { var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleBias_eed7c4(); } diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl index 022bc66cfd..3f6096a450 100644 --- a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, offset: vec2) -> f32 fn textureSampleCompare_25fcd1() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_25fcd1(); } diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl index 7beb7ef788..532be33609 100644 --- a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_25fcd1() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_25fcd1(); } diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl index e9432158fc..1c2c30c445 100644 --- a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_3a5923(); } diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl index a002ef224d..eb88140083 100644 --- a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_3a5923() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_3a5923(); } diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl index 56bcd60182..1accd53990 100644 --- a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_63fb83(); } diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl index 622f9976d5..38e555e2e1 100644 --- a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_63fb83() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_63fb83(); } diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl index 2e774739b6..43552d78ff 100644 --- a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, offset: vec2) -> f32 fn textureSampleCompare_98b85c() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_98b85c(); } diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl index 6e6b107d88..de96847f64 100644 --- a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_98b85c() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_98b85c(); } diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl index cb4665c6e7..073e25a338 100644 --- a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_a3ca7e() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_a3ca7e(); } diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl index 2d8f4b1626..5dc12e5516 100644 --- a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_a3ca7e() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_a3ca7e(); } diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl index c4aa7d72e1..4291866301 100644 --- a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl @@ -22,15 +22,15 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_dd431d() { var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_dd431d(); } diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl index 8a292ade2e..f36d443315 100644 --- a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dd431d() { var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompare_dd431d(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl index 45b69ce2cd..7cc7525f2a 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, offset: vec2) -> f32 fn textureSampleCompareLevel_011a8f() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_011a8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_011a8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_011a8f(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl index 9c024685a0..d98d813b5d 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_011a8f() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_011a8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_011a8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_011a8f(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl index 363ccec760..21a27d8ebc 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1116ed() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_1116ed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_1116ed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_1116ed(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl index aac38c89fd..97ee86714d 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1116ed() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_1116ed(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_1116ed(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_1116ed(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl index 21daae775f..30c28670d1 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_1568e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_1568e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_1568e3(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl index 06ad79eaa0..ff5e88df3f 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1568e3() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_1568e3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_1568e3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_1568e3(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl index 6cead7aa54..6a6fceef54 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_2ad2b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_2ad2b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_2ad2b1(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl index 24be3124b2..76fe2cbea8 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_2ad2b1() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_2ad2b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_2ad2b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_2ad2b1(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl index 86b87ea7cd..02d5f74739 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_4cf3a2() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_4cf3a2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_4cf3a2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_4cf3a2(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl index efdac056df..1fb3470f0e 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_4cf3a2() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_4cf3a2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_4cf3a2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_4cf3a2(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl index 5fc6e60ea6..97401ce07f 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler_comparison; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler_comparison; // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, offset: vec2) -> f32 fn textureSampleCompareLevel_f8121c() { var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_f8121c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_f8121c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_f8121c(); } diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl index 5012e842f2..a63e6b36cf 100644 --- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler_comparison; +@group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_f8121c() { var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleCompareLevel_f8121c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleCompareLevel_f8121c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleCompareLevel_f8121c(); } diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl index c2abcf5df8..8d8aa0f185 100644 --- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_21402b() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_21402b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_21402b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_21402b(); } diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl index c2c48143b5..c5e185ca06 100644 --- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_21402b() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_21402b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_21402b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_21402b(); } diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl index d615afae7e..5c242befd8 100644 --- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_2ecd8f() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_2ecd8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_2ecd8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_2ecd8f(); } diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl index 4c80e96f59..233ce18732 100644 --- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_2ecd8f() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1, vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_2ecd8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_2ecd8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_2ecd8f(); } diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl index 54d36dbd24..7749ccd2a4 100644 --- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2, offset: vec2) -> vec4 fn textureSampleGrad_468f88() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_468f88(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_468f88(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_468f88(); } diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl index 510cb94ad9..fc63b372a9 100644 --- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_468f88() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_468f88(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_468f88(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_468f88(); } diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl index 1e5e25bb6a..7f832e9436 100644 --- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_521263() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_521263(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_521263(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_521263(); } diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl index a4f4403e3d..f440117500 100644 --- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_521263() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_521263(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_521263(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_521263(); } diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl index a316e8c37d..47a84a9647 100644 --- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_cube, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_5312f4() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_5312f4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_5312f4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_5312f4(); } diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl index 2dd32a891a..22507b7a62 100644 --- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5312f4() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_5312f4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_5312f4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_5312f4(); } diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl index 8dbecf817a..cfb073f41a 100644 --- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2, offset: vec2) -> vec4 fn textureSampleGrad_872f00() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1, vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_872f00(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_872f00(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_872f00(); } diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl index ff9ca46e0e..095fe4fb4b 100644 --- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_872f00() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1, vec2(), vec2(), vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_872f00(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_872f00(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_872f00(); } diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl index 20546aa304..e2f4c944df 100644 --- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_e383db() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1, vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_e383db(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_e383db(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_e383db(); } diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl index b84679094e..dad5f7ff32 100644 --- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_e383db() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1, vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_e383db(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_e383db(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_e383db(); } diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl index 831a72e307..aa909fa4ff 100644 --- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3, offset: vec3) -> vec4 fn textureSampleGrad_e9a2f7() { var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_e9a2f7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_e9a2f7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_e9a2f7(); } diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl index cbff0fa604..4336d026ac 100644 --- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_e9a2f7() { var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3(), vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleGrad_e9a2f7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleGrad_e9a2f7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleGrad_e9a2f7(); } diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl index 5cb8e08080..421b596967 100644 --- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32) -> f32 fn textureSampleLevel_02be59() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_02be59(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_02be59(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_02be59(); } diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl index a10616737d..e5eb1c6b7d 100644 --- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_02be59() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_02be59(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_02be59(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_02be59(); } diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl index 764c0a20f8..c8a3064f9b 100644 --- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_0bdd9a() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_0bdd9a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_0bdd9a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_0bdd9a(); } diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl index 8e837542dc..432273cda6 100644 --- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube_array; +@group(1) @binding(0) var arg_0 : texture_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0bdd9a() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_0bdd9a(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_0bdd9a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_0bdd9a(); } diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl index 2c5bbe10cf..c7a2186b8a 100644 --- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3, level: i32) -> f32 fn textureSampleLevel_1b0291() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_1b0291(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_1b0291(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_1b0291(); } diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl index 3699406248..8ce844e4b4 100644 --- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube; +@group(1) @binding(0) var arg_0 : texture_depth_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1b0291() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_1b0291(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_1b0291(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_1b0291(); } diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl index 7ddc6dc763..c7a13c2980 100644 --- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32) -> f32 fn textureSampleLevel_1bf73e() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_1bf73e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_1bf73e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_1bf73e(); } diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl index dfd0fff42e..ff739ce857 100644 --- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1bf73e() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_1bf73e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_1bf73e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_1bf73e(); } diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl index 7f57f11e48..a1c1612810 100644 --- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_302be4() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_302be4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_302be4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_302be4(); } diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl index 1fd7e8e2d5..15af8c661c 100644 --- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_302be4() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_302be4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_302be4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_302be4(); } diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl index 5cdb1b7134..bda5904c6b 100644 --- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32, offset: vec2) -> f32 fn textureSampleLevel_47daa4() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_47daa4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_47daa4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_47daa4(); } diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl index 2a7967f521..28ee9080ea 100644 --- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d; +@group(1) @binding(0) var arg_0 : texture_depth_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_47daa4() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_47daa4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_47daa4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_47daa4(); } diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl index d478f65ec2..d748cdc21f 100644 --- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32, offset: vec2) -> vec4 fn textureSampleLevel_690d95() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_690d95(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_690d95(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_690d95(); } diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl index be08453adb..6584e4654b 100644 --- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_690d95() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_690d95(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_690d95(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_690d95(); } diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl index 8de5d5eabf..46360919ff 100644 --- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_external; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_external; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2) -> vec4 fn textureSampleLevel_979816() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_979816(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_979816(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_979816(); } diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl index eef21a3b58..3d1980fa01 100644 --- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_external; +@group(1) @binding(0) var arg_0 : texture_external; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_979816() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_979816(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_979816(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_979816(); } diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl index 1d3a8b4265..18304c88e3 100644 --- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32, offset: vec3) -> vec4 fn textureSampleLevel_9bd37b() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_9bd37b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_9bd37b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_9bd37b(); } diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl index ee5d0068b8..081f0c3acc 100644 --- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_9bd37b() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0, vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_9bd37b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_9bd37b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_9bd37b(); } diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl index ac3e45a908..ffb83eb0a8 100644 --- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32, offset: vec2) -> vec4 fn textureSampleLevel_a4af26() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_a4af26(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_a4af26(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_a4af26(); } diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl index 7d4bfb0ef0..69f8f800dc 100644 --- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d_array; +@group(1) @binding(0) var arg_0 : texture_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_a4af26() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_a4af26(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_a4af26(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_a4af26(); } diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl index dede1e3d2e..3cf621afe6 100644 --- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_3d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_3d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_abfcc0() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_abfcc0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_abfcc0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_abfcc0(); } diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl index a8af47df57..f8f6faf81c 100644 --- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_3d; +@group(1) @binding(0) var arg_0 : texture_3d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_abfcc0() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_abfcc0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_abfcc0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_abfcc0(); } diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl index 67bb4b68d3..bca318958a 100644 --- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_cube_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: i32) -> f32 fn textureSampleLevel_ae5e39() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_ae5e39(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_ae5e39(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_ae5e39(); } diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl index de37db16e4..4fc5ac8665 100644 --- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array; +@group(1) @binding(0) var arg_0 : texture_depth_cube_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae5e39() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_ae5e39(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_ae5e39(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_ae5e39(); } diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl index d1b9b7ba4b..07958ef112 100644 --- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_depth_2d_array; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32, offset: vec2) -> f32 fn textureSampleLevel_ba93b3() { var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_ba93b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_ba93b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_ba93b3(); } diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl index 927d4c86f8..954891cb37 100644 --- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array; +@group(1) @binding(0) var arg_0 : texture_depth_2d_array; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ba93b3() { var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 0, vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_ba93b3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_ba93b3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_ba93b3(); } diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl index 01c67ac2f3..9dc6e1554f 100644 --- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_cube; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_cube; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_cube, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_c32df7() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_c32df7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_c32df7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_c32df7(); } diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl index e9fb6330e8..2f2df13b05 100644 --- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_cube; +@group(1) @binding(0) var arg_0 : texture_cube; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c32df7() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_c32df7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_c32df7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_c32df7(); } diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl index 84b92c4013..f58dfd116b 100644 --- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl @@ -22,26 +22,26 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_2d; -[[group(1), binding(1)]] var arg_1: sampler; +@group(1) @binding(0) var arg_0: texture_2d; +@group(1) @binding(1) var arg_1: sampler; // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32) -> vec4 fn textureSampleLevel_c6aca6() { var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_c6aca6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_c6aca6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_c6aca6(); } diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl index 841a155d9c..35dc735246 100644 --- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.wgsl @@ -1,23 +1,23 @@ -[[group(1), binding(0)]] var arg_0 : texture_2d; +@group(1) @binding(0) var arg_0 : texture_2d; -[[group(1), binding(1)]] var arg_1 : sampler; +@group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c6aca6() { var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureSampleLevel_c6aca6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureSampleLevel_c6aca6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureSampleLevel_c6aca6(); } diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl b/test/intrinsics/gen/textureStore/05ce15.wgsl index 9529592542..8bccc96436 100644 --- a/test/intrinsics/gen/textureStore/05ce15.wgsl +++ b/test/intrinsics/gen/textureStore/05ce15.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_05ce15() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_05ce15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_05ce15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_05ce15(); } diff --git a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl index 17e60e2e47..2627d0e3ff 100644 --- a/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/05ce15.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_05ce15() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_05ce15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_05ce15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_05ce15(); } diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl b/test/intrinsics/gen/textureStore/064c7f.wgsl index 3681bb3bbc..71130e470a 100644 --- a/test/intrinsics/gen/textureStore/064c7f.wgsl +++ b/test/intrinsics/gen/textureStore/064c7f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_064c7f() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_064c7f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_064c7f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_064c7f(); } diff --git a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl index 126b43ccc5..042b3afd27 100644 --- a/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/064c7f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_064c7f() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_064c7f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_064c7f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_064c7f(); } diff --git a/test/intrinsics/gen/textureStore/068641.wgsl b/test/intrinsics/gen/textureStore/068641.wgsl index 7b5aa2a552..7b1052911a 100644 --- a/test/intrinsics/gen/textureStore/068641.wgsl +++ b/test/intrinsics/gen/textureStore/068641.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_068641() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_068641(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_068641(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_068641(); } diff --git a/test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl index 39b2602c1c..5b3279a129 100644 --- a/test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/068641.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_068641() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_068641(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_068641(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_068641(); } diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl b/test/intrinsics/gen/textureStore/0af6b5.wgsl index a87fa55686..d66614e6f1 100644 --- a/test/intrinsics/gen/textureStore/0af6b5.wgsl +++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0af6b5() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_0af6b5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_0af6b5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_0af6b5(); } diff --git a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl index 33ce448ab8..1e67b082fa 100644 --- a/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/0af6b5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0af6b5() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_0af6b5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_0af6b5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_0af6b5(); } diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl b/test/intrinsics/gen/textureStore/0c3dff.wgsl index c20ffd61fa..4ace9a915a 100644 --- a/test/intrinsics/gen/textureStore/0c3dff.wgsl +++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0c3dff() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_0c3dff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_0c3dff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_0c3dff(); } diff --git a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl index ca1268580a..b115e07dfc 100644 --- a/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/0c3dff.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0c3dff() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_0c3dff(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_0c3dff(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_0c3dff(); } diff --git a/test/intrinsics/gen/textureStore/102722.wgsl b/test/intrinsics/gen/textureStore/102722.wgsl index cd6394dbba..a096321203 100644 --- a/test/intrinsics/gen/textureStore/102722.wgsl +++ b/test/intrinsics/gen/textureStore/102722.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_102722() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_102722(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_102722(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_102722(); } diff --git a/test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl index cf2500f4c3..593c342baf 100644 --- a/test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/102722.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_102722() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_102722(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_102722(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_102722(); } diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl b/test/intrinsics/gen/textureStore/1bbd08.wgsl index 6f05f8b6cc..922921bbe8 100644 --- a/test/intrinsics/gen/textureStore/1bbd08.wgsl +++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_1bbd08() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_1bbd08(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_1bbd08(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_1bbd08(); } diff --git a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl index 5a618ea88c..a775be711e 100644 --- a/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/1bbd08.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_1bbd08() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_1bbd08(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_1bbd08(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_1bbd08(); } diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl b/test/intrinsics/gen/textureStore/1c02e7.wgsl index 465f6f32c5..df6bca8322 100644 --- a/test/intrinsics/gen/textureStore/1c02e7.wgsl +++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_1c02e7() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_1c02e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_1c02e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_1c02e7(); } diff --git a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl index f24449eb59..732759fccb 100644 --- a/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/1c02e7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1c02e7() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_1c02e7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_1c02e7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_1c02e7(); } diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl b/test/intrinsics/gen/textureStore/22d955.wgsl index cfd3c59295..716aa4274b 100644 --- a/test/intrinsics/gen/textureStore/22d955.wgsl +++ b/test/intrinsics/gen/textureStore/22d955.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_22d955() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_22d955(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_22d955(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_22d955(); } diff --git a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl index c6f0cc4b56..b9fe255b4a 100644 --- a/test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/22d955.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_22d955() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_22d955(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_22d955(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_22d955(); } diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl b/test/intrinsics/gen/textureStore/26bf70.wgsl index 3bff728785..083e62a6af 100644 --- a/test/intrinsics/gen/textureStore/26bf70.wgsl +++ b/test/intrinsics/gen/textureStore/26bf70.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_26bf70() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_26bf70(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_26bf70(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_26bf70(); } diff --git a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl index 9953134727..896b4f7a4f 100644 --- a/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/26bf70.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_26bf70() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_26bf70(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_26bf70(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_26bf70(); } diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl b/test/intrinsics/gen/textureStore/2796b4.wgsl index c7e6cde82b..dce9df69f9 100644 --- a/test/intrinsics/gen/textureStore/2796b4.wgsl +++ b/test/intrinsics/gen/textureStore/2796b4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_2796b4() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2796b4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2796b4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2796b4(); } diff --git a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl index 1bf6571910..3fcb394f8f 100644 --- a/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/2796b4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_2796b4() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2796b4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2796b4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2796b4(); } diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl index 7480d58961..35cec999f9 100644 --- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl +++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ac6c7() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2ac6c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2ac6c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2ac6c7(); } diff --git a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl index 1e8abb2fa9..2786ca40da 100644 --- a/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/2ac6c7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2ac6c7() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2ac6c7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2ac6c7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2ac6c7(); } diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl index e8ab6c13da..ad1ccd58a7 100644 --- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl +++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2eb2a4() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2eb2a4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2eb2a4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2eb2a4(); } diff --git a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl index 038994ef41..51c5cd9e53 100644 --- a/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/2eb2a4.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2eb2a4() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2eb2a4(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2eb2a4(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2eb2a4(); } diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl index 0fea47be8b..bcf4113bee 100644 --- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl +++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ed2a3() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2ed2a3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2ed2a3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2ed2a3(); } diff --git a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl index cc582b307f..c415d580b7 100644 --- a/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/2ed2a3.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2ed2a3() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_2ed2a3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_2ed2a3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_2ed2a3(); } diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl b/test/intrinsics/gen/textureStore/31745b.wgsl index 49bb0c1018..5dea4e12a6 100644 --- a/test/intrinsics/gen/textureStore/31745b.wgsl +++ b/test/intrinsics/gen/textureStore/31745b.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_31745b() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_31745b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_31745b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_31745b(); } diff --git a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl index 41e5f93d85..42884340b0 100644 --- a/test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/31745b.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_31745b() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_31745b(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_31745b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_31745b(); } diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl b/test/intrinsics/gen/textureStore/32f368.wgsl index 30aef60f34..50f4e660fc 100644 --- a/test/intrinsics/gen/textureStore/32f368.wgsl +++ b/test/intrinsics/gen/textureStore/32f368.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_32f368() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_32f368(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_32f368(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_32f368(); } diff --git a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl index 5a83522c20..a7478222ef 100644 --- a/test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/32f368.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_32f368() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_32f368(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_32f368(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_32f368(); } diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl b/test/intrinsics/gen/textureStore/331aee.wgsl index 71b0f26382..4bc9a4ddf9 100644 --- a/test/intrinsics/gen/textureStore/331aee.wgsl +++ b/test/intrinsics/gen/textureStore/331aee.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_331aee() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_331aee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_331aee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_331aee(); } diff --git a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl index bf5acd4500..036326017f 100644 --- a/test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/331aee.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_331aee() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_331aee(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_331aee(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_331aee(); } diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl b/test/intrinsics/gen/textureStore/38e8d7.wgsl index e54b18bbb2..6cfe7a0edf 100644 --- a/test/intrinsics/gen/textureStore/38e8d7.wgsl +++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_38e8d7() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_38e8d7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_38e8d7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_38e8d7(); } diff --git a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl index de4dbd60eb..28d17915c2 100644 --- a/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/38e8d7.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_38e8d7() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_38e8d7(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_38e8d7(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_38e8d7(); } diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl b/test/intrinsics/gen/textureStore/3a52ac.wgsl index 169d9635bc..92cb0bbf90 100644 --- a/test/intrinsics/gen/textureStore/3a52ac.wgsl +++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3a52ac() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3a52ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3a52ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3a52ac(); } diff --git a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl index 07d0a6ff9d..6fbbab08f1 100644 --- a/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/3a52ac.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3a52ac() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3a52ac(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3a52ac(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3a52ac(); } diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl index 6f59945cb5..c665a5b3a7 100644 --- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl +++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3bb7a1() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3bb7a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3bb7a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3bb7a1(); } diff --git a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl index 10d2109054..ccb304d97c 100644 --- a/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/3bb7a1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3bb7a1() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3bb7a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3bb7a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3bb7a1(); } diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl b/test/intrinsics/gen/textureStore/3bec15.wgsl index e87e1deef3..b56de8d7bb 100644 --- a/test/intrinsics/gen/textureStore/3bec15.wgsl +++ b/test/intrinsics/gen/textureStore/3bec15.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_3bec15() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3bec15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3bec15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3bec15(); } diff --git a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl index fe5a5eae8c..c594be03d2 100644 --- a/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/3bec15.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_3bec15() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_3bec15(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_3bec15(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_3bec15(); } diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl b/test/intrinsics/gen/textureStore/441ba8.wgsl index c39592db61..a110f0c154 100644 --- a/test/intrinsics/gen/textureStore/441ba8.wgsl +++ b/test/intrinsics/gen/textureStore/441ba8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_441ba8() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_441ba8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_441ba8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_441ba8(); } diff --git a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl index dfa88ea935..b59255a55d 100644 --- a/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/441ba8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_441ba8() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_441ba8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_441ba8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_441ba8(); } diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl b/test/intrinsics/gen/textureStore/4fc057.wgsl index 9f83f23786..b74637023d 100644 --- a/test/intrinsics/gen/textureStore/4fc057.wgsl +++ b/test/intrinsics/gen/textureStore/4fc057.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_4fc057() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_4fc057(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_4fc057(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_4fc057(); } diff --git a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl index 38fef8929c..26a0018f20 100644 --- a/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/4fc057.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4fc057() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_4fc057(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_4fc057(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_4fc057(); } diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl index 2273a8849d..b9fc23d55a 100644 --- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl +++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_5a2f8f() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_5a2f8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_5a2f8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_5a2f8f(); } diff --git a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl index c2711ee88d..13d97f40aa 100644 --- a/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/5a2f8f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_5a2f8f() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_5a2f8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_5a2f8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_5a2f8f(); } diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl b/test/intrinsics/gen/textureStore/60975f.wgsl index 6a3b0f10cd..3408855d91 100644 --- a/test/intrinsics/gen/textureStore/60975f.wgsl +++ b/test/intrinsics/gen/textureStore/60975f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_60975f() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_60975f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_60975f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_60975f(); } diff --git a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl index 539a6fc24f..47cdd347a1 100644 --- a/test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/60975f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_60975f() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_60975f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_60975f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_60975f(); } diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl b/test/intrinsics/gen/textureStore/682fd6.wgsl index e8f48ce828..7d74607707 100644 --- a/test/intrinsics/gen/textureStore/682fd6.wgsl +++ b/test/intrinsics/gen/textureStore/682fd6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_682fd6() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_682fd6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_682fd6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_682fd6(); } diff --git a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl index 42bad33865..20603cc7b1 100644 --- a/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/682fd6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_682fd6() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_682fd6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_682fd6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_682fd6(); } diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl b/test/intrinsics/gen/textureStore/6b75c3.wgsl index 49514f27f2..16dc47dd29 100644 --- a/test/intrinsics/gen/textureStore/6b75c3.wgsl +++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b75c3() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6b75c3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6b75c3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6b75c3(); } diff --git a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl index fbaf5e40bc..cd827a3990 100644 --- a/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/6b75c3.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_6b75c3() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6b75c3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6b75c3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6b75c3(); } diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl b/test/intrinsics/gen/textureStore/6b80d2.wgsl index bf79a72977..95535c4267 100644 --- a/test/intrinsics/gen/textureStore/6b80d2.wgsl +++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b80d2() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6b80d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6b80d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6b80d2(); } diff --git a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl index 8857fdcd4b..e7efff2d8e 100644 --- a/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/6b80d2.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_6b80d2() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6b80d2(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6b80d2(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6b80d2(); } diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl b/test/intrinsics/gen/textureStore/6cff2e.wgsl index c20185f0b4..26320a288a 100644 --- a/test/intrinsics/gen/textureStore/6cff2e.wgsl +++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_6cff2e() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6cff2e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6cff2e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6cff2e(); } diff --git a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl index cae9ed9d0a..4f43b983ec 100644 --- a/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/6cff2e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_6cff2e() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6cff2e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6cff2e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6cff2e(); } diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl b/test/intrinsics/gen/textureStore/6da692.wgsl index 7b5727aed9..dd40882ae4 100644 --- a/test/intrinsics/gen/textureStore/6da692.wgsl +++ b/test/intrinsics/gen/textureStore/6da692.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_6da692() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6da692(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6da692(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6da692(); } diff --git a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl index 2b21df2123..2497a692c8 100644 --- a/test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/6da692.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_6da692() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_6da692(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_6da692(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_6da692(); } diff --git a/test/intrinsics/gen/textureStore/731349.wgsl b/test/intrinsics/gen/textureStore/731349.wgsl index f7f132a10d..ca0d0ef78b 100644 --- a/test/intrinsics/gen/textureStore/731349.wgsl +++ b/test/intrinsics/gen/textureStore/731349.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_731349() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_731349(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_731349(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_731349(); } diff --git a/test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl index 3488770c7e..d5466d87c5 100644 --- a/test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/731349.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_731349() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_731349(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_731349(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_731349(); } diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl b/test/intrinsics/gen/textureStore/752da6.wgsl index da2dca2b85..6310341776 100644 --- a/test/intrinsics/gen/textureStore/752da6.wgsl +++ b/test/intrinsics/gen/textureStore/752da6.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_752da6() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_752da6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_752da6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_752da6(); } diff --git a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl index 53b1249ac2..e029549a8a 100644 --- a/test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/752da6.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_752da6() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_752da6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_752da6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_752da6(); } diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl b/test/intrinsics/gen/textureStore/77c0ae.wgsl index b5e0ee6df1..f122e9f6c4 100644 --- a/test/intrinsics/gen/textureStore/77c0ae.wgsl +++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_77c0ae() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_77c0ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_77c0ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_77c0ae(); } diff --git a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl index d4a7597c4a..56cf0793e5 100644 --- a/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/77c0ae.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_77c0ae() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_77c0ae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_77c0ae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_77c0ae(); } diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl b/test/intrinsics/gen/textureStore/7cec8d.wgsl index 1116e70124..5b0f47b0bf 100644 --- a/test/intrinsics/gen/textureStore/7cec8d.wgsl +++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_7cec8d() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_7cec8d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_7cec8d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_7cec8d(); } diff --git a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl index 3a4687876f..89ed161d72 100644 --- a/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/7cec8d.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_7cec8d() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_7cec8d(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_7cec8d(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_7cec8d(); } diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl b/test/intrinsics/gen/textureStore/7f7fae.wgsl index 343897b995..d1d80046d2 100644 --- a/test/intrinsics/gen/textureStore/7f7fae.wgsl +++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_7f7fae() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_7f7fae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_7f7fae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_7f7fae(); } diff --git a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl index abe303f6b7..438123c898 100644 --- a/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/7f7fae.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_7f7fae() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_7f7fae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_7f7fae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_7f7fae(); } diff --git a/test/intrinsics/gen/textureStore/804942.wgsl b/test/intrinsics/gen/textureStore/804942.wgsl index be1fdb64c4..6c76b007d7 100644 --- a/test/intrinsics/gen/textureStore/804942.wgsl +++ b/test/intrinsics/gen/textureStore/804942.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_804942() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_804942(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_804942(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_804942(); } diff --git a/test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl index 5a76cea87f..f4a325c7ad 100644 --- a/test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/804942.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_804942() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_804942(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_804942(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_804942(); } diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl b/test/intrinsics/gen/textureStore/805dae.wgsl index 489a93d826..962a3ff15e 100644 --- a/test/intrinsics/gen/textureStore/805dae.wgsl +++ b/test/intrinsics/gen/textureStore/805dae.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_805dae() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_805dae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_805dae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_805dae(); } diff --git a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl index 00270ab973..667452dffa 100644 --- a/test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/805dae.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_805dae() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_805dae(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_805dae(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_805dae(); } diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl b/test/intrinsics/gen/textureStore/83bcc1.wgsl index d59c929880..657a679b33 100644 --- a/test/intrinsics/gen/textureStore/83bcc1.wgsl +++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_83bcc1() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_83bcc1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_83bcc1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_83bcc1(); } diff --git a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl index 1fbb4cf149..f0ee8634d7 100644 --- a/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/83bcc1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_83bcc1() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_83bcc1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_83bcc1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_83bcc1(); } diff --git a/test/intrinsics/gen/textureStore/872747.wgsl b/test/intrinsics/gen/textureStore/872747.wgsl index 8d11122e15..cbb964b8cd 100644 --- a/test/intrinsics/gen/textureStore/872747.wgsl +++ b/test/intrinsics/gen/textureStore/872747.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_872747() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_872747(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_872747(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_872747(); } diff --git a/test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl index 94bbebcd82..b5c291414e 100644 --- a/test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/872747.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_872747() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_872747(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_872747(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_872747(); } diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl b/test/intrinsics/gen/textureStore/8e0479.wgsl index b40e3fa07e..98b7f8c725 100644 --- a/test/intrinsics/gen/textureStore/8e0479.wgsl +++ b/test/intrinsics/gen/textureStore/8e0479.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_8e0479() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_8e0479(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_8e0479(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_8e0479(); } diff --git a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl index 42d3326aef..07408ae262 100644 --- a/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/8e0479.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8e0479() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_8e0479(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_8e0479(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_8e0479(); } diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl b/test/intrinsics/gen/textureStore/8f71a1.wgsl index f15b4dbdcc..a1298a4897 100644 --- a/test/intrinsics/gen/textureStore/8f71a1.wgsl +++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8f71a1() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_8f71a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_8f71a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_8f71a1(); } diff --git a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl index 3b5e2eccce..9bacd31188 100644 --- a/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/8f71a1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8f71a1() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_8f71a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_8f71a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_8f71a1(); } diff --git a/test/intrinsics/gen/textureStore/969534.wgsl b/test/intrinsics/gen/textureStore/969534.wgsl index 55e015316d..d87249fa4f 100644 --- a/test/intrinsics/gen/textureStore/969534.wgsl +++ b/test/intrinsics/gen/textureStore/969534.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_969534() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_969534(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_969534(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_969534(); } diff --git a/test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl index 2890165dfe..467cbdad03 100644 --- a/test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/969534.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_969534() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_969534(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_969534(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_969534(); } diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl index 3698b8f1be..0bfd6b0148 100644 --- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl +++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_9a3ecc() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9a3ecc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9a3ecc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9a3ecc(); } diff --git a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl index 701e3d8965..6fe66cb25f 100644 --- a/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/9a3ecc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_9a3ecc() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9a3ecc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9a3ecc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9a3ecc(); } diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl index 8d4d10fcd7..776ac7c117 100644 --- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl +++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_9d9cd5() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9d9cd5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9d9cd5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9d9cd5(); } diff --git a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl index 991b5131c2..346f01068b 100644 --- a/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/9d9cd5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9d9cd5() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9d9cd5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9d9cd5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9d9cd5(); } diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl index 3e42b1a332..7b643ca06e 100644 --- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl +++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_9e3ec5() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9e3ec5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9e3ec5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9e3ec5(); } diff --git a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl index f4e180ff81..aaa8bf6a56 100644 --- a/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/9e3ec5.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_9e3ec5() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_9e3ec5(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_9e3ec5(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_9e3ec5(); } diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl b/test/intrinsics/gen/textureStore/ac67aa.wgsl index e973b1b09c..19bbe7217d 100644 --- a/test/intrinsics/gen/textureStore/ac67aa.wgsl +++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ac67aa() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ac67aa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ac67aa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ac67aa(); } diff --git a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl index e38285418c..21d0d22720 100644 --- a/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/ac67aa.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ac67aa() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ac67aa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ac67aa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ac67aa(); } diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl b/test/intrinsics/gen/textureStore/b706b1.wgsl index ca942b2205..6eb9f07f22 100644 --- a/test/intrinsics/gen/textureStore/b706b1.wgsl +++ b/test/intrinsics/gen/textureStore/b706b1.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_b706b1() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_b706b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_b706b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_b706b1(); } diff --git a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl index a307e66197..7b77dc85ef 100644 --- a/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/b706b1.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_b706b1() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_b706b1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_b706b1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_b706b1(); } diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl index 19fb86429a..fc16ac9545 100644 --- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl +++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_bbcb7f() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_bbcb7f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_bbcb7f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_bbcb7f(); } diff --git a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl index cc509cf9af..8c4bb4df15 100644 --- a/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/bbcb7f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_bbcb7f() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_bbcb7f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_bbcb7f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_bbcb7f(); } diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl b/test/intrinsics/gen/textureStore/be6e30.wgsl index ab3506461c..4cd683403c 100644 --- a/test/intrinsics/gen/textureStore/be6e30.wgsl +++ b/test/intrinsics/gen/textureStore/be6e30.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d; +@group(1) @binding(0) var arg_0: texture_storage_2d; // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_be6e30() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_be6e30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_be6e30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_be6e30(); } diff --git a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl index 0b92506b96..3a4c747e01 100644 --- a/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/be6e30.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d; +@group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_be6e30() { textureStore(arg_0, vec2(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_be6e30(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_be6e30(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_be6e30(); } diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl b/test/intrinsics/gen/textureStore/bf775c.wgsl index 7f2317225b..b3671320e0 100644 --- a/test/intrinsics/gen/textureStore/bf775c.wgsl +++ b/test/intrinsics/gen/textureStore/bf775c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_bf775c() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_bf775c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_bf775c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_bf775c(); } diff --git a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl index c93ab8e98b..db5d80e7be 100644 --- a/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/bf775c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_bf775c() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_bf775c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_bf775c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_bf775c(); } diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl b/test/intrinsics/gen/textureStore/c5af1e.wgsl index 205da5505d..e4cbfa9c4f 100644 --- a/test/intrinsics/gen/textureStore/c5af1e.wgsl +++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_c5af1e() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_c5af1e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_c5af1e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_c5af1e(); } diff --git a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl index 0d46ada64e..02c2ef8e18 100644 --- a/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/c5af1e.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_c5af1e() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_c5af1e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_c5af1e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_c5af1e(); } diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl b/test/intrinsics/gen/textureStore/c863be.wgsl index 456fafcfec..b3d05f83a2 100644 --- a/test/intrinsics/gen/textureStore/c863be.wgsl +++ b/test/intrinsics/gen/textureStore/c863be.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_c863be() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_c863be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_c863be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_c863be(); } diff --git a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl index 147d8bec30..46b5a6920c 100644 --- a/test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/c863be.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c863be() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_c863be(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_c863be(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_c863be(); } diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl b/test/intrinsics/gen/textureStore/d73b5c.wgsl index b91a45f2c0..29a764defe 100644 --- a/test/intrinsics/gen/textureStore/d73b5c.wgsl +++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_d73b5c() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_d73b5c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_d73b5c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_d73b5c(); } diff --git a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl index 38b9a978eb..2b09cbc70e 100644 --- a/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/d73b5c.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_d73b5c() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_d73b5c(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_d73b5c(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_d73b5c(); } diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl b/test/intrinsics/gen/textureStore/dd7d81.wgsl index f0f003971e..4730c2e84d 100644 --- a/test/intrinsics/gen/textureStore/dd7d81.wgsl +++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_dd7d81() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_dd7d81(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_dd7d81(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_dd7d81(); } diff --git a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl index e99a25f60d..f7f4bc1ec9 100644 --- a/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/dd7d81.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_dd7d81() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_dd7d81(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_dd7d81(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_dd7d81(); } diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl b/test/intrinsics/gen/textureStore/dde364.wgsl index b9f429dbda..705024792c 100644 --- a/test/intrinsics/gen/textureStore/dde364.wgsl +++ b/test/intrinsics/gen/textureStore/dde364.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_dde364() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_dde364(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_dde364(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_dde364(); } diff --git a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl index 87583fda2b..044b09d03d 100644 --- a/test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/dde364.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dde364() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_dde364(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_dde364(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_dde364(); } diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl b/test/intrinsics/gen/textureStore/e885e8.wgsl index c1ca56a7c1..fd0c31caf1 100644 --- a/test/intrinsics/gen/textureStore/e885e8.wgsl +++ b/test/intrinsics/gen/textureStore/e885e8.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_e885e8() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_e885e8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_e885e8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_e885e8(); } diff --git a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl index f8dbae5568..eac4ea6fbe 100644 --- a/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/e885e8.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_e885e8() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_e885e8(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_e885e8(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_e885e8(); } diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl b/test/intrinsics/gen/textureStore/eb702f.wgsl index a0410f9fa0..283888d035 100644 --- a/test/intrinsics/gen/textureStore/eb702f.wgsl +++ b/test/intrinsics/gen/textureStore/eb702f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb702f() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_eb702f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_eb702f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_eb702f(); } diff --git a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl index 43e39bebf4..c2b8653104 100644 --- a/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/eb702f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb702f() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_eb702f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_eb702f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_eb702f(); } diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl b/test/intrinsics/gen/textureStore/eb78b9.wgsl index 16711fee6b..db051b1d1d 100644 --- a/test/intrinsics/gen/textureStore/eb78b9.wgsl +++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb78b9() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_eb78b9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_eb78b9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_eb78b9(); } diff --git a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl index b5f9092e1f..09472aed9a 100644 --- a/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/eb78b9.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb78b9() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_eb78b9(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_eb78b9(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_eb78b9(); } diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl b/test/intrinsics/gen/textureStore/ee6acc.wgsl index 3f431a4c36..b6db2d0e50 100644 --- a/test/intrinsics/gen/textureStore/ee6acc.wgsl +++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ee6acc() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ee6acc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ee6acc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ee6acc(); } diff --git a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl index f3e5b9ed39..8b5b0ab80e 100644 --- a/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/ee6acc.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ee6acc() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ee6acc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ee6acc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ee6acc(); } diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl index 4519ff92b8..51c8545b10 100644 --- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl +++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ef9f2f() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ef9f2f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ef9f2f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ef9f2f(); } diff --git a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl index 8841b4f582..72cb6d0b96 100644 --- a/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/ef9f2f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ef9f2f() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_ef9f2f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_ef9f2f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_ef9f2f(); } diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl b/test/intrinsics/gen/textureStore/f8dead.wgsl index 171a9512dd..8cd8a241e5 100644 --- a/test/intrinsics/gen/textureStore/f8dead.wgsl +++ b/test/intrinsics/gen/textureStore/f8dead.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_3d; +@group(1) @binding(0) var arg_0: texture_storage_3d; // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_f8dead() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_f8dead(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_f8dead(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_f8dead(); } diff --git a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl index a90cf4a7c8..eabfbca22d 100644 --- a/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/f8dead.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_3d; +@group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_f8dead() { textureStore(arg_0, vec3(), vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_f8dead(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_f8dead(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_f8dead(); } diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl b/test/intrinsics/gen/textureStore/f9be83.wgsl index fb1da82cc7..a5f5b60470 100644 --- a/test/intrinsics/gen/textureStore/f9be83.wgsl +++ b/test/intrinsics/gen/textureStore/f9be83.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_f9be83() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_f9be83(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_f9be83(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_f9be83(); } diff --git a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl index 5aaf5282bb..c6bb3c4846 100644 --- a/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/f9be83.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_f9be83() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_f9be83(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_f9be83(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_f9be83(); } diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl index 518c2fb981..e8002d0eef 100644 --- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl +++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_1d; +@group(1) @binding(0) var arg_0: texture_storage_1d; // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_fb9a8f() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_fb9a8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_fb9a8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_fb9a8f(); } diff --git a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl index 4c1a8a2680..27aa300648 100644 --- a/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/fb9a8f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_1d; +@group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_fb9a8f() { textureStore(arg_0, 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_fb9a8f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_fb9a8f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_fb9a8f(); } diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl b/test/intrinsics/gen/textureStore/fbf53f.wgsl index a1878e49f2..eefd540874 100644 --- a/test/intrinsics/gen/textureStore/fbf53f.wgsl +++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl @@ -22,25 +22,25 @@ // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// -[[group(1), binding(0)]] var arg_0: texture_storage_2d_array; +@group(1) @binding(0) var arg_0: texture_storage_2d_array; // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_fbf53f() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_fbf53f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_fbf53f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_fbf53f(); } diff --git a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl index 203bf52421..8ee531692e 100644 --- a/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/textureStore/fbf53f.wgsl.expected.wgsl @@ -1,21 +1,21 @@ -[[group(1), binding(0)]] var arg_0 : texture_storage_2d_array; +@group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_fbf53f() { textureStore(arg_0, vec2(), 1, vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { textureStore_fbf53f(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { textureStore_fbf53f(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { textureStore_fbf53f(); } diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl b/test/intrinsics/gen/transpose/2585cd.wgsl index ad87b7257f..d693d259f1 100644 --- a/test/intrinsics/gen/transpose/2585cd.wgsl +++ b/test/intrinsics/gen/transpose/2585cd.wgsl @@ -28,18 +28,18 @@ fn transpose_2585cd() { var res: mat3x4 = transpose(mat4x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_2585cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_2585cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_2585cd(); } diff --git a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl index acb366ce53..e2bcbee591 100644 --- a/test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/2585cd.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_2585cd() { var res : mat3x4 = transpose(mat4x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_2585cd(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_2585cd(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_2585cd(); } diff --git a/test/intrinsics/gen/transpose/31d679.wgsl b/test/intrinsics/gen/transpose/31d679.wgsl index 7bfdcdc645..2f5b72a35a 100644 --- a/test/intrinsics/gen/transpose/31d679.wgsl +++ b/test/intrinsics/gen/transpose/31d679.wgsl @@ -28,18 +28,18 @@ fn transpose_31d679() { var res: mat2x2 = transpose(mat2x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_31d679(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_31d679(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_31d679(); } diff --git a/test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl index 32d466ce90..f588cbaf60 100644 --- a/test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/31d679.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_31d679() { var res : mat2x2 = transpose(mat2x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_31d679(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_31d679(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_31d679(); } diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl b/test/intrinsics/gen/transpose/31e37e.wgsl index 4896ecb453..0246329c35 100644 --- a/test/intrinsics/gen/transpose/31e37e.wgsl +++ b/test/intrinsics/gen/transpose/31e37e.wgsl @@ -28,18 +28,18 @@ fn transpose_31e37e() { var res: mat2x4 = transpose(mat4x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_31e37e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_31e37e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_31e37e(); } diff --git a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl index e603075c0b..3462f91963 100644 --- a/test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/31e37e.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_31e37e() { var res : mat2x4 = transpose(mat4x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_31e37e(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_31e37e(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_31e37e(); } diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl b/test/intrinsics/gen/transpose/4ce359.wgsl index 4f0f9f0460..5f8c9ccada 100644 --- a/test/intrinsics/gen/transpose/4ce359.wgsl +++ b/test/intrinsics/gen/transpose/4ce359.wgsl @@ -28,18 +28,18 @@ fn transpose_4ce359() { var res: mat4x2 = transpose(mat2x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_4ce359(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_4ce359(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_4ce359(); } diff --git a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl index 92bc18ef76..a4123d5fa9 100644 --- a/test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/4ce359.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_4ce359() { var res : mat4x2 = transpose(mat2x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_4ce359(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_4ce359(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_4ce359(); } diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl b/test/intrinsics/gen/transpose/4dc9a1.wgsl index 492bef4b24..f98f9e2df1 100644 --- a/test/intrinsics/gen/transpose/4dc9a1.wgsl +++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl @@ -28,18 +28,18 @@ fn transpose_4dc9a1() { var res: mat3x2 = transpose(mat2x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_4dc9a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_4dc9a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_4dc9a1(); } diff --git a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl index 1c5ca705c6..9a579e0022 100644 --- a/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/4dc9a1.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_4dc9a1() { var res : mat3x2 = transpose(mat2x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_4dc9a1(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_4dc9a1(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_4dc9a1(); } diff --git a/test/intrinsics/gen/transpose/854336.wgsl b/test/intrinsics/gen/transpose/854336.wgsl index 88838ca1b9..9dccf318d8 100644 --- a/test/intrinsics/gen/transpose/854336.wgsl +++ b/test/intrinsics/gen/transpose/854336.wgsl @@ -28,18 +28,18 @@ fn transpose_854336() { var res: mat3x3 = transpose(mat3x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_854336(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_854336(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_854336(); } diff --git a/test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl index f00a06df28..9eac4c0547 100644 --- a/test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/854336.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_854336() { var res : mat3x3 = transpose(mat3x3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_854336(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_854336(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_854336(); } diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl b/test/intrinsics/gen/transpose/c1b600.wgsl index cbb790f48a..e0fc4fc8a6 100644 --- a/test/intrinsics/gen/transpose/c1b600.wgsl +++ b/test/intrinsics/gen/transpose/c1b600.wgsl @@ -28,18 +28,18 @@ fn transpose_c1b600() { var res: mat4x4 = transpose(mat4x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_c1b600(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_c1b600(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_c1b600(); } diff --git a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl index 5bf3104298..f391f5c3ab 100644 --- a/test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/c1b600.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_c1b600() { var res : mat4x4 = transpose(mat4x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_c1b600(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_c1b600(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_c1b600(); } diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl b/test/intrinsics/gen/transpose/d8f8ba.wgsl index ba8e6d8183..a09be46334 100644 --- a/test/intrinsics/gen/transpose/d8f8ba.wgsl +++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl @@ -28,18 +28,18 @@ fn transpose_d8f8ba() { var res: mat4x3 = transpose(mat3x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_d8f8ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_d8f8ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_d8f8ba(); } diff --git a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl index eef54bce04..e5af1d47a7 100644 --- a/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/d8f8ba.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_d8f8ba() { var res : mat4x3 = transpose(mat3x4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_d8f8ba(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_d8f8ba(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_d8f8ba(); } diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl b/test/intrinsics/gen/transpose/ed4bdc.wgsl index 5b6c2eeadc..0ed170e7c3 100644 --- a/test/intrinsics/gen/transpose/ed4bdc.wgsl +++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl @@ -28,18 +28,18 @@ fn transpose_ed4bdc() { var res: mat2x3 = transpose(mat3x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_ed4bdc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_ed4bdc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_ed4bdc(); } diff --git a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl index 85faea7a96..462a2cf536 100644 --- a/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/transpose/ed4bdc.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn transpose_ed4bdc() { var res : mat2x3 = transpose(mat3x2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { transpose_ed4bdc(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { transpose_ed4bdc(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { transpose_ed4bdc(); } diff --git a/test/intrinsics/gen/trunc/562d05.wgsl b/test/intrinsics/gen/trunc/562d05.wgsl index b58d624ffa..65a0b42c3f 100644 --- a/test/intrinsics/gen/trunc/562d05.wgsl +++ b/test/intrinsics/gen/trunc/562d05.wgsl @@ -28,18 +28,18 @@ fn trunc_562d05() { var res: vec3 = trunc(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_562d05(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_562d05(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_562d05(); } diff --git a/test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl b/test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl index bf158125de..cef969738f 100644 --- a/test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl +++ b/test/intrinsics/gen/trunc/562d05.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn trunc_562d05() { var res : vec3 = trunc(vec3()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_562d05(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_562d05(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_562d05(); } diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl b/test/intrinsics/gen/trunc/e183aa.wgsl index 41930876c2..186a1e9df8 100644 --- a/test/intrinsics/gen/trunc/e183aa.wgsl +++ b/test/intrinsics/gen/trunc/e183aa.wgsl @@ -28,18 +28,18 @@ fn trunc_e183aa() { var res: vec4 = trunc(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_e183aa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_e183aa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_e183aa(); } diff --git a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl index 95244798ba..94e505f668 100644 --- a/test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl +++ b/test/intrinsics/gen/trunc/e183aa.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn trunc_e183aa() { var res : vec4 = trunc(vec4()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_e183aa(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_e183aa(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_e183aa(); } diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl b/test/intrinsics/gen/trunc/eb83df.wgsl index 665f857d8c..4da7b28771 100644 --- a/test/intrinsics/gen/trunc/eb83df.wgsl +++ b/test/intrinsics/gen/trunc/eb83df.wgsl @@ -28,18 +28,18 @@ fn trunc_eb83df() { var res: f32 = trunc(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_eb83df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_eb83df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_eb83df(); } diff --git a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl index d5c576ffc6..7392b6cfc7 100644 --- a/test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl +++ b/test/intrinsics/gen/trunc/eb83df.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn trunc_eb83df() { var res : f32 = trunc(1.0); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_eb83df(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_eb83df(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_eb83df(); } diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl b/test/intrinsics/gen/trunc/f370d3.wgsl index a46eb9352c..0587914772 100644 --- a/test/intrinsics/gen/trunc/f370d3.wgsl +++ b/test/intrinsics/gen/trunc/f370d3.wgsl @@ -28,18 +28,18 @@ fn trunc_f370d3() { var res: vec2 = trunc(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_f370d3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_f370d3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_f370d3(); } diff --git a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl index 11cb91b8bf..8393d973d2 100644 --- a/test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/trunc/f370d3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn trunc_f370d3() { var res : vec2 = trunc(vec2()); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { trunc_f370d3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { trunc_f370d3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { trunc_f370d3(); } diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl index bd2aa9fdf9..db4b36b308 100644 --- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl +++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl @@ -28,18 +28,18 @@ fn unpack2x16float_32a5cf() { var res: vec2 = unpack2x16float(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16float_32a5cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16float_32a5cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16float_32a5cf(); } diff --git a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl index 768b0cd1d8..fac905879c 100644 --- a/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl +++ b/test/intrinsics/gen/unpack2x16float/32a5cf.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn unpack2x16float_32a5cf() { var res : vec2 = unpack2x16float(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16float_32a5cf(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16float_32a5cf(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16float_32a5cf(); } diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl index 4292645979..0ff4ddd98e 100644 --- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl +++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl @@ -28,18 +28,18 @@ fn unpack2x16snorm_b4aea6() { var res: vec2 = unpack2x16snorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16snorm_b4aea6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16snorm_b4aea6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16snorm_b4aea6(); } diff --git a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl index 144bba75fc..a97f8754b8 100644 --- a/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/unpack2x16snorm/b4aea6.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn unpack2x16snorm_b4aea6() { var res : vec2 = unpack2x16snorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16snorm_b4aea6(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16snorm_b4aea6(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16snorm_b4aea6(); } diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl index 0961fa6a95..7a5e3ad5a0 100644 --- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl +++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl @@ -28,18 +28,18 @@ fn unpack2x16unorm_7699c0() { var res: vec2 = unpack2x16unorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16unorm_7699c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16unorm_7699c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16unorm_7699c0(); } diff --git a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl index b4ea31187d..784f95a804 100644 --- a/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/unpack2x16unorm/7699c0.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn unpack2x16unorm_7699c0() { var res : vec2 = unpack2x16unorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack2x16unorm_7699c0(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack2x16unorm_7699c0(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack2x16unorm_7699c0(); } diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl index 5262a7a4b5..0692bf2872 100644 --- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl +++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl @@ -28,18 +28,18 @@ fn unpack4x8snorm_523fb3() { var res: vec4 = unpack4x8snorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack4x8snorm_523fb3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack4x8snorm_523fb3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack4x8snorm_523fb3(); } diff --git a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl index a2f5337096..d3baad3594 100644 --- a/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/unpack4x8snorm/523fb3.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn unpack4x8snorm_523fb3() { var res : vec4 = unpack4x8snorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack4x8snorm_523fb3(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack4x8snorm_523fb3(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack4x8snorm_523fb3(); } diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl index 2c95b9dede..f0fcae3765 100644 --- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl +++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl @@ -28,18 +28,18 @@ fn unpack4x8unorm_750c74() { var res: vec4 = unpack4x8unorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack4x8unorm_750c74(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack4x8unorm_750c74(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack4x8unorm_750c74(); } diff --git a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl index 45f934ad95..bfedafb717 100644 --- a/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl +++ b/test/intrinsics/gen/unpack4x8unorm/750c74.wgsl.expected.wgsl @@ -2,18 +2,18 @@ fn unpack4x8unorm_750c74() { var res : vec4 = unpack4x8unorm(1u); } -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { unpack4x8unorm_750c74(); return vec4(); } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { unpack4x8unorm_750c74(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { unpack4x8unorm_750c74(); } diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl b/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl index 983f114fd7..a0065479df 100644 --- a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl +++ b/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl @@ -28,7 +28,7 @@ fn workgroupBarrier_a17f7f() { workgroupBarrier(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { workgroupBarrier_a17f7f(); } diff --git a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl b/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl index 771ed9af2e..34db6c85a0 100644 --- a/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/workgroupBarrier/a17f7f.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn workgroupBarrier_a17f7f() { workgroupBarrier(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { workgroupBarrier_a17f7f(); } diff --git a/test/intrinsics/ignore/call.wgsl b/test/intrinsics/ignore/call.wgsl index b3ff386302..f7c03df686 100644 --- a/test/intrinsics/ignore/call.wgsl +++ b/test/intrinsics/ignore/call.wgsl @@ -2,7 +2,7 @@ fn f(a: i32, b: i32, c: i32) -> i32 { return a * b + c; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(f(1, 2, 3)); } diff --git a/test/intrinsics/ignore/call.wgsl.expected.wgsl b/test/intrinsics/ignore/call.wgsl.expected.wgsl index 4ab9b94daf..49c50c7b12 100644 --- a/test/intrinsics/ignore/call.wgsl.expected.wgsl +++ b/test/intrinsics/ignore/call.wgsl.expected.wgsl @@ -6,7 +6,7 @@ fn f(a : i32, b : i32, c : i32) -> i32 { return ((a * b) + c); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(f(1, 2, 3)); } diff --git a/test/intrinsics/ignore/runtime_array.wgsl b/test/intrinsics/ignore/runtime_array.wgsl index b7cc1e78ba..c76ba03379 100644 --- a/test/intrinsics/ignore/runtime_array.wgsl +++ b/test/intrinsics/ignore/runtime_array.wgsl @@ -2,9 +2,9 @@ struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(s.arr); } diff --git a/test/intrinsics/ignore/runtime_array.wgsl.expected.wgsl b/test/intrinsics/ignore/runtime_array.wgsl.expected.wgsl index e58a70c3fd..310405a5f1 100644 --- a/test/intrinsics/ignore/runtime_array.wgsl.expected.wgsl +++ b/test/intrinsics/ignore/runtime_array.wgsl.expected.wgsl @@ -6,9 +6,9 @@ struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(s.arr); } diff --git a/test/intrinsics/ignore/storage_buffer.wgsl b/test/intrinsics/ignore/storage_buffer.wgsl index be63c032d2..7243c04bc3 100644 --- a/test/intrinsics/ignore/storage_buffer.wgsl +++ b/test/intrinsics/ignore/storage_buffer.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(s); ignore(s.i); diff --git a/test/intrinsics/ignore/storage_buffer.wgsl.expected.wgsl b/test/intrinsics/ignore/storage_buffer.wgsl.expected.wgsl index 0f2f5e96ed..4e69a8d5b3 100644 --- a/test/intrinsics/ignore/storage_buffer.wgsl.expected.wgsl +++ b/test/intrinsics/ignore/storage_buffer.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct S { i : i32; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(s); ignore(s.i); diff --git a/test/intrinsics/ignore/uniform_buffer.wgsl b/test/intrinsics/ignore/uniform_buffer.wgsl index bf92e75714..860867a504 100644 --- a/test/intrinsics/ignore/uniform_buffer.wgsl +++ b/test/intrinsics/ignore/uniform_buffer.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; }; -[[binding(0), group(0)]] var u : S; +@binding(0) @group(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(u); ignore(u.i); diff --git a/test/intrinsics/ignore/uniform_buffer.wgsl.expected.wgsl b/test/intrinsics/ignore/uniform_buffer.wgsl.expected.wgsl index 72a1efe67b..7a256746e3 100644 --- a/test/intrinsics/ignore/uniform_buffer.wgsl.expected.wgsl +++ b/test/intrinsics/ignore/uniform_buffer.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct S { i : i32; } -[[binding(0), group(0)]] var u : S; +@binding(0) @group(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { ignore(u); ignore(u.i); diff --git a/test/intrinsics/intrinsics.wgsl.tmpl b/test/intrinsics/intrinsics.wgsl.tmpl index 16f72c3fc2..254fb1611a 100644 --- a/test/intrinsics/intrinsics.wgsl.tmpl +++ b/test/intrinsics/intrinsics.wgsl.tmpl @@ -41,7 +41,7 @@ See: struct SB_RW { {{- $sb_rw_fields -}} }; -[[group(0), binding(0)]] var sb_rw : SB_RW; +@group(0) @binding(0) var sb_rw : SB_RW; {{ end -}} {{- /* Generate RO storage buffer parameters */ -}} @@ -54,7 +54,7 @@ struct SB_RW { struct SB_RO { {{- $sb_ro_fields -}} }; -[[group(0), binding(1)]] var sb_ro : SB_RO; +@group(0) @binding(1) var sb_ro : SB_RO; {{ end -}} {{- /* Generate uniform buffer parameters */ -}} @@ -67,7 +67,7 @@ struct SB_RO { struct UB { {{- $ub_fields -}} }; -[[group(0), binding(1)]] var ub : UB; +@group(0) @binding(1) var ub : UB; {{ end -}} {{- /* Generate module-scoped handle variables */ -}} @@ -76,7 +76,7 @@ struct UB { {{- if eq "ptr" $p.Type.Target.Name -}} {{- $el_type := Eval "Type" (index $p.Type.TemplateArguments 1)}} {{- if eq "handle" $class -}} - [[group(1), binding({{$i}})]] var arg_{{$i}}: {{$el_type}}; + @group(1) @binding({{$i}}) var arg_{{$i}}: {{$el_type}}; {{ $args.Put $i (printf "&arg_%v" $i) -}} {{- else if eq "workgroup" $class -}} var arg_{{$i}}: {{$el_type}}; @@ -88,7 +88,7 @@ struct UB { {{- else -}} {{- $type := Eval "Type" $p.Type}} {{- if eq "handle" $class -}} - [[group(1), binding({{$i}})]] var arg_{{$i}}: {{$type}}; + @group(1) @binding({{$i}}) var arg_{{$i}}: {{$type}}; {{ $args.Put $i (printf "arg_%v" $i) -}} {{- else if eq "workgroup" $class -}} var arg_{{$i}}: {{$type}}; @@ -131,22 +131,22 @@ fn {{$permutation}}() { {{/*new line*/ -}} {{- if .CanBeUsedInStage.Vertex }} -[[stage(vertex)]] -fn vertex_main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vertex_main() -> @builtin(position) vec4 { {{$permutation}}(); return vec4(); } {{ end -}} {{- if .CanBeUsedInStage.Fragment }} -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { {{$permutation}}(); } {{ end -}} {{- if .CanBeUsedInStage.Compute }} -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn compute_main() { {{$permutation}}(); } diff --git a/test/intrinsics/modf.wgsl b/test/intrinsics/modf.wgsl index f8b1cf3d38..6991b74f30 100644 --- a/test/intrinsics/modf.wgsl +++ b/test/intrinsics/modf.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let res = modf(1.23); let fract : f32 = res.fract; diff --git a/test/intrinsics/modf.wgsl.expected.wgsl b/test/intrinsics/modf.wgsl.expected.wgsl index ba6a7c68df..8e95d07f81 100644 --- a/test/intrinsics/modf.wgsl.expected.wgsl +++ b/test/intrinsics/modf.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let res = modf(1.230000019); let fract : f32 = res.fract; diff --git a/test/intrinsics/radians.spvasm.expected.wgsl b/test/intrinsics/radians.spvasm.expected.wgsl index 8edc85e331..1203bfeb8f 100644 --- a/test/intrinsics/radians.spvasm.expected.wgsl +++ b/test/intrinsics/radians.spvasm.expected.wgsl @@ -7,7 +7,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/intrinsics/repeated_use.wgsl b/test/intrinsics/repeated_use.wgsl index 8a5e175072..0ca4cad24e 100644 --- a/test/intrinsics/repeated_use.wgsl +++ b/test/intrinsics/repeated_use.wgsl @@ -1,6 +1,6 @@ // Check that for backends that generate intrinsic helpers, repeated use of the // same intrinsic overload results in single helper being generated. -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = isNormal(vec4()); _ = isNormal(vec4(1.)); diff --git a/test/intrinsics/repeated_use.wgsl.expected.wgsl b/test/intrinsics/repeated_use.wgsl.expected.wgsl index a654f4b59d..3f21e25dd9 100644 --- a/test/intrinsics/repeated_use.wgsl.expected.wgsl +++ b/test/intrinsics/repeated_use.wgsl.expected.wgsl @@ -46,7 +46,7 @@ intrinsics/repeated_use.wgsl:19:9 warning: use of deprecated intrinsic _ = isNormal(3.); ^^^^^^^^ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = isNormal(vec4()); _ = isNormal(vec4(1.0)); diff --git a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl index d7e9e8b7c7..f6e2411554 100644 --- a/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl +++ b/test/intrinsics/textureDimensions/depth_ms.spvasm.expected.wgsl @@ -1,4 +1,4 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; var tint_symbol_1 : vec4 = vec4(); @@ -21,11 +21,11 @@ fn vertex_main_1() { } struct vertex_main_out { - [[builtin(position)]] + @builtin(position) tint_symbol_1_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vertex_main() -> vertex_main_out { vertex_main_1(); return vertex_main_out(tint_symbol_1); @@ -36,7 +36,7 @@ fn fragment_main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fragment_main_1(); } @@ -46,7 +46,7 @@ fn compute_main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn compute_main() { compute_main_1(); } diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl b/test/intrinsics/textureGather/f32/alpha.wgsl index d61f99b6f2..1336988542 100644 --- a/test/intrinsics/textureGather/f32/alpha.wgsl +++ b/test/intrinsics/textureGather/f32/alpha.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl b/test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl index fada6d1b35..3cf1392938 100644 --- a/test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/f32/alpha.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/blue.wgsl b/test/intrinsics/textureGather/f32/blue.wgsl index b8251ee16a..f31387b1cd 100644 --- a/test/intrinsics/textureGather/f32/blue.wgsl +++ b/test/intrinsics/textureGather/f32/blue.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl b/test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl index 18cc654c84..2512919ec6 100644 --- a/test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/f32/blue.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/green.wgsl b/test/intrinsics/textureGather/f32/green.wgsl index f0960ce77c..c0574ca628 100644 --- a/test/intrinsics/textureGather/f32/green.wgsl +++ b/test/intrinsics/textureGather/f32/green.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl b/test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl index 778bc1cc05..524c0c4efb 100644 --- a/test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/f32/green.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/red.wgsl b/test/intrinsics/textureGather/f32/red.wgsl index 89772c984d..4eb8c60275 100644 --- a/test/intrinsics/textureGather/f32/red.wgsl +++ b/test/intrinsics/textureGather/f32/red.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl b/test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl index 4853506cae..05244292d2 100644 --- a/test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/f32/red.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl b/test/intrinsics/textureGather/i32/alpha.wgsl index d83c3cae2f..42133c99aa 100644 --- a/test/intrinsics/textureGather/i32/alpha.wgsl +++ b/test/intrinsics/textureGather/i32/alpha.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl b/test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl index 206d81691e..35d727c4b4 100644 --- a/test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/i32/alpha.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/blue.wgsl b/test/intrinsics/textureGather/i32/blue.wgsl index 13275afeb0..396dd5204a 100644 --- a/test/intrinsics/textureGather/i32/blue.wgsl +++ b/test/intrinsics/textureGather/i32/blue.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl b/test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl index af7f0956ea..116439f117 100644 --- a/test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/i32/blue.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/green.wgsl b/test/intrinsics/textureGather/i32/green.wgsl index ecf2d658c2..ee162d149f 100644 --- a/test/intrinsics/textureGather/i32/green.wgsl +++ b/test/intrinsics/textureGather/i32/green.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl b/test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl index 862c6441c7..6f7512284d 100644 --- a/test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/i32/green.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/red.wgsl b/test/intrinsics/textureGather/i32/red.wgsl index 1516eea168..60117f7d8b 100644 --- a/test/intrinsics/textureGather/i32/red.wgsl +++ b/test/intrinsics/textureGather/i32/red.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl b/test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl index 7a505f6881..c2552b0717 100644 --- a/test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/i32/red.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl b/test/intrinsics/textureGather/u32/alpha.wgsl index 9aeef80e50..adcc5fd950 100644 --- a/test/intrinsics/textureGather/u32/alpha.wgsl +++ b/test/intrinsics/textureGather/u32/alpha.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl b/test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl index fc21f332eb..496586d125 100644 --- a/test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/u32/alpha.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(3, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/blue.wgsl b/test/intrinsics/textureGather/u32/blue.wgsl index 9751b7c537..30e266c9e8 100644 --- a/test/intrinsics/textureGather/u32/blue.wgsl +++ b/test/intrinsics/textureGather/u32/blue.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl b/test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl index 5fdeb7e1e2..eb2c3e1300 100644 --- a/test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/u32/blue.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(2, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/green.wgsl b/test/intrinsics/textureGather/u32/green.wgsl index 83edac0241..5b9ae18526 100644 --- a/test/intrinsics/textureGather/u32/green.wgsl +++ b/test/intrinsics/textureGather/u32/green.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl b/test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl index 17b8423ac1..935c1e255f 100644 --- a/test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/u32/green.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(1, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/red.wgsl b/test/intrinsics/textureGather/u32/red.wgsl index e3ca7f8ab2..70ec158f37 100644 --- a/test/intrinsics/textureGather/u32/red.wgsl +++ b/test/intrinsics/textureGather/u32/red.wgsl @@ -1,7 +1,7 @@ -[[group(1), binding(0)]] var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(0) var t : texture_2d; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl b/test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl index d3b2be8169..528958dc87 100644 --- a/test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl +++ b/test/intrinsics/textureGather/u32/red.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(1), binding(0)]] var t : texture_2d; +@group(1) @binding(0) var t : texture_2d; -[[group(1), binding(1)]] var s : sampler; +@group(1) @binding(1) var s : sampler; -[[stage(fragment)]] +@stage(fragment) fn main() { var res : vec4 = textureGather(0, t, s, vec2()); } diff --git a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl index 13f9223af6..7590a16dea 100644 --- a/test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl +++ b/test/intrinsics/textureLoad/depth_ms.spvasm.expected.wgsl @@ -1,4 +1,4 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; var tint_symbol_1 : vec4 = vec4(); @@ -21,11 +21,11 @@ fn vertex_main_1() { } struct vertex_main_out { - [[builtin(position)]] + @builtin(position) tint_symbol_1_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vertex_main() -> vertex_main_out { vertex_main_1(); return vertex_main_out(tint_symbol_1); @@ -36,7 +36,7 @@ fn fragment_main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fragment_main_1(); } @@ -46,7 +46,7 @@ fn compute_main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn compute_main() { compute_main_1(); } diff --git a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl index bafa3a8ef1..deac9d06a3 100644 --- a/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl +++ b/test/intrinsics/textureNumSamples/depth_ms.spvasm.expected.wgsl @@ -1,4 +1,4 @@ -[[group(1), binding(0)]] var arg_0 : texture_depth_multisampled_2d; +@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; var tint_symbol_1 : vec4 = vec4(); @@ -21,11 +21,11 @@ fn vertex_main_1() { } struct vertex_main_out { - [[builtin(position)]] + @builtin(position) tint_symbol_1_1 : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vertex_main() -> vertex_main_out { vertex_main_1(); return vertex_main_out(tint_symbol_1); @@ -36,7 +36,7 @@ fn fragment_main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn fragment_main() { fragment_main_1(); } @@ -46,7 +46,7 @@ fn compute_main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn compute_main() { compute_main_1(); } diff --git a/test/layout/storage/mat2x2/f32.wgsl b/test/layout/storage/mat2x2/f32.wgsl index 2be17c3f45..3b2c0bf32f 100644 --- a/test/layout/storage/mat2x2/f32.wgsl +++ b/test/layout/storage/mat2x2/f32.wgsl @@ -1,9 +1,9 @@ struct SSBO { m : mat2x2; }; -[[group(0), binding(0)]] var ssbo : SSBO; +@group(0) @binding(0) var ssbo : SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let v = ssbo.m; ssbo.m = v; diff --git a/test/layout/storage/mat2x2/f32.wgsl.expected.wgsl b/test/layout/storage/mat2x2/f32.wgsl.expected.wgsl index 9933db6f5f..2cdd7f6985 100644 --- a/test/layout/storage/mat2x2/f32.wgsl.expected.wgsl +++ b/test/layout/storage/mat2x2/f32.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct SSBO { m : mat2x2; } -[[group(0), binding(0)]] var ssbo : SSBO; +@group(0) @binding(0) var ssbo : SSBO; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { let v = ssbo.m; ssbo.m = v; diff --git a/test/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl b/test/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl index ffb157a314..a368ee1721 100644 --- a/test/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl +++ b/test/layout/storage/mat2x2/stride/16.spvasm.expected.wgsl @@ -1,15 +1,15 @@ struct SSBO { - m : [[stride(16)]] array, 2u>; + m : @stride(16) array, 2u>; } -[[group(0), binding(0)]] var ssbo : SSBO; +@group(0) @binding(0) var ssbo : SSBO; -fn arr_to_mat2x2_stride_16(arr : [[stride(16)]] array, 2u>) -> mat2x2 { +fn arr_to_mat2x2_stride_16(arr : @stride(16) array, 2u>) -> mat2x2 { return mat2x2(arr[0u], arr[1u]); } -fn mat2x2_stride_16_to_arr(mat : mat2x2) -> [[stride(16)]] array, 2u> { - return [[stride(16)]] array, 2u>(mat[0u], mat[1u]); +fn mat2x2_stride_16_to_arr(mat : mat2x2) -> @stride(16) array, 2u> { + return @stride(16) array, 2u>(mat[0u], mat[1u]); } fn f_1() { @@ -18,7 +18,7 @@ fn f_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn f() { f_1(); } diff --git a/test/let/global/global.wgsl b/test/let/global/global.wgsl index 7928f9b96d..1dd906db2b 100644 --- a/test/let/global/global.wgsl +++ b/test/let/global/global.wgsl @@ -18,7 +18,7 @@ let v7 = mat3x3(vec3(1.0, 1.0, 1.0), vec3(1.0, 1.0, 1.0), vec3 [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0,0.0,0.0,0.0); } diff --git a/test/let/global/global.wgsl.expected.wgsl b/test/let/global/global.wgsl.expected.wgsl index 68c5ae57a9..60a1e361bb 100644 --- a/test/let/global/global.wgsl.expected.wgsl +++ b/test/let/global/global.wgsl.expected.wgsl @@ -22,7 +22,7 @@ let v8 = MyStruct(); let v9 = MyArray(); -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0, 0.0, 0.0, 0.0); } diff --git a/test/let/inferred/function.wgsl b/test/let/inferred/function.wgsl index 15fc9fafcd..cb6684546b 100644 --- a/test/let/inferred/function.wgsl +++ b/test/let/inferred/function.wgsl @@ -33,7 +33,7 @@ fn let_decls() { let v15 = ret_MyArray(); } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0,0.0,0.0,0.0); } diff --git a/test/let/inferred/function.wgsl.expected.wgsl b/test/let/inferred/function.wgsl.expected.wgsl index 4f5b69ac66..e2f46537a9 100644 --- a/test/let/inferred/function.wgsl.expected.wgsl +++ b/test/let/inferred/function.wgsl.expected.wgsl @@ -42,7 +42,7 @@ fn let_decls() { let v15 = ret_MyArray(); } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0, 0.0, 0.0, 0.0); } diff --git a/test/loops/continue_in_switch.wgsl b/test/loops/continue_in_switch.wgsl index a08c7ddf4e..b523874c31 100644 --- a/test/loops/continue_in_switch.wgsl +++ b/test/loops/continue_in_switch.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { for (var i : i32 = 0; i < 4; i = i + 1) { switch(i) { diff --git a/test/loops/continue_in_switch.wgsl.expected.wgsl b/test/loops/continue_in_switch.wgsl.expected.wgsl index 0d375d438a..ab9a0295e2 100644 --- a/test/loops/continue_in_switch.wgsl.expected.wgsl +++ b/test/loops/continue_in_switch.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { for(var i : i32 = 0; (i < 4); i = (i + 1)) { switch(i) { diff --git a/test/ptr_ref/access/matrix.spvasm.expected.wgsl b/test/ptr_ref/access/matrix.spvasm.expected.wgsl index 54e50e774a..45ab66f3fb 100644 --- a/test/ptr_ref/access/matrix.spvasm.expected.wgsl +++ b/test/ptr_ref/access/matrix.spvasm.expected.wgsl @@ -5,7 +5,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/access/matrix.wgsl b/test/ptr_ref/access/matrix.wgsl index 13471338da..a085846214 100644 --- a/test/ptr_ref/access/matrix.wgsl +++ b/test/ptr_ref/access/matrix.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m : mat3x3 = mat3x3(vec3(1., 2., 3.), vec3(4., 5., 6.), vec3(7., 8., 9.)); let v : ptr> = &m[1]; diff --git a/test/ptr_ref/access/matrix.wgsl.expected.wgsl b/test/ptr_ref/access/matrix.wgsl.expected.wgsl index 8356471207..110e6e6f2e 100644 --- a/test/ptr_ref/access/matrix.wgsl.expected.wgsl +++ b/test/ptr_ref/access/matrix.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var m : mat3x3 = mat3x3(vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0)); let v : ptr> = &(m[1]); diff --git a/test/ptr_ref/copy/ptr_copy.spvasm.expected.wgsl b/test/ptr_ref/copy/ptr_copy.spvasm.expected.wgsl index 512d5c8dd1..82d9c5af65 100644 --- a/test/ptr_ref/copy/ptr_copy.spvasm.expected.wgsl +++ b/test/ptr_ref/copy/ptr_copy.spvasm.expected.wgsl @@ -5,7 +5,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/global/i32.spvasm.expected.wgsl b/test/ptr_ref/load/global/i32.spvasm.expected.wgsl index 2f193e8be8..fa2c115012 100644 --- a/test/ptr_ref/load/global/i32.spvasm.expected.wgsl +++ b/test/ptr_ref/load/global/i32.spvasm.expected.wgsl @@ -6,7 +6,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/global/i32.wgsl b/test/ptr_ref/load/global/i32.wgsl index b0e73b6270..4f620cf709 100644 --- a/test/ptr_ref/load/global/i32.wgsl +++ b/test/ptr_ref/load/global/i32.wgsl @@ -1,6 +1,6 @@ var I : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let i : i32 = I; let use : i32 = i + 1; diff --git a/test/ptr_ref/load/global/i32.wgsl.expected.wgsl b/test/ptr_ref/load/global/i32.wgsl.expected.wgsl index e3d286d96a..5e1feeac37 100644 --- a/test/ptr_ref/load/global/i32.wgsl.expected.wgsl +++ b/test/ptr_ref/load/global/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var I : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let i : i32 = I; let use : i32 = (i + 1); diff --git a/test/ptr_ref/load/global/struct_field.spvasm.expected.wgsl b/test/ptr_ref/load/global/struct_field.spvasm.expected.wgsl index 67eba57a56..6d6d8e6398 100644 --- a/test/ptr_ref/load/global/struct_field.spvasm.expected.wgsl +++ b/test/ptr_ref/load/global/struct_field.spvasm.expected.wgsl @@ -11,7 +11,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/global/struct_field.wgsl b/test/ptr_ref/load/global/struct_field.wgsl index 074fe803ba..e4341ca74e 100644 --- a/test/ptr_ref/load/global/struct_field.wgsl +++ b/test/ptr_ref/load/global/struct_field.wgsl @@ -4,7 +4,7 @@ struct S { var V : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let i : i32 = V.i; } diff --git a/test/ptr_ref/load/global/struct_field.wgsl.expected.wgsl b/test/ptr_ref/load/global/struct_field.wgsl.expected.wgsl index d0b3e34459..59395f9b03 100644 --- a/test/ptr_ref/load/global/struct_field.wgsl.expected.wgsl +++ b/test/ptr_ref/load/global/struct_field.wgsl.expected.wgsl @@ -4,7 +4,7 @@ struct S { var V : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let i : i32 = V.i; } diff --git a/test/ptr_ref/load/local/i32.spvasm.expected.wgsl b/test/ptr_ref/load/local/i32.spvasm.expected.wgsl index 89d3a08c19..22952b8207 100644 --- a/test/ptr_ref/load/local/i32.spvasm.expected.wgsl +++ b/test/ptr_ref/load/local/i32.spvasm.expected.wgsl @@ -6,7 +6,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/local/i32.wgsl b/test/ptr_ref/load/local/i32.wgsl index f01042b931..6c30f81ee2 100644 --- a/test/ptr_ref/load/local/i32.wgsl +++ b/test/ptr_ref/load/local/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let use : i32 = i + 1; diff --git a/test/ptr_ref/load/local/i32.wgsl.expected.wgsl b/test/ptr_ref/load/local/i32.wgsl.expected.wgsl index d08fa3de60..587375ef98 100644 --- a/test/ptr_ref/load/local/i32.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let use : i32 = (i + 1); diff --git a/test/ptr_ref/load/local/ptr_function.wgsl b/test/ptr_ref/load/local/ptr_function.wgsl index df537749fe..ddaafb2c15 100644 --- a/test/ptr_ref/load/local/ptr_function.wgsl +++ b/test/ptr_ref/load/local/ptr_function.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let p : ptr = &i; diff --git a/test/ptr_ref/load/local/ptr_function.wgsl.expected.wgsl b/test/ptr_ref/load/local/ptr_function.wgsl.expected.wgsl index 4bd46dd44b..e29289c7e9 100644 --- a/test/ptr_ref/load/local/ptr_function.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/ptr_function.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let p : ptr = &(i); diff --git a/test/ptr_ref/load/local/ptr_private.wgsl b/test/ptr_ref/load/local/ptr_private.wgsl index b9d231f9d3..0f59ad5946 100644 --- a/test/ptr_ref/load/local/ptr_private.wgsl +++ b/test/ptr_ref/load/local/ptr_private.wgsl @@ -1,6 +1,6 @@ var i : i32 = 123; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &i; let use : i32 = *p + 1; diff --git a/test/ptr_ref/load/local/ptr_private.wgsl.expected.wgsl b/test/ptr_ref/load/local/ptr_private.wgsl.expected.wgsl index 4c92811429..9b77f46346 100644 --- a/test/ptr_ref/load/local/ptr_private.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/ptr_private.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var i : i32 = 123; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &(i); let use : i32 = (*(p) + 1); diff --git a/test/ptr_ref/load/local/ptr_storage.wgsl b/test/ptr_ref/load/local/ptr_storage.wgsl index 1b1bfba707..e50f835f1a 100644 --- a/test/ptr_ref/load/local/ptr_storage.wgsl +++ b/test/ptr_ref/load/local/ptr_storage.wgsl @@ -2,10 +2,10 @@ struct S { a : i32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &v.a; let use : i32 = *p + 1; diff --git a/test/ptr_ref/load/local/ptr_storage.wgsl.expected.wgsl b/test/ptr_ref/load/local/ptr_storage.wgsl.expected.wgsl index 3111c5f4ae..ecef085e89 100644 --- a/test/ptr_ref/load/local/ptr_storage.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/ptr_storage.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : i32; } -[[group(0), binding(0)]] var v : S; +@group(0) @binding(0) var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &(v.a); let use : i32 = (*(p) + 1); diff --git a/test/ptr_ref/load/local/ptr_uniform.wgsl b/test/ptr_ref/load/local/ptr_uniform.wgsl index 1d0e3557ad..49328ac370 100644 --- a/test/ptr_ref/load/local/ptr_uniform.wgsl +++ b/test/ptr_ref/load/local/ptr_uniform.wgsl @@ -2,10 +2,10 @@ struct S { a : i32; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &v.a; let use : i32 = *p + 1; diff --git a/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.wgsl b/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.wgsl index b6f8628c33..dabfd63a7c 100644 --- a/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { a : i32; } -[[group(0), binding(0)]] var v : S; +@group(0) @binding(0) var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let p : ptr = &(v.a); let use : i32 = (*(p) + 1); diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl b/test/ptr_ref/load/local/ptr_workgroup.wgsl index eb7dae9489..269caa5259 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl @@ -1,6 +1,6 @@ var i : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { i = 123; let p : ptr = &i; diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.wgsl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.wgsl index cf84d585cc..39ea1f58a1 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var i : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { i = 123; let p : ptr = &(i); diff --git a/test/ptr_ref/load/local/struct_field.spvasm.expected.wgsl b/test/ptr_ref/load/local/struct_field.spvasm.expected.wgsl index ea14750795..9b15ec1b1d 100644 --- a/test/ptr_ref/load/local/struct_field.spvasm.expected.wgsl +++ b/test/ptr_ref/load/local/struct_field.spvasm.expected.wgsl @@ -10,7 +10,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/local/struct_field.wgsl b/test/ptr_ref/load/local/struct_field.wgsl index 18aca63324..60b9af5009 100644 --- a/test/ptr_ref/load/local/struct_field.wgsl +++ b/test/ptr_ref/load/local/struct_field.wgsl @@ -2,7 +2,7 @@ struct S { i : i32; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var V : S; var i : i32 = V.i; diff --git a/test/ptr_ref/load/local/struct_field.wgsl.expected.wgsl b/test/ptr_ref/load/local/struct_field.wgsl.expected.wgsl index 7bbcb5a598..056bf95406 100644 --- a/test/ptr_ref/load/local/struct_field.wgsl.expected.wgsl +++ b/test/ptr_ref/load/local/struct_field.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { i : i32; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var V : S; var i : i32 = V.i; diff --git a/test/ptr_ref/load/param/ptr.spvasm.expected.wgsl b/test/ptr_ref/load/param/ptr.spvasm.expected.wgsl index 05c17cfe63..e8df997fd9 100644 --- a/test/ptr_ref/load/param/ptr.spvasm.expected.wgsl +++ b/test/ptr_ref/load/param/ptr.spvasm.expected.wgsl @@ -11,7 +11,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/load/param/ptr.wgsl b/test/ptr_ref/load/param/ptr.wgsl index 33482400d3..1dfc928153 100644 --- a/test/ptr_ref/load/param/ptr.wgsl +++ b/test/ptr_ref/load/param/ptr.wgsl @@ -2,7 +2,7 @@ fn func(value : i32, pointer : ptr) -> i32 { return value + *pointer; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let r : i32 = func(i, &i); diff --git a/test/ptr_ref/load/param/ptr.wgsl.expected.wgsl b/test/ptr_ref/load/param/ptr.wgsl.expected.wgsl index 812dfeae7a..68c51dba9a 100644 --- a/test/ptr_ref/load/param/ptr.wgsl.expected.wgsl +++ b/test/ptr_ref/load/param/ptr.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn func(value : i32, pointer : ptr) -> i32 { return (value + *(pointer)); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let r : i32 = func(i, &(i)); diff --git a/test/ptr_ref/store/global/i32.spvasm.expected.wgsl b/test/ptr_ref/store/global/i32.spvasm.expected.wgsl index b48aa90008..d50fc89a0a 100644 --- a/test/ptr_ref/store/global/i32.spvasm.expected.wgsl +++ b/test/ptr_ref/store/global/i32.spvasm.expected.wgsl @@ -6,7 +6,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/store/global/i32.wgsl b/test/ptr_ref/store/global/i32.wgsl index 9254513dfd..3a5c72eb66 100644 --- a/test/ptr_ref/store/global/i32.wgsl +++ b/test/ptr_ref/store/global/i32.wgsl @@ -1,6 +1,6 @@ var I : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { I = 123; // constant I = 100 + 20 + 3; // dynamic diff --git a/test/ptr_ref/store/global/i32.wgsl.expected.wgsl b/test/ptr_ref/store/global/i32.wgsl.expected.wgsl index 8b8367de17..807c1cde7d 100644 --- a/test/ptr_ref/store/global/i32.wgsl.expected.wgsl +++ b/test/ptr_ref/store/global/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var I : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { I = 123; I = ((100 + 20) + 3); diff --git a/test/ptr_ref/store/global/struct_field.spvasm.expected.wgsl b/test/ptr_ref/store/global/struct_field.spvasm.expected.wgsl index e70b574562..7ed09773e8 100644 --- a/test/ptr_ref/store/global/struct_field.spvasm.expected.wgsl +++ b/test/ptr_ref/store/global/struct_field.spvasm.expected.wgsl @@ -9,7 +9,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/store/local/i32.spvasm.expected.wgsl b/test/ptr_ref/store/local/i32.spvasm.expected.wgsl index 64f374429f..822c64b4ce 100644 --- a/test/ptr_ref/store/local/i32.spvasm.expected.wgsl +++ b/test/ptr_ref/store/local/i32.spvasm.expected.wgsl @@ -6,7 +6,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/store/local/i32.wgsl b/test/ptr_ref/store/local/i32.wgsl index 77578a7c2e..ea390b9171 100644 --- a/test/ptr_ref/store/local/i32.wgsl +++ b/test/ptr_ref/store/local/i32.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let p : ptr = &i; diff --git a/test/ptr_ref/store/local/i32.wgsl.expected.wgsl b/test/ptr_ref/store/local/i32.wgsl.expected.wgsl index 2690a1a9e7..c5f03d5742 100644 --- a/test/ptr_ref/store/local/i32.wgsl.expected.wgsl +++ b/test/ptr_ref/store/local/i32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; let p : ptr = &(i); diff --git a/test/ptr_ref/store/local/struct_field.spvasm.expected.wgsl b/test/ptr_ref/store/local/struct_field.spvasm.expected.wgsl index b3b95dfcbf..bcc168018e 100644 --- a/test/ptr_ref/store/local/struct_field.spvasm.expected.wgsl +++ b/test/ptr_ref/store/local/struct_field.spvasm.expected.wgsl @@ -8,7 +8,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/store/param/ptr.spvasm.expected.wgsl b/test/ptr_ref/store/param/ptr.spvasm.expected.wgsl index 30fdea1035..c505b66c7b 100644 --- a/test/ptr_ref/store/param/ptr.spvasm.expected.wgsl +++ b/test/ptr_ref/store/param/ptr.spvasm.expected.wgsl @@ -10,7 +10,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/ptr_ref/store/param/ptr.wgsl b/test/ptr_ref/store/param/ptr.wgsl index f4225f0fd3..b23ad6f144 100644 --- a/test/ptr_ref/store/param/ptr.wgsl +++ b/test/ptr_ref/store/param/ptr.wgsl @@ -2,7 +2,7 @@ fn func(value : i32, pointer : ptr) { *pointer = value; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; func(123, &i); diff --git a/test/ptr_ref/store/param/ptr.wgsl.expected.wgsl b/test/ptr_ref/store/param/ptr.wgsl.expected.wgsl index 05d2d40212..d9d6dbbe58 100644 --- a/test/ptr_ref/store/param/ptr.wgsl.expected.wgsl +++ b/test/ptr_ref/store/param/ptr.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn func(value : i32, pointer : ptr) { *(pointer) = value; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var i : i32 = 123; func(123, &(i)); diff --git a/test/samples/compute_boids.wgsl b/test/samples/compute_boids.wgsl index 53ea4c5dbb..269ac5d705 100644 --- a/test/samples/compute_boids.wgsl +++ b/test/samples/compute_boids.wgsl @@ -14,11 +14,11 @@ // vertex shader -[[stage(vertex)]] -fn vert_main([[location(0)]] a_particlePos : vec2, - [[location(1)]] a_particleVel : vec2, - [[location(2)]] a_pos : vec2) - -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main(@location(0) a_particlePos : vec2, + @location(1) a_particleVel : vec2, + @location(2) a_pos : vec2) + -> @builtin(position) vec4 { var angle : f32 = -atan2(a_particleVel.x, a_particleVel.y); var pos : vec2 = vec2( (a_pos.x * cos(angle)) - (a_pos.y * sin(angle)), @@ -28,8 +28,8 @@ fn vert_main([[location(0)]] a_particlePos : vec2, // fragment shader -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { return vec4(1.0, 1.0, 1.0, 1.0); } @@ -53,14 +53,14 @@ struct Particle { particles : array; }; -[[binding(0), group(0)]] var params : SimParams; -[[binding(1), group(0)]] var particlesA : Particles; -[[binding(2), group(0)]] var particlesB : Particles; +@binding(0) @group(0) var params : SimParams; +@binding(1) @group(0) var particlesA : Particles; +@binding(2) @group(0) var particlesB : Particles; // https://github.com/austinEng/Project6-Vulkan-Flocking/blob/master/data/shaders/computeparticles/particle.comp -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn comp_main( - [[builtin(global_invocation_id)]] gl_GlobalInvocationID : vec3) { + @builtin(global_invocation_id) gl_GlobalInvocationID : vec3) { var index : u32 = gl_GlobalInvocationID.x; if (index >= 5u) { return; diff --git a/test/samples/compute_boids.wgsl.expected.wgsl b/test/samples/compute_boids.wgsl.expected.wgsl index 394631c2ef..5abf9fa4bd 100644 --- a/test/samples/compute_boids.wgsl.expected.wgsl +++ b/test/samples/compute_boids.wgsl.expected.wgsl @@ -1,12 +1,12 @@ -[[stage(vertex)]] -fn vert_main([[location(0)]] a_particlePos : vec2, [[location(1)]] a_particleVel : vec2, [[location(2)]] a_pos : vec2) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vert_main(@location(0) a_particlePos : vec2, @location(1) a_particleVel : vec2, @location(2) a_pos : vec2) -> @builtin(position) vec4 { var angle : f32 = -(atan2(a_particleVel.x, a_particleVel.y)); var pos : vec2 = vec2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle)))); return vec4((pos + a_particlePos), 0.0, 1.0); } -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { return vec4(1.0, 1.0, 1.0, 1.0); } @@ -29,14 +29,14 @@ struct Particles { particles : array; } -[[binding(0), group(0)]] var params : SimParams; +@binding(0) @group(0) var params : SimParams; -[[binding(1), group(0)]] var particlesA : Particles; +@binding(1) @group(0) var particlesA : Particles; -[[binding(2), group(0)]] var particlesB : Particles; +@binding(2) @group(0) var particlesB : Particles; -[[stage(compute), workgroup_size(1)]] -fn comp_main([[builtin(global_invocation_id)]] gl_GlobalInvocationID : vec3) { +@stage(compute) @workgroup_size(1) +fn comp_main(@builtin(global_invocation_id) gl_GlobalInvocationID : vec3) { var index : u32 = gl_GlobalInvocationID.x; if ((index >= 5u)) { return; diff --git a/test/samples/cube.wgsl b/test/samples/cube.wgsl index 5b9fab1a90..93519e4aee 100644 --- a/test/samples/cube.wgsl +++ b/test/samples/cube.wgsl @@ -17,19 +17,19 @@ modelViewProjectionMatrix : mat4x4; }; -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; struct VertexInput { - [[location(0)]] cur_position : vec4; - [[location(1)]] color : vec4; + @location(0) cur_position : vec4; + @location(1) color : vec4; }; struct VertexOutput { - [[location(0)]] vtxFragColor : vec4; - [[builtin(position)]] Position : vec4; + @location(0) vtxFragColor : vec4; + @builtin(position) Position : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vtx_main(input : VertexInput) -> VertexOutput { var output : VertexOutput; output.Position = uniforms.modelViewProjectionMatrix * input.cur_position; @@ -39,8 +39,8 @@ fn vtx_main(input : VertexInput) -> VertexOutput { // Fragment shader -[[stage(fragment)]] -fn frag_main([[location(0)]] fragColor : vec4) - -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main(@location(0) fragColor : vec4) + -> @location(0) vec4 { return fragColor; } diff --git a/test/samples/cube.wgsl.expected.wgsl b/test/samples/cube.wgsl.expected.wgsl index a764703054..ba0371f95c 100644 --- a/test/samples/cube.wgsl.expected.wgsl +++ b/test/samples/cube.wgsl.expected.wgsl @@ -2,23 +2,23 @@ struct Uniforms { modelViewProjectionMatrix : mat4x4; } -[[binding(0), group(0)]] var uniforms : Uniforms; +@binding(0) @group(0) var uniforms : Uniforms; struct VertexInput { - [[location(0)]] + @location(0) cur_position : vec4; - [[location(1)]] + @location(1) color : vec4; } struct VertexOutput { - [[location(0)]] + @location(0) vtxFragColor : vec4; - [[builtin(position)]] + @builtin(position) Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vtx_main(input : VertexInput) -> VertexOutput { var output : VertexOutput; output.Position = (uniforms.modelViewProjectionMatrix * input.cur_position); @@ -26,7 +26,7 @@ fn vtx_main(input : VertexInput) -> VertexOutput { return output; } -[[stage(fragment)]] -fn frag_main([[location(0)]] fragColor : vec4) -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main(@location(0) fragColor : vec4) -> @location(0) vec4 { return fragColor; } diff --git a/test/samples/function.wgsl b/test/samples/function.wgsl index 257a664a21..92ffb04a0a 100644 --- a/test/samples/function.wgsl +++ b/test/samples/function.wgsl @@ -16,6 +16,6 @@ fn main() -> f32 { return ((2. * 3.) - 4.) / 5.; } -[[stage(compute), workgroup_size(2)]] +@stage(compute) @workgroup_size(2) fn ep() { } diff --git a/test/samples/function.wgsl.expected.wgsl b/test/samples/function.wgsl.expected.wgsl index 4cd4fb6a8f..5a3a80c47a 100644 --- a/test/samples/function.wgsl.expected.wgsl +++ b/test/samples/function.wgsl.expected.wgsl @@ -2,6 +2,6 @@ fn main() -> f32 { return (((2.0 * 3.0) - 4.0) / 5.0); } -[[stage(compute), workgroup_size(2)]] +@stage(compute) @workgroup_size(2) fn ep() { } diff --git a/test/samples/simple.wgsl b/test/samples/simple.wgsl index bec6a0f21d..d30b8a0792 100644 --- a/test/samples/simple.wgsl +++ b/test/samples/simple.wgsl @@ -15,8 +15,8 @@ fn bar() { } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { var a : vec2 = vec2(); bar(); return vec4(0.4, 0.4, 0.8, 1.0); diff --git a/test/samples/simple.wgsl.expected.wgsl b/test/samples/simple.wgsl.expected.wgsl index b5a4dc0f48..83388f8899 100644 --- a/test/samples/simple.wgsl.expected.wgsl +++ b/test/samples/simple.wgsl.expected.wgsl @@ -1,8 +1,8 @@ fn bar() { } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { var a : vec2 = vec2(); bar(); return vec4(0.400000006, 0.400000006, 0.800000012, 1.0); diff --git a/test/samples/simple_vertex.spvasm.expected.wgsl b/test/samples/simple_vertex.spvasm.expected.wgsl index 372bb24214..91ccaf9018 100644 --- a/test/samples/simple_vertex.spvasm.expected.wgsl +++ b/test/samples/simple_vertex.spvasm.expected.wgsl @@ -6,11 +6,11 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> main_out { main_1(); return main_out(gl_Position); diff --git a/test/samples/triangle.wgsl b/test/samples/triangle.wgsl index ba3cb52b52..69d22818db 100644 --- a/test/samples/triangle.wgsl +++ b/test/samples/triangle.wgsl @@ -18,14 +18,14 @@ let pos : array, 3> = array, 3>( vec2(-0.5, -0.5), vec2(0.5, -0.5)); -[[stage(vertex)]] -fn vtx_main([[builtin(vertex_index)]] VertexIndex : u32) - -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vtx_main(@builtin(vertex_index) VertexIndex : u32) + -> @builtin(position) vec4 { return vec4(pos[VertexIndex], 0.0, 1.0); } // Fragment shader -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { return vec4(1.0, 0.0, 0.0, 1.0); } diff --git a/test/samples/triangle.wgsl.expected.wgsl b/test/samples/triangle.wgsl.expected.wgsl index bd398e01d7..c92f0a6141 100644 --- a/test/samples/triangle.wgsl.expected.wgsl +++ b/test/samples/triangle.wgsl.expected.wgsl @@ -1,11 +1,11 @@ let pos : array, 3> = array, 3>(vec2(0.0, 0.5), vec2(-0.5, -0.5), vec2(0.5, -0.5)); -[[stage(vertex)]] -fn vtx_main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn vtx_main(@builtin(vertex_index) VertexIndex : u32) -> @builtin(position) vec4 { return vec4(pos[VertexIndex], 0.0, 1.0); } -[[stage(fragment)]] -fn frag_main() -> [[location(0)]] vec4 { +@stage(fragment) +fn frag_main() -> @location(0) vec4 { return vec4(1.0, 0.0, 0.0, 1.0); } diff --git a/test/shader_io/compute_input_builtins.wgsl b/test/shader_io/compute_input_builtins.wgsl index 016ec31cf1..77f209eea6 100644 --- a/test/shader_io/compute_input_builtins.wgsl +++ b/test/shader_io/compute_input_builtins.wgsl @@ -1,10 +1,10 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main( - [[builtin(local_invocation_id)]] local_invocation_id : vec3, - [[builtin(local_invocation_index)]] local_invocation_index : u32, - [[builtin(global_invocation_id)]] global_invocation_id : vec3, - [[builtin(workgroup_id)]] workgroup_id : vec3, - [[builtin(num_workgroups)]] num_workgroups : vec3, + @builtin(local_invocation_id) local_invocation_id : vec3, + @builtin(local_invocation_index) local_invocation_index : u32, + @builtin(global_invocation_id) global_invocation_id : vec3, + @builtin(workgroup_id) workgroup_id : vec3, + @builtin(num_workgroups) num_workgroups : vec3, ) { let foo : u32 = local_invocation_id.x + diff --git a/test/shader_io/compute_input_builtins.wgsl.expected.wgsl b/test/shader_io/compute_input_builtins.wgsl.expected.wgsl index 42c8adb6f2..a1d31636c5 100644 --- a/test/shader_io/compute_input_builtins.wgsl.expected.wgsl +++ b/test/shader_io/compute_input_builtins.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] -fn main([[builtin(local_invocation_id)]] local_invocation_id : vec3, [[builtin(local_invocation_index)]] local_invocation_index : u32, [[builtin(global_invocation_id)]] global_invocation_id : vec3, [[builtin(workgroup_id)]] workgroup_id : vec3, [[builtin(num_workgroups)]] num_workgroups : vec3) { +@stage(compute) @workgroup_size(1) +fn main(@builtin(local_invocation_id) local_invocation_id : vec3, @builtin(local_invocation_index) local_invocation_index : u32, @builtin(global_invocation_id) global_invocation_id : vec3, @builtin(workgroup_id) workgroup_id : vec3, @builtin(num_workgroups) num_workgroups : vec3) { let foo : u32 = ((((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x) + num_workgroups.x); } diff --git a/test/shader_io/compute_input_builtins_struct.wgsl b/test/shader_io/compute_input_builtins_struct.wgsl index c9691c9bbe..968a1faebe 100644 --- a/test/shader_io/compute_input_builtins_struct.wgsl +++ b/test/shader_io/compute_input_builtins_struct.wgsl @@ -1,12 +1,12 @@ struct ComputeInputs { - [[builtin(local_invocation_id)]] local_invocation_id : vec3; - [[builtin(local_invocation_index)]] local_invocation_index : u32; - [[builtin(global_invocation_id)]] global_invocation_id : vec3; - [[builtin(workgroup_id)]] workgroup_id : vec3; - [[builtin(num_workgroups)]] num_workgroups : vec3; + @builtin(local_invocation_id) local_invocation_id : vec3; + @builtin(local_invocation_index) local_invocation_index : u32; + @builtin(global_invocation_id) global_invocation_id : vec3; + @builtin(workgroup_id) workgroup_id : vec3; + @builtin(num_workgroups) num_workgroups : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(inputs : ComputeInputs) { let foo : u32 = inputs.local_invocation_id.x + diff --git a/test/shader_io/compute_input_builtins_struct.wgsl.expected.wgsl b/test/shader_io/compute_input_builtins_struct.wgsl.expected.wgsl index c3830ee2a3..08660cc3ea 100644 --- a/test/shader_io/compute_input_builtins_struct.wgsl.expected.wgsl +++ b/test/shader_io/compute_input_builtins_struct.wgsl.expected.wgsl @@ -1,17 +1,17 @@ struct ComputeInputs { - [[builtin(local_invocation_id)]] + @builtin(local_invocation_id) local_invocation_id : vec3; - [[builtin(local_invocation_index)]] + @builtin(local_invocation_index) local_invocation_index : u32; - [[builtin(global_invocation_id)]] + @builtin(global_invocation_id) global_invocation_id : vec3; - [[builtin(workgroup_id)]] + @builtin(workgroup_id) workgroup_id : vec3; - [[builtin(num_workgroups)]] + @builtin(num_workgroups) num_workgroups : vec3; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main(inputs : ComputeInputs) { let foo : u32 = ((((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x) + inputs.num_workgroups.x); } diff --git a/test/shader_io/compute_input_mixed.wgsl b/test/shader_io/compute_input_mixed.wgsl index e49303cfec..b46ff00668 100644 --- a/test/shader_io/compute_input_mixed.wgsl +++ b/test/shader_io/compute_input_mixed.wgsl @@ -1,20 +1,20 @@ struct ComputeInputs0 { - [[builtin(local_invocation_id)]] local_invocation_id : vec3; + @builtin(local_invocation_id) local_invocation_id : vec3; }; struct ComputeInputs1 { - [[builtin(workgroup_id)]] workgroup_id : vec3; + @builtin(workgroup_id) workgroup_id : vec3; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main( inputs0 : ComputeInputs0, - [[builtin(local_invocation_index)]] local_invocation_index : u32, - [[builtin(global_invocation_id)]] global_invocation_id : vec3, + @builtin(local_invocation_index) local_invocation_index : u32, + @builtin(global_invocation_id) global_invocation_id : vec3, inputs1 : ComputeInputs1, ) { let foo : u32 = inputs0.local_invocation_id.x + - local_invocation_index + - global_invocation_id.x + + local_invocation_index + + global_invocation_id.x + inputs1.workgroup_id.x; } diff --git a/test/shader_io/compute_input_mixed.wgsl.expected.wgsl b/test/shader_io/compute_input_mixed.wgsl.expected.wgsl index 369ae7f18b..56cd363dfc 100644 --- a/test/shader_io/compute_input_mixed.wgsl.expected.wgsl +++ b/test/shader_io/compute_input_mixed.wgsl.expected.wgsl @@ -1,14 +1,14 @@ struct ComputeInputs0 { - [[builtin(local_invocation_id)]] + @builtin(local_invocation_id) local_invocation_id : vec3; } struct ComputeInputs1 { - [[builtin(workgroup_id)]] + @builtin(workgroup_id) workgroup_id : vec3; } -[[stage(compute), workgroup_size(1)]] -fn main(inputs0 : ComputeInputs0, [[builtin(local_invocation_index)]] local_invocation_index : u32, [[builtin(global_invocation_id)]] global_invocation_id : vec3, inputs1 : ComputeInputs1) { +@stage(compute) @workgroup_size(1) +fn main(inputs0 : ComputeInputs0, @builtin(local_invocation_index) local_invocation_index : u32, @builtin(global_invocation_id) global_invocation_id : vec3, inputs1 : ComputeInputs1) { let foo : u32 = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x); } diff --git a/test/shader_io/fragment_input_builtins.wgsl b/test/shader_io/fragment_input_builtins.wgsl index 0395bfd1a5..db717eb8e4 100644 --- a/test/shader_io/fragment_input_builtins.wgsl +++ b/test/shader_io/fragment_input_builtins.wgsl @@ -1,9 +1,9 @@ -[[stage(fragment)]] +@stage(fragment) fn main( - [[builtin(position)]] position : vec4, - [[builtin(front_facing)]] front_facing : bool, - [[builtin(sample_index)]] sample_index : u32, - [[builtin(sample_mask)]] sample_mask : u32, + @builtin(position) position : vec4, + @builtin(front_facing) front_facing : bool, + @builtin(sample_index) sample_index : u32, + @builtin(sample_mask) sample_mask : u32, ) { if (front_facing) { let foo : vec4 = position; diff --git a/test/shader_io/fragment_input_builtins.wgsl.expected.wgsl b/test/shader_io/fragment_input_builtins.wgsl.expected.wgsl index cfad6db04b..92dfb414b3 100644 --- a/test/shader_io/fragment_input_builtins.wgsl.expected.wgsl +++ b/test/shader_io/fragment_input_builtins.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(fragment)]] -fn main([[builtin(position)]] position : vec4, [[builtin(front_facing)]] front_facing : bool, [[builtin(sample_index)]] sample_index : u32, [[builtin(sample_mask)]] sample_mask : u32) { +@stage(fragment) +fn main(@builtin(position) position : vec4, @builtin(front_facing) front_facing : bool, @builtin(sample_index) sample_index : u32, @builtin(sample_mask) sample_mask : u32) { if (front_facing) { let foo : vec4 = position; let bar : u32 = (sample_index + sample_mask); diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl b/test/shader_io/fragment_input_builtins_struct.wgsl index af9e0d3517..ba833dbafe 100644 --- a/test/shader_io/fragment_input_builtins_struct.wgsl +++ b/test/shader_io/fragment_input_builtins_struct.wgsl @@ -1,11 +1,11 @@ struct FragmentInputs { - [[builtin(position)]] position : vec4; - [[builtin(front_facing)]] front_facing : bool; - [[builtin(sample_index)]] sample_index : u32; - [[builtin(sample_mask)]] sample_mask : u32; + @builtin(position) position : vec4; + @builtin(front_facing) front_facing : bool; + @builtin(sample_index) sample_index : u32; + @builtin(sample_mask) sample_mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn main(inputs : FragmentInputs) { if (inputs.front_facing) { let foo : vec4 = inputs.position; diff --git a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.wgsl b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.wgsl index 79ec5fd007..5eddd12337 100644 --- a/test/shader_io/fragment_input_builtins_struct.wgsl.expected.wgsl +++ b/test/shader_io/fragment_input_builtins_struct.wgsl.expected.wgsl @@ -1,15 +1,15 @@ struct FragmentInputs { - [[builtin(position)]] + @builtin(position) position : vec4; - [[builtin(front_facing)]] + @builtin(front_facing) front_facing : bool; - [[builtin(sample_index)]] + @builtin(sample_index) sample_index : u32; - [[builtin(sample_mask)]] + @builtin(sample_mask) sample_mask : u32; } -[[stage(fragment)]] +@stage(fragment) fn main(inputs : FragmentInputs) { if (inputs.front_facing) { let foo : vec4 = inputs.position; diff --git a/test/shader_io/fragment_input_locations.wgsl b/test/shader_io/fragment_input_locations.wgsl index 0ed8e3c4c6..b33cfe4d8c 100644 --- a/test/shader_io/fragment_input_locations.wgsl +++ b/test/shader_io/fragment_input_locations.wgsl @@ -1,9 +1,9 @@ -[[stage(fragment)]] +@stage(fragment) fn main( - [[location(0), interpolate(flat)]] loc0 : i32, - [[location(1), interpolate(flat)]] loc1 : u32, - [[location(2)]] loc2 : f32, - [[location(3)]] loc3 : vec4, + @location(0) @interpolate(flat) loc0 : i32, + @location(1) @interpolate(flat) loc1 : u32, + @location(2) loc2 : f32, + @location(3) loc3 : vec4, ) { let i : i32 = loc0; let u : u32 = loc1; diff --git a/test/shader_io/fragment_input_locations.wgsl.expected.wgsl b/test/shader_io/fragment_input_locations.wgsl.expected.wgsl index ce13406176..a4cd5026ca 100644 --- a/test/shader_io/fragment_input_locations.wgsl.expected.wgsl +++ b/test/shader_io/fragment_input_locations.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(fragment)]] -fn main([[location(0), interpolate(flat)]] loc0 : i32, [[location(1), interpolate(flat)]] loc1 : u32, [[location(2)]] loc2 : f32, [[location(3)]] loc3 : vec4) { +@stage(fragment) +fn main(@location(0) @interpolate(flat) loc0 : i32, @location(1) @interpolate(flat) loc1 : u32, @location(2) loc2 : f32, @location(3) loc3 : vec4) { let i : i32 = loc0; let u : u32 = loc1; let f : f32 = loc2; diff --git a/test/shader_io/fragment_input_locations_struct.wgsl b/test/shader_io/fragment_input_locations_struct.wgsl index 03840c2083..e5e4bd5ef7 100644 --- a/test/shader_io/fragment_input_locations_struct.wgsl +++ b/test/shader_io/fragment_input_locations_struct.wgsl @@ -1,11 +1,11 @@ struct FragmentInputs { - [[location(0), interpolate(flat)]] loc0 : i32; - [[location(1), interpolate(flat)]] loc1 : u32; - [[location(2)]] loc2 : f32; - [[location(3)]] loc3 : vec4; + @location(0) @interpolate(flat) loc0 : i32; + @location(1) @interpolate(flat) loc1 : u32; + @location(2) loc2 : f32; + @location(3) loc3 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main(inputs : FragmentInputs) { let i : i32 = inputs.loc0; let u : u32 = inputs.loc1; diff --git a/test/shader_io/fragment_input_locations_struct.wgsl.expected.wgsl b/test/shader_io/fragment_input_locations_struct.wgsl.expected.wgsl index 5179ec9733..d4a9ebb893 100644 --- a/test/shader_io/fragment_input_locations_struct.wgsl.expected.wgsl +++ b/test/shader_io/fragment_input_locations_struct.wgsl.expected.wgsl @@ -1,15 +1,15 @@ struct FragmentInputs { - [[location(0), interpolate(flat)]] + @location(0) @interpolate(flat) loc0 : i32; - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) loc1 : u32; - [[location(2)]] + @location(2) loc2 : f32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main(inputs : FragmentInputs) { let i : i32 = inputs.loc0; let u : u32 = inputs.loc1; diff --git a/test/shader_io/fragment_input_mixed.wgsl b/test/shader_io/fragment_input_mixed.wgsl index 62e1312e5b..2bbc7285b1 100644 --- a/test/shader_io/fragment_input_mixed.wgsl +++ b/test/shader_io/fragment_input_mixed.wgsl @@ -1,20 +1,20 @@ struct FragmentInputs0 { - [[builtin(position)]] position : vec4; - [[location(0), interpolate(flat)]] loc0 : i32; + @builtin(position) position : vec4; + @location(0) @interpolate(flat) loc0 : i32; }; struct FragmentInputs1 { - [[location(3)]] loc3 : vec4; - [[builtin(sample_mask)]] sample_mask : u32; + @location(3) loc3 : vec4; + @builtin(sample_mask) sample_mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn main( inputs0 : FragmentInputs0, - [[builtin(front_facing)]] front_facing : bool, - [[location(1), interpolate(flat)]] loc1 : u32, - [[builtin(sample_index)]] sample_index : u32, + @builtin(front_facing) front_facing : bool, + @location(1) @interpolate(flat) loc1 : u32, + @builtin(sample_index) sample_index : u32, inputs1 : FragmentInputs1, - [[location(2)]] loc2 : f32, + @location(2) loc2 : f32, ) { if (front_facing) { let foo : vec4 = inputs0.position; diff --git a/test/shader_io/fragment_input_mixed.wgsl.expected.wgsl b/test/shader_io/fragment_input_mixed.wgsl.expected.wgsl index bca1e796ea..78911e6529 100644 --- a/test/shader_io/fragment_input_mixed.wgsl.expected.wgsl +++ b/test/shader_io/fragment_input_mixed.wgsl.expected.wgsl @@ -1,19 +1,19 @@ struct FragmentInputs0 { - [[builtin(position)]] + @builtin(position) position : vec4; - [[location(0), interpolate(flat)]] + @location(0) @interpolate(flat) loc0 : i32; } struct FragmentInputs1 { - [[location(3)]] + @location(3) loc3 : vec4; - [[builtin(sample_mask)]] + @builtin(sample_mask) sample_mask : u32; } -[[stage(fragment)]] -fn main(inputs0 : FragmentInputs0, [[builtin(front_facing)]] front_facing : bool, [[location(1), interpolate(flat)]] loc1 : u32, [[builtin(sample_index)]] sample_index : u32, inputs1 : FragmentInputs1, [[location(2)]] loc2 : f32) { +@stage(fragment) +fn main(inputs0 : FragmentInputs0, @builtin(front_facing) front_facing : bool, @location(1) @interpolate(flat) loc1 : u32, @builtin(sample_index) sample_index : u32, inputs1 : FragmentInputs1, @location(2) loc2 : f32) { if (front_facing) { let foo : vec4 = inputs0.position; let bar : u32 = (sample_index + inputs1.sample_mask); diff --git a/test/shader_io/fragment_output_builtins.wgsl b/test/shader_io/fragment_output_builtins.wgsl index 462cb77b0d..914cbad9e3 100644 --- a/test/shader_io/fragment_output_builtins.wgsl +++ b/test/shader_io/fragment_output_builtins.wgsl @@ -1,9 +1,9 @@ -[[stage(fragment)]] -fn main1() -> [[builtin(frag_depth)]] f32 { +@stage(fragment) +fn main1() -> @builtin(frag_depth) f32 { return 1.0; } -[[stage(fragment)]] -fn main2() -> [[builtin(sample_mask)]] u32 { +@stage(fragment) +fn main2() -> @builtin(sample_mask) u32 { return 1u; } diff --git a/test/shader_io/fragment_output_builtins.wgsl.expected.wgsl b/test/shader_io/fragment_output_builtins.wgsl.expected.wgsl index 462cb77b0d..914cbad9e3 100644 --- a/test/shader_io/fragment_output_builtins.wgsl.expected.wgsl +++ b/test/shader_io/fragment_output_builtins.wgsl.expected.wgsl @@ -1,9 +1,9 @@ -[[stage(fragment)]] -fn main1() -> [[builtin(frag_depth)]] f32 { +@stage(fragment) +fn main1() -> @builtin(frag_depth) f32 { return 1.0; } -[[stage(fragment)]] -fn main2() -> [[builtin(sample_mask)]] u32 { +@stage(fragment) +fn main2() -> @builtin(sample_mask) u32 { return 1u; } diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl b/test/shader_io/fragment_output_builtins_struct.wgsl index d7b37f8192..a67765f35b 100644 --- a/test/shader_io/fragment_output_builtins_struct.wgsl +++ b/test/shader_io/fragment_output_builtins_struct.wgsl @@ -1,9 +1,9 @@ struct FragmentOutputs { - [[builtin(frag_depth)]] frag_depth : f32; - [[builtin(sample_mask)]] sample_mask : u32; + @builtin(frag_depth) frag_depth : f32; + @builtin(sample_mask) sample_mask : u32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1.0, 1u); } diff --git a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.wgsl b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.wgsl index e87f857ea2..86551d3bcd 100644 --- a/test/shader_io/fragment_output_builtins_struct.wgsl.expected.wgsl +++ b/test/shader_io/fragment_output_builtins_struct.wgsl.expected.wgsl @@ -1,11 +1,11 @@ struct FragmentOutputs { - [[builtin(frag_depth)]] + @builtin(frag_depth) frag_depth : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) sample_mask : u32; } -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1.0, 1u); } diff --git a/test/shader_io/fragment_output_locations.wgsl b/test/shader_io/fragment_output_locations.wgsl index b5858e86fa..239589d57d 100644 --- a/test/shader_io/fragment_output_locations.wgsl +++ b/test/shader_io/fragment_output_locations.wgsl @@ -1,19 +1,19 @@ -[[stage(fragment)]] -fn main0() -> [[location(0)]] i32 { +@stage(fragment) +fn main0() -> @location(0) i32 { return 1; } -[[stage(fragment)]] -fn main1() -> [[location(1)]] u32 { +@stage(fragment) +fn main1() -> @location(1) u32 { return 1u; } -[[stage(fragment)]] -fn main2() -> [[location(2)]] f32 { +@stage(fragment) +fn main2() -> @location(2) f32 { return 1.0; } -[[stage(fragment)]] -fn main3() -> [[location(3)]] vec4 { +@stage(fragment) +fn main3() -> @location(3) vec4 { return vec4(1.0, 2.0, 3.0, 4.0); } diff --git a/test/shader_io/fragment_output_locations.wgsl.expected.wgsl b/test/shader_io/fragment_output_locations.wgsl.expected.wgsl index b5858e86fa..239589d57d 100644 --- a/test/shader_io/fragment_output_locations.wgsl.expected.wgsl +++ b/test/shader_io/fragment_output_locations.wgsl.expected.wgsl @@ -1,19 +1,19 @@ -[[stage(fragment)]] -fn main0() -> [[location(0)]] i32 { +@stage(fragment) +fn main0() -> @location(0) i32 { return 1; } -[[stage(fragment)]] -fn main1() -> [[location(1)]] u32 { +@stage(fragment) +fn main1() -> @location(1) u32 { return 1u; } -[[stage(fragment)]] -fn main2() -> [[location(2)]] f32 { +@stage(fragment) +fn main2() -> @location(2) f32 { return 1.0; } -[[stage(fragment)]] -fn main3() -> [[location(3)]] vec4 { +@stage(fragment) +fn main3() -> @location(3) vec4 { return vec4(1.0, 2.0, 3.0, 4.0); } diff --git a/test/shader_io/fragment_output_locations_struct.wgsl b/test/shader_io/fragment_output_locations_struct.wgsl index c1968435ec..9d7c9c73ce 100644 --- a/test/shader_io/fragment_output_locations_struct.wgsl +++ b/test/shader_io/fragment_output_locations_struct.wgsl @@ -1,11 +1,11 @@ struct FragmentOutputs { - [[location(0)]] loc0 : i32; - [[location(1)]] loc1 : u32; - [[location(2)]] loc2 : f32; - [[location(3)]] loc3 : vec4; + @location(0) loc0 : i32; + @location(1) loc1 : u32; + @location(2) loc2 : f32; + @location(3) loc3 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1, 1u, 1.0, vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/fragment_output_locations_struct.wgsl.expected.wgsl b/test/shader_io/fragment_output_locations_struct.wgsl.expected.wgsl index da4e7cf14e..519623683d 100644 --- a/test/shader_io/fragment_output_locations_struct.wgsl.expected.wgsl +++ b/test/shader_io/fragment_output_locations_struct.wgsl.expected.wgsl @@ -1,15 +1,15 @@ struct FragmentOutputs { - [[location(0)]] + @location(0) loc0 : i32; - [[location(1)]] + @location(1) loc1 : u32; - [[location(2)]] + @location(2) loc2 : f32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1, 1u, 1.0, vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/fragment_output_mixed.wgsl b/test/shader_io/fragment_output_mixed.wgsl index 29e5108112..58fe80b9ec 100644 --- a/test/shader_io/fragment_output_mixed.wgsl +++ b/test/shader_io/fragment_output_mixed.wgsl @@ -1,13 +1,13 @@ struct FragmentOutputs { - [[location(0)]] loc0 : i32; - [[builtin(frag_depth)]] frag_depth : f32; - [[location(1)]] loc1 : u32; - [[location(2)]] loc2 : f32; - [[builtin(sample_mask)]] sample_mask : u32; - [[location(3)]] loc3 : vec4; + @location(0) loc0 : i32; + @builtin(frag_depth) frag_depth : f32; + @location(1) loc1 : u32; + @location(2) loc2 : f32; + @builtin(sample_mask) sample_mask : u32; + @location(3) loc3 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1, 2.0, 1u, 1.0, 2u, vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/fragment_output_mixed.wgsl.expected.wgsl b/test/shader_io/fragment_output_mixed.wgsl.expected.wgsl index 80692654c0..3cc71b61ac 100644 --- a/test/shader_io/fragment_output_mixed.wgsl.expected.wgsl +++ b/test/shader_io/fragment_output_mixed.wgsl.expected.wgsl @@ -1,19 +1,19 @@ struct FragmentOutputs { - [[location(0)]] + @location(0) loc0 : i32; - [[builtin(frag_depth)]] + @builtin(frag_depth) frag_depth : f32; - [[location(1)]] + @location(1) loc1 : u32; - [[location(2)]] + @location(2) loc2 : f32; - [[builtin(sample_mask)]] + @builtin(sample_mask) sample_mask : u32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(fragment)]] +@stage(fragment) fn main() -> FragmentOutputs { return FragmentOutputs(1, 2.0, 1u, 1.0, 2u, vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/interpolate_input_parameters.wgsl b/test/shader_io/interpolate_input_parameters.wgsl index 64556cd434..3e350ea55a 100644 --- a/test/shader_io/interpolate_input_parameters.wgsl +++ b/test/shader_io/interpolate_input_parameters.wgsl @@ -1,11 +1,11 @@ -[[stage(fragment)]] +@stage(fragment) fn main( - [[location(0)]] none : f32, - [[location(1), interpolate(flat)]] flat : f32, - [[location(2), interpolate(perspective, center)]] perspective_center : f32, - [[location(3), interpolate(perspective, centroid)]] perspective_centroid : f32, - [[location(4), interpolate(perspective, sample)]] perspective_sample : f32, - [[location(5), interpolate(linear, center)]] linear_center : f32, - [[location(6), interpolate(linear, centroid)]] linear_centroid : f32, - [[location(7), interpolate(linear, sample)]] linear_sample : f32) { + @location(0) none : f32, + @location(1) @interpolate(flat) flat : f32, + @location(2) @interpolate(perspective, center) perspective_center : f32, + @location(3) @interpolate(perspective, centroid) perspective_centroid : f32, + @location(4) @interpolate(perspective, sample) perspective_sample : f32, + @location(5) @interpolate(linear, center) linear_center : f32, + @location(6) @interpolate(linear, centroid) linear_centroid : f32, + @location(7) @interpolate(linear, sample) linear_sample : f32) { } diff --git a/test/shader_io/interpolate_input_parameters.wgsl.expected.wgsl b/test/shader_io/interpolate_input_parameters.wgsl.expected.wgsl index 3488ca7511..8dbd5b19ed 100644 --- a/test/shader_io/interpolate_input_parameters.wgsl.expected.wgsl +++ b/test/shader_io/interpolate_input_parameters.wgsl.expected.wgsl @@ -1,3 +1,3 @@ -[[stage(fragment)]] -fn main([[location(0)]] none : f32, [[location(1), interpolate(flat)]] flat : f32, [[location(2), interpolate(perspective, center)]] perspective_center : f32, [[location(3), interpolate(perspective, centroid)]] perspective_centroid : f32, [[location(4), interpolate(perspective, sample)]] perspective_sample : f32, [[location(5), interpolate(linear, center)]] linear_center : f32, [[location(6), interpolate(linear, centroid)]] linear_centroid : f32, [[location(7), interpolate(linear, sample)]] linear_sample : f32) { +@stage(fragment) +fn main(@location(0) none : f32, @location(1) @interpolate(flat) flat : f32, @location(2) @interpolate(perspective, center) perspective_center : f32, @location(3) @interpolate(perspective, centroid) perspective_centroid : f32, @location(4) @interpolate(perspective, sample) perspective_sample : f32, @location(5) @interpolate(linear, center) linear_center : f32, @location(6) @interpolate(linear, centroid) linear_centroid : f32, @location(7) @interpolate(linear, sample) linear_sample : f32) { } diff --git a/test/shader_io/interpolate_input_struct.wgsl b/test/shader_io/interpolate_input_struct.wgsl index 0299250fc3..5f5c8c194a 100644 --- a/test/shader_io/interpolate_input_struct.wgsl +++ b/test/shader_io/interpolate_input_struct.wgsl @@ -1,14 +1,14 @@ struct In { - [[location(0)]] none : f32; - [[location(1), interpolate(flat)]] flat : f32; - [[location(2), interpolate(perspective, center)]] perspective_center : f32; - [[location(3), interpolate(perspective, centroid)]] perspective_centroid : f32; - [[location(4), interpolate(perspective, sample)]] perspective_sample : f32; - [[location(5), interpolate(linear, center)]] linear_center : f32; - [[location(6), interpolate(linear, centroid)]] linear_centroid : f32; - [[location(7), interpolate(linear, sample)]] linear_sample : f32; + @location(0) none : f32; + @location(1) @interpolate(flat) flat : f32; + @location(2) @interpolate(perspective, center) perspective_center : f32; + @location(3) @interpolate(perspective, centroid) perspective_centroid : f32; + @location(4) @interpolate(perspective, sample) perspective_sample : f32; + @location(5) @interpolate(linear, center) linear_center : f32; + @location(6) @interpolate(linear, centroid) linear_centroid : f32; + @location(7) @interpolate(linear, sample) linear_sample : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main(in : In) { } diff --git a/test/shader_io/interpolate_input_struct.wgsl.expected.wgsl b/test/shader_io/interpolate_input_struct.wgsl.expected.wgsl index 20a8106f93..3a34745fbb 100644 --- a/test/shader_io/interpolate_input_struct.wgsl.expected.wgsl +++ b/test/shader_io/interpolate_input_struct.wgsl.expected.wgsl @@ -1,22 +1,22 @@ struct In { - [[location(0)]] + @location(0) none : f32; - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) flat : f32; - [[location(2), interpolate(perspective, center)]] + @location(2) @interpolate(perspective, center) perspective_center : f32; - [[location(3), interpolate(perspective, centroid)]] + @location(3) @interpolate(perspective, centroid) perspective_centroid : f32; - [[location(4), interpolate(perspective, sample)]] + @location(4) @interpolate(perspective, sample) perspective_sample : f32; - [[location(5), interpolate(linear, center)]] + @location(5) @interpolate(linear, center) linear_center : f32; - [[location(6), interpolate(linear, centroid)]] + @location(6) @interpolate(linear, centroid) linear_centroid : f32; - [[location(7), interpolate(linear, sample)]] + @location(7) @interpolate(linear, sample) linear_sample : f32; } -[[stage(fragment)]] +@stage(fragment) fn main(in : In) { } diff --git a/test/shader_io/interpolate_integers.wgsl b/test/shader_io/interpolate_integers.wgsl index 4b3ebe7d6d..f961c8a2ad 100644 --- a/test/shader_io/interpolate_integers.wgsl +++ b/test/shader_io/interpolate_integers.wgsl @@ -1,17 +1,17 @@ struct Interface { - [[location(0), interpolate(flat)]] i : i32; - [[location(1), interpolate(flat)]] u : u32; - [[location(2), interpolate(flat)]] vi : vec4; - [[location(3), interpolate(flat)]] vu : vec4; - [[builtin(position)]] pos : vec4; + @location(0) @interpolate(flat) i : i32; + @location(1) @interpolate(flat) u : u32; + @location(2) @interpolate(flat) vi : vec4; + @location(3) @interpolate(flat) vu : vec4; + @builtin(position) pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> Interface { return Interface(); } -[[stage(fragment)]] -fn frag_main(inputs : Interface) -> [[location(0)]] i32 { +@stage(fragment) +fn frag_main(inputs : Interface) -> @location(0) i32 { return inputs.i; } diff --git a/test/shader_io/interpolate_integers.wgsl.expected.wgsl b/test/shader_io/interpolate_integers.wgsl.expected.wgsl index afabf7c151..a6efd12e69 100644 --- a/test/shader_io/interpolate_integers.wgsl.expected.wgsl +++ b/test/shader_io/interpolate_integers.wgsl.expected.wgsl @@ -1,22 +1,22 @@ struct Interface { - [[location(0), interpolate(flat)]] + @location(0) @interpolate(flat) i : i32; - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) u : u32; - [[location(2), interpolate(flat)]] + @location(2) @interpolate(flat) vi : vec4; - [[location(3), interpolate(flat)]] + @location(3) @interpolate(flat) vu : vec4; - [[builtin(position)]] + @builtin(position) pos : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> Interface { return Interface(); } -[[stage(fragment)]] -fn frag_main(inputs : Interface) -> [[location(0)]] i32 { +@stage(fragment) +fn frag_main(inputs : Interface) -> @location(0) i32 { return inputs.i; } diff --git a/test/shader_io/interpolate_return_struct.wgsl b/test/shader_io/interpolate_return_struct.wgsl index 9d24e6159e..0cff79ed84 100644 --- a/test/shader_io/interpolate_return_struct.wgsl +++ b/test/shader_io/interpolate_return_struct.wgsl @@ -1,16 +1,16 @@ struct Out { - [[builtin(position)]] pos : vec4; - [[location(0)]] none : f32; - [[location(1), interpolate(flat)]] flat : f32; - [[location(2), interpolate(perspective, center)]] perspective_center : f32; - [[location(3), interpolate(perspective, centroid)]] perspective_centroid : f32; - [[location(4), interpolate(perspective, sample)]] perspective_sample : f32; - [[location(5), interpolate(linear, center)]] linear_center : f32; - [[location(6), interpolate(linear, centroid)]] linear_centroid : f32; - [[location(7), interpolate(linear, sample)]] linear_sample : f32; + @builtin(position) pos : vec4; + @location(0) none : f32; + @location(1) @interpolate(flat) flat : f32; + @location(2) @interpolate(perspective, center) perspective_center : f32; + @location(3) @interpolate(perspective, centroid) perspective_centroid : f32; + @location(4) @interpolate(perspective, sample) perspective_sample : f32; + @location(5) @interpolate(linear, center) linear_center : f32; + @location(6) @interpolate(linear, centroid) linear_centroid : f32; + @location(7) @interpolate(linear, sample) linear_sample : f32; }; -[[stage(vertex)]] +@stage(vertex) fn main() -> Out { return Out(); } diff --git a/test/shader_io/interpolate_return_struct.wgsl.expected.wgsl b/test/shader_io/interpolate_return_struct.wgsl.expected.wgsl index bcf81777b6..9a2164a616 100644 --- a/test/shader_io/interpolate_return_struct.wgsl.expected.wgsl +++ b/test/shader_io/interpolate_return_struct.wgsl.expected.wgsl @@ -1,25 +1,25 @@ struct Out { - [[builtin(position)]] + @builtin(position) pos : vec4; - [[location(0)]] + @location(0) none : f32; - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) flat : f32; - [[location(2), interpolate(perspective, center)]] + @location(2) @interpolate(perspective, center) perspective_center : f32; - [[location(3), interpolate(perspective, centroid)]] + @location(3) @interpolate(perspective, centroid) perspective_centroid : f32; - [[location(4), interpolate(perspective, sample)]] + @location(4) @interpolate(perspective, sample) perspective_sample : f32; - [[location(5), interpolate(linear, center)]] + @location(5) @interpolate(linear, center) linear_center : f32; - [[location(6), interpolate(linear, centroid)]] + @location(6) @interpolate(linear, centroid) linear_centroid : f32; - [[location(7), interpolate(linear, sample)]] + @location(7) @interpolate(linear, sample) linear_sample : f32; } -[[stage(vertex)]] +@stage(vertex) fn main() -> Out { return Out(); } diff --git a/test/shader_io/invariant.wgsl b/test/shader_io/invariant.wgsl index 66b0649ee4..9abbc940d5 100644 --- a/test/shader_io/invariant.wgsl +++ b/test/shader_io/invariant.wgsl @@ -1,4 +1,4 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position), invariant]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) @invariant vec4 { return vec4(); } diff --git a/test/shader_io/invariant.wgsl.expected.wgsl b/test/shader_io/invariant.wgsl.expected.wgsl index 66b0649ee4..9abbc940d5 100644 --- a/test/shader_io/invariant.wgsl.expected.wgsl +++ b/test/shader_io/invariant.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position), invariant]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) @invariant vec4 { return vec4(); } diff --git a/test/shader_io/invariant_struct_member.wgsl b/test/shader_io/invariant_struct_member.wgsl index 97d813f184..3b2a6adc9f 100644 --- a/test/shader_io/invariant_struct_member.wgsl +++ b/test/shader_io/invariant_struct_member.wgsl @@ -1,8 +1,8 @@ struct Out { - [[builtin(position), invariant]] pos : vec4; + @builtin(position) @invariant pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main() -> Out { return Out(); } diff --git a/test/shader_io/invariant_struct_member.wgsl.expected.wgsl b/test/shader_io/invariant_struct_member.wgsl.expected.wgsl index 503a0bae69..64d1f60b44 100644 --- a/test/shader_io/invariant_struct_member.wgsl.expected.wgsl +++ b/test/shader_io/invariant_struct_member.wgsl.expected.wgsl @@ -1,9 +1,9 @@ struct Out { - [[builtin(position), invariant]] + @builtin(position) @invariant pos : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> Out { return Out(); } diff --git a/test/shader_io/shared_struct_different_stages.wgsl b/test/shader_io/shared_struct_different_stages.wgsl index 802ce43720..2e527911cd 100644 --- a/test/shader_io/shared_struct_different_stages.wgsl +++ b/test/shader_io/shared_struct_different_stages.wgsl @@ -1,15 +1,15 @@ struct Interface { - [[location(1)]] col1 : f32; - [[location(2)]] col2 : f32; - [[builtin(position)]] pos : vec4; + @location(1) col1 : f32; + @location(2) col2 : f32; + @builtin(position) pos : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> Interface { return Interface(0.4, 0.6, vec4()); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(colors : Interface) { let r : f32 = colors.col1; let g : f32 = colors.col2; diff --git a/test/shader_io/shared_struct_different_stages.wgsl.expected.wgsl b/test/shader_io/shared_struct_different_stages.wgsl.expected.wgsl index 343afdd089..81fbc7a8eb 100644 --- a/test/shader_io/shared_struct_different_stages.wgsl.expected.wgsl +++ b/test/shader_io/shared_struct_different_stages.wgsl.expected.wgsl @@ -1,18 +1,18 @@ struct Interface { - [[location(1)]] + @location(1) col1 : f32; - [[location(2)]] + @location(2) col2 : f32; - [[builtin(position)]] + @builtin(position) pos : vec4; } -[[stage(vertex)]] +@stage(vertex) fn vert_main() -> Interface { return Interface(0.400000006, 0.600000024, vec4()); } -[[stage(fragment)]] +@stage(fragment) fn frag_main(colors : Interface) { let r : f32 = colors.col1; let g : f32 = colors.col2; diff --git a/test/shader_io/shared_struct_helper_function.wgsl b/test/shader_io/shared_struct_helper_function.wgsl index 2ebd0946db..7f7d2038d8 100644 --- a/test/shader_io/shared_struct_helper_function.wgsl +++ b/test/shader_io/shared_struct_helper_function.wgsl @@ -1,18 +1,18 @@ struct VertexOutput { - [[builtin(position)]] pos : vec4; - [[location(0), interpolate(flat)]] loc0 : i32; + @builtin(position) pos : vec4; + @location(0) @interpolate(flat) loc0 : i32; }; fn foo(x : f32) -> VertexOutput { return VertexOutput(vec4(x, x, x, 1.0), 42); } -[[stage(vertex)]] +@stage(vertex) fn vert_main1() -> VertexOutput { return foo(0.5); } -[[stage(vertex)]] +@stage(vertex) fn vert_main2() -> VertexOutput { return foo(0.25); } diff --git a/test/shader_io/shared_struct_helper_function.wgsl.expected.wgsl b/test/shader_io/shared_struct_helper_function.wgsl.expected.wgsl index 034d5e1fdd..4cad81a462 100644 --- a/test/shader_io/shared_struct_helper_function.wgsl.expected.wgsl +++ b/test/shader_io/shared_struct_helper_function.wgsl.expected.wgsl @@ -1,7 +1,7 @@ struct VertexOutput { - [[builtin(position)]] + @builtin(position) pos : vec4; - [[location(0), interpolate(flat)]] + @location(0) @interpolate(flat) loc0 : i32; } @@ -9,12 +9,12 @@ fn foo(x : f32) -> VertexOutput { return VertexOutput(vec4(x, x, x, 1.0), 42); } -[[stage(vertex)]] +@stage(vertex) fn vert_main1() -> VertexOutput { return foo(0.5); } -[[stage(vertex)]] +@stage(vertex) fn vert_main2() -> VertexOutput { return foo(0.25); } diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl b/test/shader_io/shared_struct_storage_buffer.wgsl index 5d3f93e66f..83b1ba5e03 100644 --- a/test/shader_io/shared_struct_storage_buffer.wgsl +++ b/test/shader_io/shared_struct_storage_buffer.wgsl @@ -1,13 +1,13 @@ struct S { - [[align(64)]] [[location(0)]] f : f32; - [[size(32)]] [[location(1), interpolate(flat)]] u : u32; - [[align(128)]] [[builtin(position)]] v : vec4; + @align(64) @location(0) f : f32; + @size(32) @location(1) @interpolate(flat) u : u32; + @align(128) @builtin(position) v : vec4; }; -[[group(0), binding(0)]] +@group(0) @binding(0) var output : S; -[[stage(fragment)]] +@stage(fragment) fn frag_main(input : S) { let f : f32 = input.f; let u : u32 = input.u; diff --git a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.wgsl b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.wgsl index 787270414e..f4667a48e4 100644 --- a/test/shader_io/shared_struct_storage_buffer.wgsl.expected.wgsl +++ b/test/shader_io/shared_struct_storage_buffer.wgsl.expected.wgsl @@ -1,15 +1,15 @@ struct S { - [[align(64), location(0)]] + @align(64) @location(0) f : f32; - [[size(32), location(1), interpolate(flat)]] + @size(32) @location(1) @interpolate(flat) u : u32; - [[align(128), builtin(position)]] + @align(128) @builtin(position) v : vec4; } -[[group(0), binding(0)]] var output : S; +@group(0) @binding(0) var output : S; -[[stage(fragment)]] +@stage(fragment) fn frag_main(input : S) { let f : f32 = input.f; let u : u32 = input.u; diff --git a/test/shader_io/vertex_input_builtins.wgsl b/test/shader_io/vertex_input_builtins.wgsl index 6d207b50ae..a73ae88b9e 100644 --- a/test/shader_io/vertex_input_builtins.wgsl +++ b/test/shader_io/vertex_input_builtins.wgsl @@ -1,8 +1,8 @@ -[[stage(vertex)]] +@stage(vertex) fn main( - [[builtin(vertex_index)]] vertex_index : u32, - [[builtin(instance_index)]] instance_index : u32, -) -> [[builtin(position)]] vec4 { + @builtin(vertex_index) vertex_index : u32, + @builtin(instance_index) instance_index : u32, +) -> @builtin(position) vec4 { let foo : u32 = vertex_index + instance_index; return vec4(); } diff --git a/test/shader_io/vertex_input_builtins.wgsl.expected.wgsl b/test/shader_io/vertex_input_builtins.wgsl.expected.wgsl index ef2f3ac6bf..9955c16160 100644 --- a/test/shader_io/vertex_input_builtins.wgsl.expected.wgsl +++ b/test/shader_io/vertex_input_builtins.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(vertex)]] -fn main([[builtin(vertex_index)]] vertex_index : u32, [[builtin(instance_index)]] instance_index : u32) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@builtin(vertex_index) vertex_index : u32, @builtin(instance_index) instance_index : u32) -> @builtin(position) vec4 { let foo : u32 = (vertex_index + instance_index); return vec4(); } diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl b/test/shader_io/vertex_input_builtins_struct.wgsl index d81bcdcc5c..03c295a9ec 100644 --- a/test/shader_io/vertex_input_builtins_struct.wgsl +++ b/test/shader_io/vertex_input_builtins_struct.wgsl @@ -1,10 +1,10 @@ struct VertexInputs { - [[builtin(vertex_index)]] vertex_index : u32; - [[builtin(instance_index)]] instance_index : u32; + @builtin(vertex_index) vertex_index : u32; + @builtin(instance_index) instance_index : u32; }; -[[stage(vertex)]] -fn main(inputs : VertexInputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : VertexInputs) -> @builtin(position) vec4 { let foo : u32 = inputs.vertex_index + inputs.instance_index; return vec4(); } diff --git a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.wgsl b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.wgsl index 7d885b4eab..e48655f5e4 100644 --- a/test/shader_io/vertex_input_builtins_struct.wgsl.expected.wgsl +++ b/test/shader_io/vertex_input_builtins_struct.wgsl.expected.wgsl @@ -1,12 +1,12 @@ struct VertexInputs { - [[builtin(vertex_index)]] + @builtin(vertex_index) vertex_index : u32; - [[builtin(instance_index)]] + @builtin(instance_index) instance_index : u32; } -[[stage(vertex)]] -fn main(inputs : VertexInputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : VertexInputs) -> @builtin(position) vec4 { let foo : u32 = (inputs.vertex_index + inputs.instance_index); return vec4(); } diff --git a/test/shader_io/vertex_input_locations.wgsl b/test/shader_io/vertex_input_locations.wgsl index 13fad04098..3627e13212 100644 --- a/test/shader_io/vertex_input_locations.wgsl +++ b/test/shader_io/vertex_input_locations.wgsl @@ -1,10 +1,10 @@ -[[stage(vertex)]] +@stage(vertex) fn main( - [[location(0)]] loc0 : i32, - [[location(1)]] loc1 : u32, - [[location(2)]] loc2 : f32, - [[location(3)]] loc3 : vec4, -) -> [[builtin(position)]] vec4 { + @location(0) loc0 : i32, + @location(1) loc1 : u32, + @location(2) loc2 : f32, + @location(3) loc3 : vec4, +) -> @builtin(position) vec4 { let i : i32 = loc0; let u : u32 = loc1; let f : f32 = loc2; diff --git a/test/shader_io/vertex_input_locations.wgsl.expected.wgsl b/test/shader_io/vertex_input_locations.wgsl.expected.wgsl index 3730fec5f4..4964dc78c1 100644 --- a/test/shader_io/vertex_input_locations.wgsl.expected.wgsl +++ b/test/shader_io/vertex_input_locations.wgsl.expected.wgsl @@ -1,5 +1,5 @@ -[[stage(vertex)]] -fn main([[location(0)]] loc0 : i32, [[location(1)]] loc1 : u32, [[location(2)]] loc2 : f32, [[location(3)]] loc3 : vec4) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(@location(0) loc0 : i32, @location(1) loc1 : u32, @location(2) loc2 : f32, @location(3) loc3 : vec4) -> @builtin(position) vec4 { let i : i32 = loc0; let u : u32 = loc1; let f : f32 = loc2; diff --git a/test/shader_io/vertex_input_locations_struct.wgsl b/test/shader_io/vertex_input_locations_struct.wgsl index 441ffdc591..96a8145ee3 100644 --- a/test/shader_io/vertex_input_locations_struct.wgsl +++ b/test/shader_io/vertex_input_locations_struct.wgsl @@ -1,12 +1,12 @@ struct VertexInputs { - [[location(0)]] loc0 : i32; - [[location(1)]] loc1 : u32; - [[location(2)]] loc2 : f32; - [[location(3)]] loc3 : vec4; + @location(0) loc0 : i32; + @location(1) loc1 : u32; + @location(2) loc2 : f32; + @location(3) loc3 : vec4; }; -[[stage(vertex)]] -fn main(inputs : VertexInputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : VertexInputs) -> @builtin(position) vec4 { let i : i32 = inputs.loc0; let u : u32 = inputs.loc1; let f : f32 = inputs.loc2; diff --git a/test/shader_io/vertex_input_locations_struct.wgsl.expected.wgsl b/test/shader_io/vertex_input_locations_struct.wgsl.expected.wgsl index 7b7c1b0240..c267c60a9b 100644 --- a/test/shader_io/vertex_input_locations_struct.wgsl.expected.wgsl +++ b/test/shader_io/vertex_input_locations_struct.wgsl.expected.wgsl @@ -1,16 +1,16 @@ struct VertexInputs { - [[location(0)]] + @location(0) loc0 : i32; - [[location(1)]] + @location(1) loc1 : u32; - [[location(2)]] + @location(2) loc2 : f32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(vertex)]] -fn main(inputs : VertexInputs) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs : VertexInputs) -> @builtin(position) vec4 { let i : i32 = inputs.loc0; let u : u32 = inputs.loc1; let f : f32 = inputs.loc2; diff --git a/test/shader_io/vertex_input_mixed.wgsl b/test/shader_io/vertex_input_mixed.wgsl index 7c5eafed61..8e3c764368 100644 --- a/test/shader_io/vertex_input_mixed.wgsl +++ b/test/shader_io/vertex_input_mixed.wgsl @@ -1,19 +1,19 @@ struct VertexInputs0 { - [[builtin(vertex_index)]] vertex_index : u32; - [[location(0)]] loc0 : i32; + @builtin(vertex_index) vertex_index : u32; + @location(0) loc0 : i32; }; struct VertexInputs1 { - [[location(2)]] loc2 : f32; - [[location(3)]] loc3 : vec4; + @location(2) loc2 : f32; + @location(3) loc3 : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main( inputs0 : VertexInputs0, - [[location(1)]] loc1 : u32, - [[builtin(instance_index)]] instance_index : u32, + @location(1) loc1 : u32, + @builtin(instance_index) instance_index : u32, inputs1 : VertexInputs1, -) -> [[builtin(position)]] vec4 { +) -> @builtin(position) vec4 { let foo : u32 = inputs0.vertex_index + instance_index; let i : i32 = inputs0.loc0; let u : u32 = loc1; diff --git a/test/shader_io/vertex_input_mixed.wgsl.expected.wgsl b/test/shader_io/vertex_input_mixed.wgsl.expected.wgsl index 81a6507b5e..5830ebeb46 100644 --- a/test/shader_io/vertex_input_mixed.wgsl.expected.wgsl +++ b/test/shader_io/vertex_input_mixed.wgsl.expected.wgsl @@ -1,19 +1,19 @@ struct VertexInputs0 { - [[builtin(vertex_index)]] + @builtin(vertex_index) vertex_index : u32; - [[location(0)]] + @location(0) loc0 : i32; } struct VertexInputs1 { - [[location(2)]] + @location(2) loc2 : f32; - [[location(3)]] + @location(3) loc3 : vec4; } -[[stage(vertex)]] -fn main(inputs0 : VertexInputs0, [[location(1)]] loc1 : u32, [[builtin(instance_index)]] instance_index : u32, inputs1 : VertexInputs1) -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main(inputs0 : VertexInputs0, @location(1) loc1 : u32, @builtin(instance_index) instance_index : u32, inputs1 : VertexInputs1) -> @builtin(position) vec4 { let foo : u32 = (inputs0.vertex_index + instance_index); let i : i32 = inputs0.loc0; let u : u32 = loc1; diff --git a/test/shader_io/vertex_output_builtins.wgsl b/test/shader_io/vertex_output_builtins.wgsl index 46776de0df..d606b44910 100644 --- a/test/shader_io/vertex_output_builtins.wgsl +++ b/test/shader_io/vertex_output_builtins.wgsl @@ -1,4 +1,4 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(1.0, 2.0, 3.0, 4.0); } diff --git a/test/shader_io/vertex_output_builtins.wgsl.expected.wgsl b/test/shader_io/vertex_output_builtins.wgsl.expected.wgsl index 46776de0df..d606b44910 100644 --- a/test/shader_io/vertex_output_builtins.wgsl.expected.wgsl +++ b/test/shader_io/vertex_output_builtins.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(vertex)]] -fn main() -> [[builtin(position)]] vec4 { +@stage(vertex) +fn main() -> @builtin(position) vec4 { return vec4(1.0, 2.0, 3.0, 4.0); } diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl b/test/shader_io/vertex_output_builtins_struct.wgsl index 9e09d38218..afdcdf5524 100644 --- a/test/shader_io/vertex_output_builtins_struct.wgsl +++ b/test/shader_io/vertex_output_builtins_struct.wgsl @@ -1,8 +1,8 @@ struct VertexOutputs { - [[builtin(position)]] position : vec4; + @builtin(position) position : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main() -> VertexOutputs { return VertexOutputs(vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.wgsl b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.wgsl index 744325c302..f08c3a88cc 100644 --- a/test/shader_io/vertex_output_builtins_struct.wgsl.expected.wgsl +++ b/test/shader_io/vertex_output_builtins_struct.wgsl.expected.wgsl @@ -1,9 +1,9 @@ struct VertexOutputs { - [[builtin(position)]] + @builtin(position) position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> VertexOutputs { return VertexOutputs(vec4(1.0, 2.0, 3.0, 4.0)); } diff --git a/test/shader_io/vertex_output_locations_struct.wgsl b/test/shader_io/vertex_output_locations_struct.wgsl index e7c4db1eb3..aca5f947c9 100644 --- a/test/shader_io/vertex_output_locations_struct.wgsl +++ b/test/shader_io/vertex_output_locations_struct.wgsl @@ -1,12 +1,12 @@ struct VertexOutputs { - [[location(0), interpolate(flat)]] loc0 : i32; - [[location(1), interpolate(flat)]] loc1 : u32; - [[location(2)]] loc2 : f32; - [[location(3)]] loc3 : vec4; - [[builtin(position)]] position : vec4; + @location(0) @interpolate(flat) loc0 : i32; + @location(1) @interpolate(flat) loc1 : u32; + @location(2) loc2 : f32; + @location(3) loc3 : vec4; + @builtin(position) position : vec4; }; -[[stage(vertex)]] +@stage(vertex) fn main() -> VertexOutputs { return VertexOutputs(1, 1u, 1.0, vec4(1.0, 2.0, 3.0, 4.0), vec4()); } diff --git a/test/shader_io/vertex_output_locations_struct.wgsl.expected.wgsl b/test/shader_io/vertex_output_locations_struct.wgsl.expected.wgsl index a3df42d165..a41d17a868 100644 --- a/test/shader_io/vertex_output_locations_struct.wgsl.expected.wgsl +++ b/test/shader_io/vertex_output_locations_struct.wgsl.expected.wgsl @@ -1,17 +1,17 @@ struct VertexOutputs { - [[location(0), interpolate(flat)]] + @location(0) @interpolate(flat) loc0 : i32; - [[location(1), interpolate(flat)]] + @location(1) @interpolate(flat) loc1 : u32; - [[location(2)]] + @location(2) loc2 : f32; - [[location(3)]] + @location(3) loc3 : vec4; - [[builtin(position)]] + @builtin(position) position : vec4; } -[[stage(vertex)]] +@stage(vertex) fn main() -> VertexOutputs { return VertexOutputs(1, 1u, 1.0, vec4(1.0, 2.0, 3.0, 4.0), vec4()); } diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl index 379856e989..54e9eaaaf2 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.wgsl index f6394af993..70dc145ada 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl index 5ca583618e..626f7daa1a 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.wgsl index 85d01c6b90..66689576a3 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl index d9dd6b2968..f8a0e7cf61 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.wgsl index 6d4ee1c6c6..fa0f10b525 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl index 9d569e306c..6ca184ccbe 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl @@ -21,9 +21,9 @@ fn getNextIndex() -> u32 { return nextIndex; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.wgsl index 7ae55bed18..071143ff6a 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.wgsl @@ -22,9 +22,9 @@ fn getNextIndex() -> u32 { return nextIndex; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl index 2268109fbe..0583104c84 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.wgsl index 22548cc706..f41f74ee5c 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl index 2f0e920379..b2f6451c4e 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl @@ -11,9 +11,9 @@ struct OuterS { a1 : array, 8>; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.wgsl index 555cf5d579..bf83d2c27b 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.wgsl @@ -11,9 +11,9 @@ struct OuterS { a1 : array, 8>; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl index 2dfdfc80b1..a03babc870 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl @@ -14,9 +14,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.wgsl index cae1e5dffe..6bd5dd7e73 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.wgsl @@ -14,9 +14,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl index c8d97e5f7d..6a377ece2c 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl @@ -15,9 +15,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.wgsl index 6969d94663..aa1010a62e 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.wgsl @@ -15,9 +15,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl index 99ad0f05b6..b4b4f715d8 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl @@ -10,10 +10,10 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; -[[binding(0), group(0)]] var s1 : OuterS; +@group(1) @binding(4) var uniforms : Uniforms; +@binding(0) @group(0) var s1 : OuterS; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; s1.a1[uniforms.i] = v; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.wgsl index c08a5f8c39..d5c02bc8ba 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.wgsl @@ -10,11 +10,11 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[binding(0), group(0)]] var s1 : OuterS; +@binding(0) @group(0) var s1 : OuterS; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; s1.a1[uniforms.i] = v; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl index 0d40e81c17..711e990202 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl @@ -15,10 +15,10 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; -[[binding(0), group(0)]] var s : OuterS; +@group(1) @binding(4) var uniforms : Uniforms; +@binding(0) @group(0) var s : OuterS; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; s.a1[uniforms.i].a2[uniforms.j] = v; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.wgsl index c53b90d03c..56b7fd64ce 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.wgsl @@ -15,11 +15,11 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[binding(0), group(0)]] var s : OuterS; +@binding(0) @group(0) var s : OuterS; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; s.a1[uniforms.i].a2[uniforms.j] = v; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl index 3c67742466..ee95b91f1e 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl @@ -6,9 +6,9 @@ struct OuterS { m1 : mat2x4; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; s1.m1[uniforms.i] = vec4(1.0); diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.wgsl index aeb5f1b7ac..9cb1a854dc 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.wgsl @@ -6,9 +6,9 @@ struct OuterS { m1 : mat2x4; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; s1.m1[uniforms.i] = vec4(1.0); diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl index 1fcd3975d9..9d8ac686ed 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl @@ -11,9 +11,9 @@ struct OuterS { a2 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.wgsl index 55091c5937..d39372f19c 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.wgsl @@ -11,9 +11,9 @@ struct OuterS { a2 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl index bff1418116..12591b3651 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl @@ -14,9 +14,9 @@ struct OuterS { s2 : S1; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.wgsl index f2ebffe956..2d65b1f4e2 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.wgsl @@ -14,9 +14,9 @@ struct OuterS { s2 : S1; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl index 578124ff90..b5baa12f46 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl @@ -6,9 +6,9 @@ struct OuterS { v1 : vec3; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; s1.v1[uniforms.i] = 1.0; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.wgsl index da718cf198..e47e024219 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.wgsl @@ -6,9 +6,9 @@ struct OuterS { v1 : vec3; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; s1.v1[uniforms.i] = 1.0; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl index c8b46c5014..49fbde7b40 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl @@ -6,13 +6,13 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(i: u32) -> u32 { return i + 1u; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; var v : vec3; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.wgsl index 928e38d693..bfa66c2eec 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.wgsl @@ -6,13 +6,13 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(i : u32) -> u32 { return (i + 1u); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; var v : vec3; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl index b44dcfa789..133c000c35 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.wgsl index f65b28530f..5ae5fca693 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.wgsl @@ -10,9 +10,9 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : InnerS; var s1 : OuterS; diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl index 2391e14e66..b7cedd0f40 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl @@ -7,14 +7,14 @@ struct InnerS { struct OuterS { a1 : array; }; -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr) { var v : InnerS; (*p).a1[uniforms.i] = v; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; f(&s1); diff --git a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.wgsl b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.wgsl index 86b031af1c..75cedf73fa 100644 --- a/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.wgsl +++ b/test/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.wgsl @@ -10,14 +10,14 @@ struct OuterS { a1 : array; } -[[group(1), binding(4)]] var uniforms : Uniforms; +@group(1) @binding(4) var uniforms : Uniforms; fn f(p : ptr) { var v : InnerS; (*(p)).a1[uniforms.i] = v; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var s1 : OuterS; f(&(s1)); diff --git a/test/statements/assign/phony/addr_of_non_constructable.wgsl b/test/statements/assign/phony/addr_of_non_constructable.wgsl index 2ebe66dfa8..f616560606 100644 --- a/test/statements/assign/phony/addr_of_non_constructable.wgsl +++ b/test/statements/assign/phony/addr_of_non_constructable.wgsl @@ -2,9 +2,9 @@ struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = &s; } diff --git a/test/statements/assign/phony/addr_of_non_constructable.wgsl.expected.wgsl b/test/statements/assign/phony/addr_of_non_constructable.wgsl.expected.wgsl index 0952e9dd5a..9a8aa90ec7 100644 --- a/test/statements/assign/phony/addr_of_non_constructable.wgsl.expected.wgsl +++ b/test/statements/assign/phony/addr_of_non_constructable.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = &(s); } diff --git a/test/statements/assign/phony/addr_of_runtime_array.wgsl b/test/statements/assign/phony/addr_of_runtime_array.wgsl index 9121fe854c..bbf5448196 100644 --- a/test/statements/assign/phony/addr_of_runtime_array.wgsl +++ b/test/statements/assign/phony/addr_of_runtime_array.wgsl @@ -2,9 +2,9 @@ struct S { arr : array; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = &s.arr; } diff --git a/test/statements/assign/phony/addr_of_runtime_array.wgsl.expected.wgsl b/test/statements/assign/phony/addr_of_runtime_array.wgsl.expected.wgsl index b6c74412f5..13a646249f 100644 --- a/test/statements/assign/phony/addr_of_runtime_array.wgsl.expected.wgsl +++ b/test/statements/assign/phony/addr_of_runtime_array.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { arr : array; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = &(s.arr); } diff --git a/test/statements/assign/phony/call.wgsl b/test/statements/assign/phony/call.wgsl index 8be76ec927..5f44585890 100644 --- a/test/statements/assign/phony/call.wgsl +++ b/test/statements/assign/phony/call.wgsl @@ -2,7 +2,7 @@ fn f(a: i32, b: i32, c: i32) -> i32 { return a * b + c; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = f(1, 2, 3); } diff --git a/test/statements/assign/phony/call.wgsl.expected.wgsl b/test/statements/assign/phony/call.wgsl.expected.wgsl index c650359f48..cef5c5f1eb 100644 --- a/test/statements/assign/phony/call.wgsl.expected.wgsl +++ b/test/statements/assign/phony/call.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn f(a : i32, b : i32, c : i32) -> i32 { return ((a * b) + c); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = f(1, 2, 3); } diff --git a/test/statements/assign/phony/multiple_side_effects.wgsl b/test/statements/assign/phony/multiple_side_effects.wgsl index fcfccd1136..da2faf8f35 100644 --- a/test/statements/assign/phony/multiple_side_effects.wgsl +++ b/test/statements/assign/phony/multiple_side_effects.wgsl @@ -2,7 +2,7 @@ fn f(a: i32, b: i32, c: i32) -> i32 { return a * b + c; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = f(1, 2, 3) + f(4, 5, 6) * f(7, f(8, 9, 10), 11); } diff --git a/test/statements/assign/phony/multiple_side_effects.wgsl.expected.wgsl b/test/statements/assign/phony/multiple_side_effects.wgsl.expected.wgsl index 0c7cc23efd..e438785ccd 100644 --- a/test/statements/assign/phony/multiple_side_effects.wgsl.expected.wgsl +++ b/test/statements/assign/phony/multiple_side_effects.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn f(a : i32, b : i32, c : i32) -> i32 { return ((a * b) + c); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = (f(1, 2, 3) + (f(4, 5, 6) * f(7, f(8, 9, 10), 11))); } diff --git a/test/statements/assign/phony/storage_buffer.wgsl b/test/statements/assign/phony/storage_buffer.wgsl index 9f784723ce..c8eb0ec3bc 100644 --- a/test/statements/assign/phony/storage_buffer.wgsl +++ b/test/statements/assign/phony/storage_buffer.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; }; -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = s; _ = s.i; diff --git a/test/statements/assign/phony/storage_buffer.wgsl.expected.wgsl b/test/statements/assign/phony/storage_buffer.wgsl.expected.wgsl index c4caa99b03..5f2debd677 100644 --- a/test/statements/assign/phony/storage_buffer.wgsl.expected.wgsl +++ b/test/statements/assign/phony/storage_buffer.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; } -[[binding(0), group(0)]] var s : S; +@binding(0) @group(0) var s : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = s; _ = s.i; diff --git a/test/statements/assign/phony/uniform_buffer.wgsl b/test/statements/assign/phony/uniform_buffer.wgsl index c0526bc69d..f7286c9a43 100644 --- a/test/statements/assign/phony/uniform_buffer.wgsl +++ b/test/statements/assign/phony/uniform_buffer.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; }; -[[binding(0), group(0)]] var u : S; +@binding(0) @group(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = u; _ = u.i; diff --git a/test/statements/assign/phony/uniform_buffer.wgsl.expected.wgsl b/test/statements/assign/phony/uniform_buffer.wgsl.expected.wgsl index 3ef1045311..d20153a546 100644 --- a/test/statements/assign/phony/uniform_buffer.wgsl.expected.wgsl +++ b/test/statements/assign/phony/uniform_buffer.wgsl.expected.wgsl @@ -2,9 +2,9 @@ struct S { i : i32; } -[[binding(0), group(0)]] var u : S; +@binding(0) @group(0) var u : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = u; _ = u.i; diff --git a/test/statements/switch/common.wgsl b/test/statements/switch/common.wgsl index ada8f5e56d..bed7942008 100644 --- a/test/statements/switch/common.wgsl +++ b/test/statements/switch/common.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; var result : i32; diff --git a/test/statements/switch/common.wgsl.expected.wgsl b/test/statements/switch/common.wgsl.expected.wgsl index 9aad3f1fb3..8b56b034b6 100644 --- a/test/statements/switch/common.wgsl.expected.wgsl +++ b/test/statements/switch/common.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; var result : i32; diff --git a/test/statements/switch/fallthrough.wgsl b/test/statements/switch/fallthrough.wgsl index 20eae21cd4..70691c8176 100644 --- a/test/statements/switch/fallthrough.wgsl +++ b/test/statements/switch/fallthrough.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; switch(i) { diff --git a/test/statements/switch/fallthrough.wgsl.expected.wgsl b/test/statements/switch/fallthrough.wgsl.expected.wgsl index 37163f5ab9..b04e882d1a 100644 --- a/test/statements/switch/fallthrough.wgsl.expected.wgsl +++ b/test/statements/switch/fallthrough.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; switch(i) { diff --git a/test/statements/switch/only_default_case.wgsl b/test/statements/switch/only_default_case.wgsl index cb12fb9c11..0f61d18bda 100644 --- a/test/statements/switch/only_default_case.wgsl +++ b/test/statements/switch/only_default_case.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; var result : i32; diff --git a/test/statements/switch/only_default_case.wgsl.expected.wgsl b/test/statements/switch/only_default_case.wgsl.expected.wgsl index bd050b7592..234f2565c8 100644 --- a/test/statements/switch/only_default_case.wgsl.expected.wgsl +++ b/test/statements/switch/only_default_case.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn f() { var i : i32; var result : i32; diff --git a/test/struct/type_constructor.wgsl b/test/struct/type_constructor.wgsl index 1725ffa90a..f79b527418 100644 --- a/test/struct/type_constructor.wgsl +++ b/test/struct/type_constructor.wgsl @@ -20,7 +20,7 @@ struct T { a : array; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x : i32 = 42; diff --git a/test/struct/type_constructor.wgsl.expected.wgsl b/test/struct/type_constructor.wgsl.expected.wgsl index c526e3fbee..d4a5bbd6cc 100644 --- a/test/struct/type_constructor.wgsl.expected.wgsl +++ b/test/struct/type_constructor.wgsl.expected.wgsl @@ -20,7 +20,7 @@ struct T { a : array; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let x : i32 = 42; let empty : S1 = S1(); diff --git a/test/types/function_scope_declarations.wgsl b/test/types/function_scope_declarations.wgsl index 9f1325032a..fe560bbe31 100644 --- a/test/types/function_scope_declarations.wgsl +++ b/test/types/function_scope_declarations.wgsl @@ -2,7 +2,7 @@ struct S { a : f32; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var bool_var : bool = bool(); let bool_let : bool = bool(); diff --git a/test/types/function_scope_declarations.wgsl.expected.wgsl b/test/types/function_scope_declarations.wgsl.expected.wgsl index 3845786bef..e5168c264c 100644 --- a/test/types/function_scope_declarations.wgsl.expected.wgsl +++ b/test/types/function_scope_declarations.wgsl.expected.wgsl @@ -2,7 +2,7 @@ struct S { a : f32; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var bool_var : bool = bool(); let bool_let : bool = bool(); diff --git a/test/types/function_scope_var_conversions.wgsl b/test/types/function_scope_var_conversions.wgsl index 66cc3784ba..4f58b71701 100644 --- a/test/types/function_scope_var_conversions.wgsl +++ b/test/types/function_scope_var_conversions.wgsl @@ -3,7 +3,7 @@ fn constant_with_non_constant() { var b : vec2 = vec2(f32(i32(1)), a); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var bool_var1 : bool = bool(123u); var bool_var2 : bool = bool(123); diff --git a/test/types/function_scope_var_conversions.wgsl.expected.wgsl b/test/types/function_scope_var_conversions.wgsl.expected.wgsl index de961c6fac..53206b3a31 100644 --- a/test/types/function_scope_var_conversions.wgsl.expected.wgsl +++ b/test/types/function_scope_var_conversions.wgsl.expected.wgsl @@ -3,7 +3,7 @@ fn constant_with_non_constant() { var b : vec2 = vec2(f32(i32(1)), a); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var bool_var1 : bool = bool(123u); var bool_var2 : bool = bool(123); diff --git a/test/types/module_scope_let.wgsl b/test/types/module_scope_let.wgsl index 85b317cff7..54718f4d2b 100644 --- a/test/types/module_scope_let.wgsl +++ b/test/types/module_scope_let.wgsl @@ -13,6 +13,6 @@ let m3x4_let : mat3x4 = mat3x4(); let arr_let : array = array(); let struct_let : S = S(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/module_scope_let.wgsl.expected.wgsl b/test/types/module_scope_let.wgsl.expected.wgsl index be35814f29..8d091d3eef 100644 --- a/test/types/module_scope_let.wgsl.expected.wgsl +++ b/test/types/module_scope_let.wgsl.expected.wgsl @@ -22,6 +22,6 @@ let arr_let : array = array(); let struct_let : S = S(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/module_scope_var.wgsl b/test/types/module_scope_var.wgsl index e9ab444e16..a748f59d00 100644 --- a/test/types/module_scope_var.wgsl +++ b/test/types/module_scope_var.wgsl @@ -13,7 +13,7 @@ var m2x3_var : mat2x3; var arr_var : array; var struct_var : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { // Reference the module-scope variables to stop them from being removed. bool_var = bool(); diff --git a/test/types/module_scope_var.wgsl.expected.wgsl b/test/types/module_scope_var.wgsl.expected.wgsl index 55f4e0a9ef..31ee7a75e9 100644 --- a/test/types/module_scope_var.wgsl.expected.wgsl +++ b/test/types/module_scope_var.wgsl.expected.wgsl @@ -22,7 +22,7 @@ var arr_var : array; var struct_var : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { bool_var = bool(); i32_var = i32(); diff --git a/test/types/module_scope_var_conversions.wgsl b/test/types/module_scope_var_conversions.wgsl index 935a1e4abf..ce6fa2ee3f 100644 --- a/test/types/module_scope_var_conversions.wgsl +++ b/test/types/module_scope_var_conversions.wgsl @@ -25,7 +25,7 @@ var v3u32_var3 : vec3 = vec3(vec3(true)); var v3bool_var4 : vec3 = vec3(vec2(vec2(123.0)), true); var v4bool_var5 : vec4 = vec4(vec2(vec2(123.0, 0.0)), vec2(true, bool(f32(0.0)))); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { // Reference the module-scope variables to stop them from being removed. bool_var1 = bool(); diff --git a/test/types/module_scope_var_conversions.wgsl.expected.wgsl b/test/types/module_scope_var_conversions.wgsl.expected.wgsl index f3b88760f6..b5373bf806 100644 --- a/test/types/module_scope_var_conversions.wgsl.expected.wgsl +++ b/test/types/module_scope_var_conversions.wgsl.expected.wgsl @@ -38,7 +38,7 @@ var v3bool_var4 : vec3 = vec3(vec2(vec2(123.0)), var v4bool_var5 : vec4 = vec4(vec2(vec2(123.0, 0.0)), vec2(true, bool(f32(0.0)))); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { bool_var1 = bool(); bool_var2 = bool(); diff --git a/test/types/module_scope_var_initializers.wgsl b/test/types/module_scope_var_initializers.wgsl index b7402d0c51..fb2eb8c45a 100644 --- a/test/types/module_scope_var_initializers.wgsl +++ b/test/types/module_scope_var_initializers.wgsl @@ -13,7 +13,7 @@ var m2x3_var : mat2x3 = mat2x3(); var arr_var : array = array(); var struct_var : S = S(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { // Reference the module-scope variables to stop them from being removed. bool_var = bool(); diff --git a/test/types/module_scope_var_initializers.wgsl.expected.wgsl b/test/types/module_scope_var_initializers.wgsl.expected.wgsl index d9dcf61be2..e2b011b069 100644 --- a/test/types/module_scope_var_initializers.wgsl.expected.wgsl +++ b/test/types/module_scope_var_initializers.wgsl.expected.wgsl @@ -22,7 +22,7 @@ var arr_var : array = array(); var struct_var : S = S(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { bool_var = bool(); i32_var = i32(); diff --git a/test/types/parameters.wgsl b/test/types/parameters.wgsl index 21987c937c..1ea45aee81 100644 --- a/test/types/parameters.wgsl +++ b/test/types/parameters.wgsl @@ -18,6 +18,6 @@ fn foo( param_ptr_arr : ptr>, ) {} -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/parameters.wgsl.expected.wgsl b/test/types/parameters.wgsl.expected.wgsl index 2720ce3034..2bda0fb7f7 100644 --- a/test/types/parameters.wgsl.expected.wgsl +++ b/test/types/parameters.wgsl.expected.wgsl @@ -5,6 +5,6 @@ struct S { fn foo(param_bool : bool, param_i32 : i32, param_u32 : u32, param_f32 : f32, param_v2i32 : vec2, param_v3u32 : vec3, param_v4f32 : vec4, param_m2x3 : mat2x3, param_arr : array, param_struct : S, param_ptr_f32 : ptr, param_ptr_vec : ptr>, param_ptr_arr : ptr>) { } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/return_types.wgsl b/test/types/return_types.wgsl index c65b996721..1ed77ff3f8 100644 --- a/test/types/return_types.wgsl +++ b/test/types/return_types.wgsl @@ -13,6 +13,6 @@ fn ret_m2x3() -> mat2x3 { return mat2x3(); } fn ret_arr() -> array { return array(); } fn ret_struct() -> S { return S(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/return_types.wgsl.expected.wgsl b/test/types/return_types.wgsl.expected.wgsl index d34a0957e3..c888b198cb 100644 --- a/test/types/return_types.wgsl.expected.wgsl +++ b/test/types/return_types.wgsl.expected.wgsl @@ -42,6 +42,6 @@ fn ret_struct() -> S { return S(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { } diff --git a/test/types/sampler.wgsl b/test/types/sampler.wgsl index 10856209e2..edeb51e5b2 100644 --- a/test/types/sampler.wgsl +++ b/test/types/sampler.wgsl @@ -1,7 +1,7 @@ -[[group(0), binding(0)]] var s : sampler; -[[group(0), binding(1)]] var sc : sampler_comparison; +@group(0) @binding(0) var s : sampler; +@group(0) @binding(1) var sc : sampler_comparison; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = s; _ = sc; diff --git a/test/types/sampler.wgsl.expected.wgsl b/test/types/sampler.wgsl.expected.wgsl index 315599bb51..3d873eb83e 100644 --- a/test/types/sampler.wgsl.expected.wgsl +++ b/test/types/sampler.wgsl.expected.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var s : sampler; +@group(0) @binding(0) var s : sampler; -[[group(0), binding(1)]] var sc : sampler_comparison; +@group(0) @binding(1) var sc : sampler_comparison; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = s; _ = sc; diff --git a/test/types/struct_members.wgsl b/test/types/struct_members.wgsl index 2bd0f3396c..e179bdb010 100644 --- a/test/types/struct_members.wgsl +++ b/test/types/struct_members.wgsl @@ -15,7 +15,7 @@ struct S { member_struct : S_inner; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let s : S = S(); } diff --git a/test/types/struct_members.wgsl.expected.wgsl b/test/types/struct_members.wgsl.expected.wgsl index 7ff178c68e..6778410edd 100644 --- a/test/types/struct_members.wgsl.expected.wgsl +++ b/test/types/struct_members.wgsl.expected.wgsl @@ -15,7 +15,7 @@ struct S { member_struct : S_inner; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { let s : S = S(); } diff --git a/test/types/texture/depth/2d.wgsl b/test/types/texture/depth/2d.wgsl index 853e277694..e3a53cd85b 100644 --- a/test/types/texture/depth/2d.wgsl +++ b/test/types/texture/depth/2d.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_2d; +@group(0) @binding(0) var t_f : texture_depth_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/2d.wgsl.expected.wgsl b/test/types/texture/depth/2d.wgsl.expected.wgsl index 853e277694..e3a53cd85b 100644 --- a/test/types/texture/depth/2d.wgsl.expected.wgsl +++ b/test/types/texture/depth/2d.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_2d; +@group(0) @binding(0) var t_f : texture_depth_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/2d_array.wgsl b/test/types/texture/depth/2d_array.wgsl index 9338fe598b..e6fac8c5cb 100644 --- a/test/types/texture/depth/2d_array.wgsl +++ b/test/types/texture/depth/2d_array.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_2d_array; +@group(0) @binding(0) var t_f : texture_depth_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/2d_array.wgsl.expected.wgsl b/test/types/texture/depth/2d_array.wgsl.expected.wgsl index 9338fe598b..e6fac8c5cb 100644 --- a/test/types/texture/depth/2d_array.wgsl.expected.wgsl +++ b/test/types/texture/depth/2d_array.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_2d_array; +@group(0) @binding(0) var t_f : texture_depth_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/cube.wgsl b/test/types/texture/depth/cube.wgsl index bd16ce84f6..785b96cd4c 100644 --- a/test/types/texture/depth/cube.wgsl +++ b/test/types/texture/depth/cube.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_cube; +@group(0) @binding(0) var t_f : texture_depth_cube; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/cube.wgsl.expected.wgsl b/test/types/texture/depth/cube.wgsl.expected.wgsl index bd16ce84f6..785b96cd4c 100644 --- a/test/types/texture/depth/cube.wgsl.expected.wgsl +++ b/test/types/texture/depth/cube.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_cube; +@group(0) @binding(0) var t_f : texture_depth_cube; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/cube_array.wgsl b/test/types/texture/depth/cube_array.wgsl index d30008f33a..0e1b07e8bc 100644 --- a/test/types/texture/depth/cube_array.wgsl +++ b/test/types/texture/depth/cube_array.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_cube_array; +@group(0) @binding(0) var t_f : texture_depth_cube_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/depth/cube_array.wgsl.expected.wgsl b/test/types/texture/depth/cube_array.wgsl.expected.wgsl index d30008f33a..0e1b07e8bc 100644 --- a/test/types/texture/depth/cube_array.wgsl.expected.wgsl +++ b/test/types/texture/depth/cube_array.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[group(0), binding(0)]] var t_f : texture_depth_cube_array; +@group(0) @binding(0) var t_f : texture_depth_cube_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; } diff --git a/test/types/texture/multisampled/2d.wgsl b/test/types/texture/multisampled/2d.wgsl index 9de9f26a4c..76521e5585 100644 --- a/test/types/texture/multisampled/2d.wgsl +++ b/test/types/texture/multisampled/2d.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_multisampled_2d; -[[group(0), binding(1)]] var t_i : texture_multisampled_2d; -[[group(0), binding(2)]] var t_u : texture_multisampled_2d; +@group(0) @binding(0) var t_f : texture_multisampled_2d; +@group(0) @binding(1) var t_i : texture_multisampled_2d; +@group(0) @binding(2) var t_u : texture_multisampled_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/multisampled/2d.wgsl.expected.wgsl b/test/types/texture/multisampled/2d.wgsl.expected.wgsl index 4c078caced..d8eb77b57c 100644 --- a/test/types/texture/multisampled/2d.wgsl.expected.wgsl +++ b/test/types/texture/multisampled/2d.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_multisampled_2d; +@group(0) @binding(0) var t_f : texture_multisampled_2d; -[[group(0), binding(1)]] var t_i : texture_multisampled_2d; +@group(0) @binding(1) var t_i : texture_multisampled_2d; -[[group(0), binding(2)]] var t_u : texture_multisampled_2d; +@group(0) @binding(2) var t_u : texture_multisampled_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/1d.wgsl b/test/types/texture/sampled/1d.wgsl index bfc4cf0041..ed97090b06 100644 --- a/test/types/texture/sampled/1d.wgsl +++ b/test/types/texture/sampled/1d.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_1d; -[[group(0), binding(1)]] var t_i : texture_1d; -[[group(0), binding(2)]] var t_u : texture_1d; +@group(0) @binding(0) var t_f : texture_1d; +@group(0) @binding(1) var t_i : texture_1d; +@group(0) @binding(2) var t_u : texture_1d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/1d.wgsl.expected.wgsl b/test/types/texture/sampled/1d.wgsl.expected.wgsl index a14ff96b3b..565089e820 100644 --- a/test/types/texture/sampled/1d.wgsl.expected.wgsl +++ b/test/types/texture/sampled/1d.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_1d; +@group(0) @binding(0) var t_f : texture_1d; -[[group(0), binding(1)]] var t_i : texture_1d; +@group(0) @binding(1) var t_i : texture_1d; -[[group(0), binding(2)]] var t_u : texture_1d; +@group(0) @binding(2) var t_u : texture_1d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/2d.wgsl b/test/types/texture/sampled/2d.wgsl index eac84598ef..b6be42b742 100644 --- a/test/types/texture/sampled/2d.wgsl +++ b/test/types/texture/sampled/2d.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_2d; -[[group(0), binding(1)]] var t_i : texture_2d; -[[group(0), binding(2)]] var t_u : texture_2d; +@group(0) @binding(0) var t_f : texture_2d; +@group(0) @binding(1) var t_i : texture_2d; +@group(0) @binding(2) var t_u : texture_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/2d.wgsl.expected.wgsl b/test/types/texture/sampled/2d.wgsl.expected.wgsl index 7536291680..007b85fc2a 100644 --- a/test/types/texture/sampled/2d.wgsl.expected.wgsl +++ b/test/types/texture/sampled/2d.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_2d; +@group(0) @binding(0) var t_f : texture_2d; -[[group(0), binding(1)]] var t_i : texture_2d; +@group(0) @binding(1) var t_i : texture_2d; -[[group(0), binding(2)]] var t_u : texture_2d; +@group(0) @binding(2) var t_u : texture_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/2d_array.wgsl b/test/types/texture/sampled/2d_array.wgsl index ff687c1608..1dcfc6ce44 100644 --- a/test/types/texture/sampled/2d_array.wgsl +++ b/test/types/texture/sampled/2d_array.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_2d_array; -[[group(0), binding(1)]] var t_i : texture_2d_array; -[[group(0), binding(2)]] var t_u : texture_2d_array; +@group(0) @binding(0) var t_f : texture_2d_array; +@group(0) @binding(1) var t_i : texture_2d_array; +@group(0) @binding(2) var t_u : texture_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/2d_array.wgsl.expected.wgsl b/test/types/texture/sampled/2d_array.wgsl.expected.wgsl index 487e67204d..5201bbeefa 100644 --- a/test/types/texture/sampled/2d_array.wgsl.expected.wgsl +++ b/test/types/texture/sampled/2d_array.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_2d_array; +@group(0) @binding(0) var t_f : texture_2d_array; -[[group(0), binding(1)]] var t_i : texture_2d_array; +@group(0) @binding(1) var t_i : texture_2d_array; -[[group(0), binding(2)]] var t_u : texture_2d_array; +@group(0) @binding(2) var t_u : texture_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/3d.wgsl b/test/types/texture/sampled/3d.wgsl index cd8f0ecdae..37a525ecbb 100644 --- a/test/types/texture/sampled/3d.wgsl +++ b/test/types/texture/sampled/3d.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_3d; -[[group(0), binding(1)]] var t_i : texture_3d; -[[group(0), binding(2)]] var t_u : texture_3d; +@group(0) @binding(0) var t_f : texture_3d; +@group(0) @binding(1) var t_i : texture_3d; +@group(0) @binding(2) var t_u : texture_3d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/3d.wgsl.expected.wgsl b/test/types/texture/sampled/3d.wgsl.expected.wgsl index ddfc2dbc56..747bc8f573 100644 --- a/test/types/texture/sampled/3d.wgsl.expected.wgsl +++ b/test/types/texture/sampled/3d.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_3d; +@group(0) @binding(0) var t_f : texture_3d; -[[group(0), binding(1)]] var t_i : texture_3d; +@group(0) @binding(1) var t_i : texture_3d; -[[group(0), binding(2)]] var t_u : texture_3d; +@group(0) @binding(2) var t_u : texture_3d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/cube.wgsl b/test/types/texture/sampled/cube.wgsl index 3e1d8f089c..89859e9c70 100644 --- a/test/types/texture/sampled/cube.wgsl +++ b/test/types/texture/sampled/cube.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_cube; -[[group(0), binding(1)]] var t_i : texture_cube; -[[group(0), binding(2)]] var t_u : texture_cube; +@group(0) @binding(0) var t_f : texture_cube; +@group(0) @binding(1) var t_i : texture_cube; +@group(0) @binding(2) var t_u : texture_cube; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/cube.wgsl.expected.wgsl b/test/types/texture/sampled/cube.wgsl.expected.wgsl index 151c68f40b..28c68819e2 100644 --- a/test/types/texture/sampled/cube.wgsl.expected.wgsl +++ b/test/types/texture/sampled/cube.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_cube; +@group(0) @binding(0) var t_f : texture_cube; -[[group(0), binding(1)]] var t_i : texture_cube; +@group(0) @binding(1) var t_i : texture_cube; -[[group(0), binding(2)]] var t_u : texture_cube; +@group(0) @binding(2) var t_u : texture_cube; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/cube_array.wgsl b/test/types/texture/sampled/cube_array.wgsl index e3bb1b1bdc..c7249c88eb 100644 --- a/test/types/texture/sampled/cube_array.wgsl +++ b/test/types/texture/sampled/cube_array.wgsl @@ -1,8 +1,8 @@ -[[group(0), binding(0)]] var t_f : texture_cube_array; -[[group(0), binding(1)]] var t_i : texture_cube_array; -[[group(0), binding(2)]] var t_u : texture_cube_array; +@group(0) @binding(0) var t_f : texture_cube_array; +@group(0) @binding(1) var t_i : texture_cube_array; +@group(0) @binding(2) var t_u : texture_cube_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/sampled/cube_array.wgsl.expected.wgsl b/test/types/texture/sampled/cube_array.wgsl.expected.wgsl index bb5c804d68..12dc114369 100644 --- a/test/types/texture/sampled/cube_array.wgsl.expected.wgsl +++ b/test/types/texture/sampled/cube_array.wgsl.expected.wgsl @@ -1,10 +1,10 @@ -[[group(0), binding(0)]] var t_f : texture_cube_array; +@group(0) @binding(0) var t_f : texture_cube_array; -[[group(0), binding(1)]] var t_i : texture_cube_array; +@group(0) @binding(1) var t_i : texture_cube_array; -[[group(0), binding(2)]] var t_u : texture_cube_array; +@group(0) @binding(2) var t_u : texture_cube_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_f; _ = t_i; diff --git a/test/types/texture/storage/1d.wgsl b/test/types/texture/storage/1d.wgsl index 939b92120c..7adad9e5eb 100644 --- a/test/types/texture/storage/1d.wgsl +++ b/test/types/texture/storage/1d.wgsl @@ -1,21 +1,21 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_1d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_1d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_1d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_1d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_1d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_1d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_1d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_1d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_1d; -[[group(0), binding(9)]] var t_r32float : texture_storage_1d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_1d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_1d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_1d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_1d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_1d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_1d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_1d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_1d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_1d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_1d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_1d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_1d; +@group(0) @binding(6) var t_rgba16float : texture_storage_1d; +@group(0) @binding(7) var t_r32uint : texture_storage_1d; +@group(0) @binding(8) var t_r32sint : texture_storage_1d; +@group(0) @binding(9) var t_r32float : texture_storage_1d; +@group(0) @binding(10) var t_rg32uint : texture_storage_1d; +@group(0) @binding(11) var t_rg32sint : texture_storage_1d; +@group(0) @binding(12) var t_rg32float : texture_storage_1d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_1d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_1d; +@group(0) @binding(15) var t_rgba32float : texture_storage_1d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/1d.wgsl.expected.wgsl b/test/types/texture/storage/1d.wgsl.expected.wgsl index 72ebb80be2..a3e5555b82 100644 --- a/test/types/texture/storage/1d.wgsl.expected.wgsl +++ b/test/types/texture/storage/1d.wgsl.expected.wgsl @@ -1,36 +1,36 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_1d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_1d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_1d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_1d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_1d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_1d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_1d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_1d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_1d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_1d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_1d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_1d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_1d; +@group(0) @binding(6) var t_rgba16float : texture_storage_1d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_1d; +@group(0) @binding(7) var t_r32uint : texture_storage_1d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_1d; +@group(0) @binding(8) var t_r32sint : texture_storage_1d; -[[group(0), binding(9)]] var t_r32float : texture_storage_1d; +@group(0) @binding(9) var t_r32float : texture_storage_1d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_1d; +@group(0) @binding(10) var t_rg32uint : texture_storage_1d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_1d; +@group(0) @binding(11) var t_rg32sint : texture_storage_1d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_1d; +@group(0) @binding(12) var t_rg32float : texture_storage_1d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_1d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_1d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_1d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_1d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_1d; +@group(0) @binding(15) var t_rgba32float : texture_storage_1d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/2d.wgsl b/test/types/texture/storage/2d.wgsl index 0ea57e9c6c..44d0dfd7eb 100644 --- a/test/types/texture/storage/2d.wgsl +++ b/test/types/texture/storage/2d.wgsl @@ -1,21 +1,21 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_2d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_2d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_2d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_2d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_2d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_2d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_2d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_2d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_2d; -[[group(0), binding(9)]] var t_r32float : texture_storage_2d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_2d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_2d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_2d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_2d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_2d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_2d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_2d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_2d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_2d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_2d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_2d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_2d; +@group(0) @binding(6) var t_rgba16float : texture_storage_2d; +@group(0) @binding(7) var t_r32uint : texture_storage_2d; +@group(0) @binding(8) var t_r32sint : texture_storage_2d; +@group(0) @binding(9) var t_r32float : texture_storage_2d; +@group(0) @binding(10) var t_rg32uint : texture_storage_2d; +@group(0) @binding(11) var t_rg32sint : texture_storage_2d; +@group(0) @binding(12) var t_rg32float : texture_storage_2d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_2d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_2d; +@group(0) @binding(15) var t_rgba32float : texture_storage_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/2d.wgsl.expected.wgsl b/test/types/texture/storage/2d.wgsl.expected.wgsl index 960e7240ab..97824adfb9 100644 --- a/test/types/texture/storage/2d.wgsl.expected.wgsl +++ b/test/types/texture/storage/2d.wgsl.expected.wgsl @@ -1,36 +1,36 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_2d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_2d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_2d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_2d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_2d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_2d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_2d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_2d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_2d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_2d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_2d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_2d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_2d; +@group(0) @binding(6) var t_rgba16float : texture_storage_2d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_2d; +@group(0) @binding(7) var t_r32uint : texture_storage_2d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_2d; +@group(0) @binding(8) var t_r32sint : texture_storage_2d; -[[group(0), binding(9)]] var t_r32float : texture_storage_2d; +@group(0) @binding(9) var t_r32float : texture_storage_2d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_2d; +@group(0) @binding(10) var t_rg32uint : texture_storage_2d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_2d; +@group(0) @binding(11) var t_rg32sint : texture_storage_2d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_2d; +@group(0) @binding(12) var t_rg32float : texture_storage_2d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_2d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_2d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_2d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_2d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_2d; +@group(0) @binding(15) var t_rgba32float : texture_storage_2d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/2d_array.wgsl b/test/types/texture/storage/2d_array.wgsl index 15a3f80d25..6919fda32d 100644 --- a/test/types/texture/storage/2d_array.wgsl +++ b/test/types/texture/storage/2d_array.wgsl @@ -1,21 +1,21 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_2d_array; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_2d_array; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_2d_array; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_2d_array; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_2d_array; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_2d_array; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_2d_array; -[[group(0), binding(7)]] var t_r32uint : texture_storage_2d_array; -[[group(0), binding(8)]] var t_r32sint : texture_storage_2d_array; -[[group(0), binding(9)]] var t_r32float : texture_storage_2d_array; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_2d_array; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_2d_array; -[[group(0), binding(12)]] var t_rg32float : texture_storage_2d_array; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_2d_array; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_2d_array; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_2d_array; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_2d_array; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_2d_array; +@group(0) @binding(2) var t_rgba8uint : texture_storage_2d_array; +@group(0) @binding(3) var t_rgba8sint : texture_storage_2d_array; +@group(0) @binding(4) var t_rgba16uint : texture_storage_2d_array; +@group(0) @binding(5) var t_rgba16sint : texture_storage_2d_array; +@group(0) @binding(6) var t_rgba16float : texture_storage_2d_array; +@group(0) @binding(7) var t_r32uint : texture_storage_2d_array; +@group(0) @binding(8) var t_r32sint : texture_storage_2d_array; +@group(0) @binding(9) var t_r32float : texture_storage_2d_array; +@group(0) @binding(10) var t_rg32uint : texture_storage_2d_array; +@group(0) @binding(11) var t_rg32sint : texture_storage_2d_array; +@group(0) @binding(12) var t_rg32float : texture_storage_2d_array; +@group(0) @binding(13) var t_rgba32uint : texture_storage_2d_array; +@group(0) @binding(14) var t_rgba32sint : texture_storage_2d_array; +@group(0) @binding(15) var t_rgba32float : texture_storage_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/2d_array.wgsl.expected.wgsl b/test/types/texture/storage/2d_array.wgsl.expected.wgsl index c541689a86..c4aa337c22 100644 --- a/test/types/texture/storage/2d_array.wgsl.expected.wgsl +++ b/test/types/texture/storage/2d_array.wgsl.expected.wgsl @@ -1,36 +1,36 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_2d_array; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_2d_array; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_2d_array; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_2d_array; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_2d_array; +@group(0) @binding(2) var t_rgba8uint : texture_storage_2d_array; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_2d_array; +@group(0) @binding(3) var t_rgba8sint : texture_storage_2d_array; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_2d_array; +@group(0) @binding(4) var t_rgba16uint : texture_storage_2d_array; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_2d_array; +@group(0) @binding(5) var t_rgba16sint : texture_storage_2d_array; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_2d_array; +@group(0) @binding(6) var t_rgba16float : texture_storage_2d_array; -[[group(0), binding(7)]] var t_r32uint : texture_storage_2d_array; +@group(0) @binding(7) var t_r32uint : texture_storage_2d_array; -[[group(0), binding(8)]] var t_r32sint : texture_storage_2d_array; +@group(0) @binding(8) var t_r32sint : texture_storage_2d_array; -[[group(0), binding(9)]] var t_r32float : texture_storage_2d_array; +@group(0) @binding(9) var t_r32float : texture_storage_2d_array; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_2d_array; +@group(0) @binding(10) var t_rg32uint : texture_storage_2d_array; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_2d_array; +@group(0) @binding(11) var t_rg32sint : texture_storage_2d_array; -[[group(0), binding(12)]] var t_rg32float : texture_storage_2d_array; +@group(0) @binding(12) var t_rg32float : texture_storage_2d_array; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_2d_array; +@group(0) @binding(13) var t_rgba32uint : texture_storage_2d_array; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_2d_array; +@group(0) @binding(14) var t_rgba32sint : texture_storage_2d_array; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_2d_array; +@group(0) @binding(15) var t_rgba32float : texture_storage_2d_array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/3d.wgsl b/test/types/texture/storage/3d.wgsl index 915be52fd7..710d0d39fc 100644 --- a/test/types/texture/storage/3d.wgsl +++ b/test/types/texture/storage/3d.wgsl @@ -1,21 +1,21 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_3d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_3d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_3d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_3d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_3d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_3d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_3d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_3d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_3d; -[[group(0), binding(9)]] var t_r32float : texture_storage_3d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_3d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_3d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_3d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_3d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_3d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_3d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_3d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_3d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_3d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_3d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_3d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_3d; +@group(0) @binding(6) var t_rgba16float : texture_storage_3d; +@group(0) @binding(7) var t_r32uint : texture_storage_3d; +@group(0) @binding(8) var t_r32sint : texture_storage_3d; +@group(0) @binding(9) var t_r32float : texture_storage_3d; +@group(0) @binding(10) var t_rg32uint : texture_storage_3d; +@group(0) @binding(11) var t_rg32sint : texture_storage_3d; +@group(0) @binding(12) var t_rg32float : texture_storage_3d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_3d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_3d; +@group(0) @binding(15) var t_rgba32float : texture_storage_3d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/types/texture/storage/3d.wgsl.expected.wgsl b/test/types/texture/storage/3d.wgsl.expected.wgsl index af8ae71429..c3ba6726ab 100644 --- a/test/types/texture/storage/3d.wgsl.expected.wgsl +++ b/test/types/texture/storage/3d.wgsl.expected.wgsl @@ -1,36 +1,36 @@ -[[group(0), binding(0)]] var t_rgba8unorm : texture_storage_3d; +@group(0) @binding(0) var t_rgba8unorm : texture_storage_3d; -[[group(0), binding(1)]] var t_rgba8snorm : texture_storage_3d; +@group(0) @binding(1) var t_rgba8snorm : texture_storage_3d; -[[group(0), binding(2)]] var t_rgba8uint : texture_storage_3d; +@group(0) @binding(2) var t_rgba8uint : texture_storage_3d; -[[group(0), binding(3)]] var t_rgba8sint : texture_storage_3d; +@group(0) @binding(3) var t_rgba8sint : texture_storage_3d; -[[group(0), binding(4)]] var t_rgba16uint : texture_storage_3d; +@group(0) @binding(4) var t_rgba16uint : texture_storage_3d; -[[group(0), binding(5)]] var t_rgba16sint : texture_storage_3d; +@group(0) @binding(5) var t_rgba16sint : texture_storage_3d; -[[group(0), binding(6)]] var t_rgba16float : texture_storage_3d; +@group(0) @binding(6) var t_rgba16float : texture_storage_3d; -[[group(0), binding(7)]] var t_r32uint : texture_storage_3d; +@group(0) @binding(7) var t_r32uint : texture_storage_3d; -[[group(0), binding(8)]] var t_r32sint : texture_storage_3d; +@group(0) @binding(8) var t_r32sint : texture_storage_3d; -[[group(0), binding(9)]] var t_r32float : texture_storage_3d; +@group(0) @binding(9) var t_r32float : texture_storage_3d; -[[group(0), binding(10)]] var t_rg32uint : texture_storage_3d; +@group(0) @binding(10) var t_rg32uint : texture_storage_3d; -[[group(0), binding(11)]] var t_rg32sint : texture_storage_3d; +@group(0) @binding(11) var t_rg32sint : texture_storage_3d; -[[group(0), binding(12)]] var t_rg32float : texture_storage_3d; +@group(0) @binding(12) var t_rg32float : texture_storage_3d; -[[group(0), binding(13)]] var t_rgba32uint : texture_storage_3d; +@group(0) @binding(13) var t_rgba32uint : texture_storage_3d; -[[group(0), binding(14)]] var t_rgba32sint : texture_storage_3d; +@group(0) @binding(14) var t_rgba32sint : texture_storage_3d; -[[group(0), binding(15)]] var t_rgba32float : texture_storage_3d; +@group(0) @binding(15) var t_rgba32float : texture_storage_3d; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = t_rgba8unorm; _ = t_rgba8snorm; diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.hlsl index ad191b88ff..545d602f40 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.msl index ad191b88ff..545d602f40 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.spvasm index ad191b88ff..9e7e68419c 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - } - var_1 = 5u; - return; -} +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 5u ; +return ; -error: loop does not exit + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.wgsl index ad191b88ff..545d602f40 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Back_SingleBlock_Back.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.hlsl index 791ac1ab92..ed3372cfa3 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.hlsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.msl index 791ac1ab92..ed3372cfa3 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.msl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.spvasm index 791ac1ab92..b9ead812c8 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.spvasm @@ -1,30 +1,30 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (true) { - var_1 = 3u; - continue; - } - var_1 = 4u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if true +var_1 = 3u ; +continue ; - continuing { - var_1 = 5u; - } - } - var_1 = 6u; - return; -} +var_1 = 4u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 5u ; -error: loop does not exit + +var_1 = 6u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.wgsl index 791ac1ab92..ed3372cfa3 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional.spvasm.expected.wgsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.hlsl index 776810f501..167379a10e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.hlsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.msl index 776810f501..167379a10e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.msl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.spvasm index 776810f501..6c6758e232 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.spvasm @@ -1,26 +1,26 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (true) { - var_1 = 3u; - continue; - } - var_1 = 4u; - } - var_1 = 6u; - return; -} +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if true +var_1 = 3u ; +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 4u ; -error: loop does not exit +var_1 = 6u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.wgsl index 776810f501..167379a10e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Conditional_EmptyContinuing.spvasm.expected.wgsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.hlsl index 99d5de38ab..586a7dbf95 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.hlsl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.msl index 99d5de38ab..586a7dbf95 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.msl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.spvasm index 99d5de38ab..b06f4ca07b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.spvasm @@ -1,25 +1,25 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +continuing +var_1 = 4u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.wgsl index 99d5de38ab..586a7dbf95 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_AfterHeader_Unconditional.spvasm.expected.wgsl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.hlsl index d64a6b8113..e76fca4ede 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.hlsl @@ -16,7 +16,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.msl index d64a6b8113..e76fca4ede 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.msl @@ -16,7 +16,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.spvasm index d64a6b8113..038fea879c 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.spvasm @@ -1,24 +1,24 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +continuing +var_1 = 4u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.wgsl index d64a6b8113..e76fca4ede 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Continue_FromHeader.spvasm.expected.wgsl @@ -16,7 +16,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.hlsl index d678069381..cc547df98b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.hlsl @@ -32,7 +32,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.msl index d678069381..cc547df98b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.msl @@ -32,7 +32,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.spvasm index d678069381..341c9057e1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.spvasm @@ -1,40 +1,40 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - switch(42u) { - case 40u: { - var_1 = 40u; - if (false) { - continue; - } - fallthrough; - } - case 50u: { - var_1 = 50u; - } - default: { - } - } - var_1 = 3u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +switch 42u +case 40u +var_1 = 40u ; +if false +continue ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +fallthrough ; -[[stage(fragment)]] -fn main() { - main_1(); -} +case 50u +var_1 = 50u ; -error: loop does not exit +default + + +var_1 = 3u ; + +continuing +var_1 = 4u ; + + +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.wgsl index d678069381..cc547df98b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnFalse.spvasm.expected.wgsl @@ -32,7 +32,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.hlsl index 6ee030600b..181cd62144 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.hlsl @@ -33,7 +33,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.msl index 6ee030600b..181cd62144 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.msl @@ -33,7 +33,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.spvasm index 6ee030600b..a58bc559cb 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.spvasm @@ -1,41 +1,41 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - switch(42u) { - case 40u: { - var_1 = 40u; - if (false) { - } else { - continue; - } - fallthrough; - } - case 50u: { - var_1 = 50u; - } - default: { - } - } - var_1 = 3u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +switch 42u +case 40u +var_1 = 40u ; +if false +else +continue ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +fallthrough ; -[[stage(fragment)]] -fn main() { - main_1(); -} +case 50u +var_1 = 50u ; -error: loop does not exit +default + + +var_1 = 3u ; + +continuing +var_1 = 4u ; + + +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.wgsl index 6ee030600b..181cd62144 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Fallthrough_OnTrue.spvasm.expected.wgsl @@ -33,7 +33,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.hlsl index f1f3c5dd71..bd16703885 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.hlsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.msl index f1f3c5dd71..bd16703885 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.msl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.spvasm index f1f3c5dd71..95953ca5ab 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.spvasm @@ -1,29 +1,29 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (false) { - continue; - } - var_1 = 3u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if false +continue ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +var_1 = 3u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 4u ; -error: loop does not exit + +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.wgsl index f1f3c5dd71..bd16703885 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnFalse.spvasm.expected.wgsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.hlsl index d3f4646035..a789380931 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.hlsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.msl index d3f4646035..a789380931 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.msl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.spvasm index d3f4646035..faa5d1cb1a 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.spvasm @@ -1,30 +1,30 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (false) { - } else { - continue; - } - var_1 = 3u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if false +else +continue ; - continuing { - var_1 = 4u; - } - } - var_1 = 5u; - return; -} +var_1 = 3u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 4u ; -error: loop does not exit + +var_1 = 5u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.wgsl index d3f4646035..a789380931 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_Forward_OnTrue.spvasm.expected.wgsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.hlsl index 7f23c275c8..ec644729a0 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.hlsl @@ -24,7 +24,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.msl index 7f23c275c8..ec644729a0 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.msl @@ -24,7 +24,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.spvasm index 7f23c275c8..b5d3c49374 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.spvasm @@ -1,32 +1,32 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (true) { - var_1 = 3u; - if (false) { - continue; - } - } - var_1 = 4u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if true +var_1 = 3u ; +if false +continue ; - continuing { - var_1 = 5u; - } - } - var_1 = 6u; - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 4u ; -error: loop does not exit +continuing +var_1 = 5u ; + + +var_1 = 6u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.wgsl index 7f23c275c8..ec644729a0 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnFalse.spvasm.expected.wgsl @@ -24,7 +24,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.hlsl index b80786e3cb..457c6ec864 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.hlsl @@ -25,7 +25,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.msl index b80786e3cb..457c6ec864 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.msl @@ -25,7 +25,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.spvasm index b80786e3cb..de9fe3c95c 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.spvasm @@ -1,33 +1,33 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; - if (true) { - var_1 = 3u; - if (false) { - } else { - continue; - } - } - var_1 = 4u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; +if true +var_1 = 3u ; +if false +else +continue ; - continuing { - var_1 = 5u; - } - } - var_1 = 6u; - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 4u ; -error: loop does not exit +continuing +var_1 = 5u ; + + +var_1 = 6u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.wgsl index b80786e3cb..457c6ec864 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_Continue_IfBreak_OnTrue.spvasm.expected.wgsl @@ -25,7 +25,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.hlsl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.hlsl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.msl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.msl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.spvasm index 7b5bc4feac..992c540d3f 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.spvasm @@ -1,34 +1,34 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 1u; - loop { - var_1 = 2u; - var_1 = 3u; - switch(42u) { - case 40u: { - var_1 = 4u; - continue; - } - default: { - } - } - var_1 = 5u; +fn main_1 +var_1 = 1u ; +loop +var_1 = 2u ; +var_1 = 3u ; +switch 42u +case 40u +var_1 = 4u ; +continue ; - continuing { - var_1 = 6u; - } - } - var_1 = 7u; - return; -} +default -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 5u ; + +continuing +var_1 = 6u ; + + +var_1 = 7u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.wgsl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_LoopContinue_FromSwitch.spvasm.expected.wgsl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.hlsl index 90f16be803..9a46eebd7e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.hlsl @@ -29,7 +29,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.msl index 90f16be803..9a46eebd7e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.msl @@ -29,7 +29,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.spvasm index 90f16be803..e31a3d511f 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.spvasm @@ -1,37 +1,37 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 1u; - loop { - var_1 = 2u; - var_1 = 3u; - switch(42u) { - case 40u: { - var_1 = 40u; - if (false) { - } else { - continue; - } - } - default: { - } - } - var_1 = 6u; +fn main_1 +var_1 = 1u ; +loop +var_1 = 2u ; +var_1 = 3u ; +switch 42u +case 40u +var_1 = 40u ; +if false +else +continue ; - continuing { - var_1 = 7u; - } - } - var_1 = 8u; - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +default -error: loop does not exit + +var_1 = 6u ; + +continuing +var_1 = 7u ; + + +var_1 = 8u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.wgsl index 90f16be803..9a46eebd7e 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnFalse.spvasm.expected.wgsl @@ -29,7 +29,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.hlsl index 79d355bb2d..083e42667b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.hlsl @@ -28,7 +28,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.msl index 79d355bb2d..083e42667b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.msl @@ -28,7 +28,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.spvasm index 79d355bb2d..01ea61efb2 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.spvasm @@ -1,36 +1,36 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 1u; - loop { - var_1 = 2u; - var_1 = 3u; - switch(42u) { - case 40u: { - var_1 = 40u; - if (false) { - continue; - } - } - default: { - } - } - var_1 = 6u; +fn main_1 +var_1 = 1u ; +loop +var_1 = 2u ; +var_1 = 3u ; +switch 42u +case 40u +var_1 = 40u ; +if false +continue ; - continuing { - var_1 = 7u; - } - } - var_1 = 8u; - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +default -error: loop does not exit + +var_1 = 6u ; + +continuing +var_1 = 7u ; + + +var_1 = 8u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.wgsl index 79d355bb2d..083e42667b 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_BranchConditional_SwitchBreak_Continue_OnTrue.spvasm.expected.wgsl @@ -28,7 +28,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.hlsl index 54db413624..2efe2a8455 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.hlsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.msl index 54db413624..2efe2a8455 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.msl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.spvasm index 54db413624..e4c47d60f6 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.spvasm @@ -1,21 +1,21 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { +fn main_1 +loop - continuing { - var_1 = 1u; - } - } - return; -} +continuing +var_1 = 1u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.wgsl index 54db413624..2efe2a8455 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_MultiBlockLoop.spvasm.expected.wgsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.hlsl index 8c9f743462..12d2d6fd76 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.hlsl @@ -10,7 +10,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.msl index 8c9f743462..12d2d6fd76 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.msl @@ -10,7 +10,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.spvasm index 8c9f743462..9348637562 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.spvasm @@ -1,18 +1,18 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - var_1 = 1u; - } - return; -} +fn main_1 +loop +var_1 = 1u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +return ; -error: loop does not exit + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.wgsl index 8c9f743462..12d2d6fd76 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_BackEdge_SingleBlockLoop.spvasm.expected.wgsl @@ -10,7 +10,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.hlsl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.hlsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.msl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.msl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.spvasm index 084d93f16d..23786d88ff 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.spvasm @@ -1,26 +1,26 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - var_1 = 1u; - continue; - } - var_1 = 2u; +fn main_1 +loop +if false +var_1 = 1u ; +continue ; - continuing { - var_1 = 3u; - } - } - return; -} +var_1 = 2u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 3u ; -error: loop does not exit + +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.wgsl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_BeforeLast.spvasm.expected.wgsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.hlsl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.hlsl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.msl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.msl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.spvasm index 7b5bc4feac..992c540d3f 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.spvasm @@ -1,34 +1,34 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 1u; - loop { - var_1 = 2u; - var_1 = 3u; - switch(42u) { - case 40u: { - var_1 = 4u; - continue; - } - default: { - } - } - var_1 = 5u; +fn main_1 +var_1 = 1u ; +loop +var_1 = 2u ; +var_1 = 3u ; +switch 42u +case 40u +var_1 = 4u ; +continue ; - continuing { - var_1 = 6u; - } - } - var_1 = 7u; - return; -} +default -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 5u ; + +continuing +var_1 = 6u ; + + +var_1 = 7u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.wgsl index 7b5bc4feac..82610e24db 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_FromSwitch.spvasm.expected.wgsl @@ -26,7 +26,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.hlsl index d43665e29f..eb514eeb41 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.hlsl @@ -14,7 +14,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.msl index d43665e29f..eb514eeb41 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.msl @@ -14,7 +14,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.spvasm index d43665e29f..211cb2c0e7 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.spvasm @@ -1,22 +1,22 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - var_1 = 1u; +fn main_1 +loop +var_1 = 1u ; - continuing { - var_1 = 2u; - } - } - return; -} +continuing +var_1 = 2u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.wgsl index d43665e29f..eb514eeb41 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Branch_LoopContinue_LastInLoopConstruct.spvasm.expected.wgsl @@ -14,7 +14,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.hlsl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.hlsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.msl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.msl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.spvasm index b7ad7d3d5e..42119a0f0c 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.spvasm @@ -1,21 +1,21 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - } else { - continue; - } - } - return; -} +fn main_1 +loop +if false +else +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.wgsl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_FalseBranch_LoopContinue.spvasm.expected.wgsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.hlsl index c9b1ed7a14..3122cf9e02 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.hlsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.msl index c9b1ed7a14..3122cf9e02 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.msl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.spvasm index c9b1ed7a14..bf12209a1f 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.spvasm @@ -1,30 +1,30 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 10u; - loop { - var_1 = 20u; - if (false) { - var_1 = 30u; - continue; - } else { - var_1 = 40u; - } +fn main_1 +var_1 = 10u ; +loop +var_1 = 20u ; +if false +var_1 = 30u ; +continue ; +else +var_1 = 40u ; - continuing { - var_1 = 90u; - } - } - var_1 = 99u; - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 90u ; -error: loop does not exit + +var_1 = 99u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.wgsl index c9b1ed7a14..3122cf9e02 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_LoopInternallyDiverge_Simple.spvasm.expected.wgsl @@ -22,7 +22,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.hlsl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.hlsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.msl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.msl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.spvasm index 084d93f16d..23786d88ff 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.spvasm @@ -1,26 +1,26 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - var_1 = 1u; - continue; - } - var_1 = 2u; +fn main_1 +loop +if false +var_1 = 1u ; +continue ; - continuing { - var_1 = 3u; - } - } - return; -} +var_1 = 2u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +var_1 = 3u ; -error: loop does not exit + +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.wgsl index 084d93f16d..5709df3209 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_NestedIfContinue.spvasm.expected.wgsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.hlsl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.msl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.spvasm index 0fcda02afc..f712098306 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - } - var_1 = 999u; - return; -} +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 999u ; +return ; -error: loop does not exit + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.wgsl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_BothBackedge.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.hlsl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.msl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.spvasm index 0fcda02afc..f712098306 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - } - var_1 = 999u; - return; -} +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 999u ; +return ; -error: loop does not exit + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.wgsl index 0fcda02afc..bac39a4697 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_SingleBlock_UnconditionalBackege.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.hlsl index ae965100af..74c752dc01 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.hlsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.msl index ae965100af..74c752dc01 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.msl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.spvasm index ae965100af..bd2e4a6cc5 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.spvasm @@ -1,29 +1,29 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; - continuing { - var_1 = 3u; - if (true) { - var_1 = 4u; - } - var_1 = 5u; - } - } - var_1 = 999u; - return; -} +continuing +var_1 = 3u ; +if true +var_1 = 4u ; -[[stage(fragment)]] -fn main() { - main_1(); -} +var_1 = 5u ; -error: loop does not exit + +var_1 = 999u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.wgsl index ae965100af..74c752dc01 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_ContinueNestIf.spvasm.expected.wgsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.hlsl index 9e699524a9..13fc2c7429 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.hlsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.msl index 9e699524a9..13fc2c7429 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.msl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.spvasm index 9e699524a9..2688c57ad2 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.spvasm @@ -1,26 +1,26 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; - continuing { - var_1 = 3u; - var_1 = 4u; - } - } - var_1 = 999u; - return; -} +continuing +var_1 = 3u ; +var_1 = 4u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 999u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.wgsl index 9e699524a9..13fc2c7429 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_MultiBlockContinue.spvasm.expected.wgsl @@ -18,7 +18,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.hlsl index e32d9bd386..cb60399479 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.hlsl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.msl index e32d9bd386..cb60399479 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.msl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.spvasm index e32d9bd386..7ba8ccb7d5 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.spvasm @@ -1,25 +1,25 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - var_1 = 0u; - loop { - var_1 = 1u; - var_1 = 2u; +fn main_1 +var_1 = 0u ; +loop +var_1 = 1u ; +var_1 = 2u ; - continuing { - var_1 = 3u; - } - } - var_1 = 999u; - return; -} +continuing +var_1 = 3u ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +var_1 = 999u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.wgsl index e32d9bd386..cb60399479 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_Loop_Unconditional_Body_SingleBlockContinue.spvasm.expected.wgsl @@ -17,7 +17,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.hlsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.msl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.spvasm index 32e75fb4b7..03faabea08 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - continue; - } - } - return; -} +fn main_1 +loop +if false +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.wgsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_EmitBody_TrueBranch_LoopContinue.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.hlsl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.hlsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.msl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.msl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.spvasm index b7ad7d3d5e..42119a0f0c 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.spvasm @@ -1,21 +1,21 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - } else { - continue; - } - } - return; -} +fn main_1 +loop +if false +else +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.wgsl index b7ad7d3d5e..d538de18a1 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_FalseBranch_LoopContinue_Ok.spvasm.expected.wgsl @@ -13,7 +13,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.hlsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.msl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.spvasm index 32e75fb4b7..03faabea08 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - continue; - } - } - return; -} +fn main_1 +loop +if false +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.wgsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_FindIfSelectionInternalHeaders_TrueBranch_LoopContinue_Ok.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.hlsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.hlsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.msl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.msl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.spvasm index 32e75fb4b7..03faabea08 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.spvasm @@ -1,20 +1,20 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - if (false) { - continue; - } - } - return; -} +fn main_1 +loop +if false +continue ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.wgsl index 32e75fb4b7..9de1e7e042 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_LabelControlFlowConstructs_LoopInterallyDiverge.spvasm.expected.wgsl @@ -12,7 +12,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.hlsl index 2d78e5b54f..461b205de7 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.hlsl @@ -9,7 +9,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.msl index 2d78e5b54f..461b205de7 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.msl @@ -9,7 +9,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.spvasm index 2d78e5b54f..6247458554 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.spvasm @@ -1,17 +1,17 @@ -SKIP: FAILED +SKIP FAILED -var var_1 : u32; +var private var_1 u32 ; -fn main_1() { - loop { - } - return; -} +fn main_1 +loop -[[stage(fragment)]] -fn main() { - main_1(); -} +return ; -error: loop does not exit + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.wgsl index 2d78e5b54f..461b205de7 100644 --- a/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserCFGTest_RegisterMerges_GoodLoopMerge_MultiBlockLoop_ContinueIsHeader.spvasm.expected.wgsl @@ -9,7 +9,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.hlsl index 016ae849db..f7f27eb73a 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.hlsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.msl index 016ae849db..f7f27eb73a 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.msl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.spvasm index 016ae849db..8d88c46c2b 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.spvasm @@ -1,29 +1,29 @@ -SKIP: FAILED +SKIP FAILED -struct S { - field0 : u32; - field1 : f32; - field2 : array; -}; +struct S +field0 u32 ; +field1 f32 ; +field2 array u32 2u ; +; -fn main_1() { - var x_25 : u32; - let x_2 : u32 = (1u + 1u); - x_25 = 1u; - loop { +fn main_1 +var x_25 u32 ; +let x_2 u32 = 1u + 1u ; +x_25 = 1u ; +loop - continuing { - x_25 = x_2; - } - } - x_25 = 2u; - return; -} +continuing +x_25 = x_2 ; -[[stage(fragment)]] -fn main() { - main_1(); -} -error: loop does not exit +x_25 = 2u ; +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.wgsl index 016ae849db..f7f27eb73a 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_CombinatorialValue_Immediate_UsedOnceDifferentConstruct.spvasm.expected.wgsl @@ -21,7 +21,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.hlsl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.hlsl index f9ae993835..099f55e45c 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.hlsl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.hlsl @@ -38,7 +38,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.msl index f9ae993835..099f55e45c 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.msl @@ -38,7 +38,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.spvasm b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.spvasm index f9ae993835..5bc3cebeef 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.spvasm +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.spvasm @@ -1,46 +1,46 @@ -SKIP: FAILED +SKIP FAILED -struct S { - field0 : u32; - field1 : f32; - field2 : array; -}; +struct S +field0 u32 ; +field1 f32 ; +field2 array u32 2u ; +; -var x_1 : u32; +var private x_1 u32 ; -var x_17 : bool; +var private x_17 bool ; -fn main_1() { - let x_101 : bool = x_17; - loop { - var x_2_phi : u32; - var x_5_phi : u32; - x_2_phi = 0u; - x_5_phi = 1u; - loop { - var x_7 : u32; - let x_2 : u32 = x_2_phi; - let x_5 : u32 = x_5_phi; - let x_4 : u32 = (x_2 + 1u); - let x_6 : u32 = (x_4 + 1u); - if (x_101) { - break; - } +fn main_1 +let x_101 bool = x_17 ; +loop +var x_2_phi u32 ; +var x_5_phi u32 ; +x_2_phi = 0u ; +x_5_phi = 1u ; +loop +var x_7 u32 ; +let x_2 u32 = x_2_phi ; +let x_5 u32 = x_5_phi ; +let x_4 u32 = x_2 + 1u ; +let x_6 u32 = x_4 + 1u ; +if x_101 +break ; - continuing { - x_7 = (x_4 + x_6); - x_2_phi = x_4; - x_5_phi = x_7; - } - } - } - return; -} -[[stage(fragment)]] -fn main() { - main_1(); -} +continuing +x_7 = x_4 + x_6 ; +x_2_phi = x_4 ; +x_5_phi = x_7 ; -error: loop does not exit + + +return ; + + +stage fragment +fn main +main_1 ; + + +error loop does not exit diff --git a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.wgsl b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.wgsl index f9ae993835..099f55e45c 100644 --- a/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.wgsl +++ b/test/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Phi_ValueFromLoopBodyAndContinuing.spvasm.expected.wgsl @@ -38,7 +38,7 @@ fn main_1() { return; } -[[stage(fragment)]] +@stage(fragment) fn main() { main_1(); } diff --git a/test/var/inferred/function.wgsl b/test/var/inferred/function.wgsl index 0d39fe044f..c1bea4ca47 100644 --- a/test/var/inferred/function.wgsl +++ b/test/var/inferred/function.wgsl @@ -33,7 +33,7 @@ fn var_decls() { var v15 = ret_MyArray(); } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0,0.0,0.0,0.0); } diff --git a/test/var/inferred/function.wgsl.expected.wgsl b/test/var/inferred/function.wgsl.expected.wgsl index 2c8b7ab666..bd60a83ae8 100644 --- a/test/var/inferred/function.wgsl.expected.wgsl +++ b/test/var/inferred/function.wgsl.expected.wgsl @@ -42,7 +42,7 @@ fn var_decls() { var v15 = ret_MyArray(); } -[[stage(fragment)]] -fn main() -> [[location(0)]] vec4 { +@stage(fragment) +fn main() -> @location(0) vec4 { return vec4(0.0, 0.0, 0.0, 0.0); } diff --git a/test/var/initialization/function/array.wgsl b/test/var/initialization/function/array.wgsl index 269c9ed28e..c261a3a598 100644 --- a/test/var/initialization/function/array.wgsl +++ b/test/var/initialization/function/array.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : array; _ = v; diff --git a/test/var/initialization/function/array.wgsl.expected.wgsl b/test/var/initialization/function/array.wgsl.expected.wgsl index 0dd6ece37f..8ff70f285c 100644 --- a/test/var/initialization/function/array.wgsl.expected.wgsl +++ b/test/var/initialization/function/array.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : array; _ = v; diff --git a/test/var/initialization/function/matrix.wgsl b/test/var/initialization/function/matrix.wgsl index 7f3830dbee..ea336e833b 100644 --- a/test/var/initialization/function/matrix.wgsl +++ b/test/var/initialization/function/matrix.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : mat2x3; _ = v; diff --git a/test/var/initialization/function/matrix.wgsl.expected.wgsl b/test/var/initialization/function/matrix.wgsl.expected.wgsl index f4fadc64b1..d8bb3919c9 100644 --- a/test/var/initialization/function/matrix.wgsl.expected.wgsl +++ b/test/var/initialization/function/matrix.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : mat2x3; _ = v; diff --git a/test/var/initialization/function/scalar.wgsl b/test/var/initialization/function/scalar.wgsl index d9458430db..5d3b86ef51 100644 --- a/test/var/initialization/function/scalar.wgsl +++ b/test/var/initialization/function/scalar.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : i32; _ = v; diff --git a/test/var/initialization/function/scalar.wgsl.expected.wgsl b/test/var/initialization/function/scalar.wgsl.expected.wgsl index 778a994f02..67ee18d612 100644 --- a/test/var/initialization/function/scalar.wgsl.expected.wgsl +++ b/test/var/initialization/function/scalar.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : i32; _ = v; diff --git a/test/var/initialization/function/struct.wgsl b/test/var/initialization/function/struct.wgsl index 5f80b50d61..55babed81d 100644 --- a/test/var/initialization/function/struct.wgsl +++ b/test/var/initialization/function/struct.wgsl @@ -3,7 +3,7 @@ struct S { b : f32; }; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : S; _ = v; diff --git a/test/var/initialization/function/struct.wgsl.expected.wgsl b/test/var/initialization/function/struct.wgsl.expected.wgsl index 538187cc19..2dd4381f7e 100644 --- a/test/var/initialization/function/struct.wgsl.expected.wgsl +++ b/test/var/initialization/function/struct.wgsl.expected.wgsl @@ -3,7 +3,7 @@ struct S { b : f32; } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : S; _ = v; diff --git a/test/var/initialization/function/vector.wgsl b/test/var/initialization/function/vector.wgsl index 95516f69f1..40bc481cd8 100644 --- a/test/var/initialization/function/vector.wgsl +++ b/test/var/initialization/function/vector.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : vec3; _ = v; diff --git a/test/var/initialization/function/vector.wgsl.expected.wgsl b/test/var/initialization/function/vector.wgsl.expected.wgsl index 796b9e3d85..37600e5b0d 100644 --- a/test/var/initialization/function/vector.wgsl.expected.wgsl +++ b/test/var/initialization/function/vector.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { var v : vec3; _ = v; diff --git a/test/var/initialization/private/array.wgsl b/test/var/initialization/private/array.wgsl index 8f7374a5b6..f01730acb2 100644 --- a/test/var/initialization/private/array.wgsl +++ b/test/var/initialization/private/array.wgsl @@ -1,6 +1,6 @@ var v : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/array.wgsl.expected.wgsl b/test/var/initialization/private/array.wgsl.expected.wgsl index 6f7612745a..ba967ec751 100644 --- a/test/var/initialization/private/array.wgsl.expected.wgsl +++ b/test/var/initialization/private/array.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/matrix.wgsl b/test/var/initialization/private/matrix.wgsl index 2530cc6fd8..e46734c845 100644 --- a/test/var/initialization/private/matrix.wgsl +++ b/test/var/initialization/private/matrix.wgsl @@ -1,6 +1,6 @@ var v : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/matrix.wgsl.expected.wgsl b/test/var/initialization/private/matrix.wgsl.expected.wgsl index 73501a1df8..c3042ab821 100644 --- a/test/var/initialization/private/matrix.wgsl.expected.wgsl +++ b/test/var/initialization/private/matrix.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/scalar.wgsl b/test/var/initialization/private/scalar.wgsl index 7c298cf396..8e46653bb3 100644 --- a/test/var/initialization/private/scalar.wgsl +++ b/test/var/initialization/private/scalar.wgsl @@ -1,6 +1,6 @@ var v : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/scalar.wgsl.expected.wgsl b/test/var/initialization/private/scalar.wgsl.expected.wgsl index c412580938..911081b60c 100644 --- a/test/var/initialization/private/scalar.wgsl.expected.wgsl +++ b/test/var/initialization/private/scalar.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/struct.wgsl b/test/var/initialization/private/struct.wgsl index d1b70f2a9f..db44563d3c 100644 --- a/test/var/initialization/private/struct.wgsl +++ b/test/var/initialization/private/struct.wgsl @@ -5,7 +5,7 @@ struct S { var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/struct.wgsl.expected.wgsl b/test/var/initialization/private/struct.wgsl.expected.wgsl index a91da6a3bb..6d46d0d4ce 100644 --- a/test/var/initialization/private/struct.wgsl.expected.wgsl +++ b/test/var/initialization/private/struct.wgsl.expected.wgsl @@ -5,7 +5,7 @@ struct S { var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/vector.wgsl b/test/var/initialization/private/vector.wgsl index 621a3ff52f..2af1bf50cd 100644 --- a/test/var/initialization/private/vector.wgsl +++ b/test/var/initialization/private/vector.wgsl @@ -1,6 +1,6 @@ var v : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/private/vector.wgsl.expected.wgsl b/test/var/initialization/private/vector.wgsl.expected.wgsl index 7ed65cde31..183418e0f9 100644 --- a/test/var/initialization/private/vector.wgsl.expected.wgsl +++ b/test/var/initialization/private/vector.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/array.wgsl b/test/var/initialization/workgroup/array.wgsl index 1a91ef53f5..1d9aa8b84c 100644 --- a/test/var/initialization/workgroup/array.wgsl +++ b/test/var/initialization/workgroup/array.wgsl @@ -1,6 +1,6 @@ var v : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/array.wgsl.expected.wgsl b/test/var/initialization/workgroup/array.wgsl.expected.wgsl index e9ea7eb4fc..cc53b73850 100644 --- a/test/var/initialization/workgroup/array.wgsl.expected.wgsl +++ b/test/var/initialization/workgroup/array.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : array; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/matrix.wgsl b/test/var/initialization/workgroup/matrix.wgsl index 2410685959..f494319b2d 100644 --- a/test/var/initialization/workgroup/matrix.wgsl +++ b/test/var/initialization/workgroup/matrix.wgsl @@ -1,6 +1,6 @@ var v : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/matrix.wgsl.expected.wgsl b/test/var/initialization/workgroup/matrix.wgsl.expected.wgsl index df1a415293..62ce905895 100644 --- a/test/var/initialization/workgroup/matrix.wgsl.expected.wgsl +++ b/test/var/initialization/workgroup/matrix.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : mat2x3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/scalar.wgsl b/test/var/initialization/workgroup/scalar.wgsl index b9fcda7dd2..37c8a4faf3 100644 --- a/test/var/initialization/workgroup/scalar.wgsl +++ b/test/var/initialization/workgroup/scalar.wgsl @@ -1,6 +1,6 @@ var v : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/scalar.wgsl.expected.wgsl b/test/var/initialization/workgroup/scalar.wgsl.expected.wgsl index 4a2272a84d..3cfef70870 100644 --- a/test/var/initialization/workgroup/scalar.wgsl.expected.wgsl +++ b/test/var/initialization/workgroup/scalar.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/struct.wgsl b/test/var/initialization/workgroup/struct.wgsl index 4651335628..5fa28ed1fb 100644 --- a/test/var/initialization/workgroup/struct.wgsl +++ b/test/var/initialization/workgroup/struct.wgsl @@ -5,7 +5,7 @@ struct S { var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/struct.wgsl.expected.wgsl b/test/var/initialization/workgroup/struct.wgsl.expected.wgsl index b67e95aacf..c42ae1cc75 100644 --- a/test/var/initialization/workgroup/struct.wgsl.expected.wgsl +++ b/test/var/initialization/workgroup/struct.wgsl.expected.wgsl @@ -5,7 +5,7 @@ struct S { var v : S; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/vector.wgsl b/test/var/initialization/workgroup/vector.wgsl index c1ff6bb059..37ff6f2177 100644 --- a/test/var/initialization/workgroup/vector.wgsl +++ b/test/var/initialization/workgroup/vector.wgsl @@ -1,6 +1,6 @@ var v : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/initialization/workgroup/vector.wgsl.expected.wgsl b/test/var/initialization/workgroup/vector.wgsl.expected.wgsl index a3aead5960..a6f967cbe7 100644 --- a/test/var/initialization/workgroup/vector.wgsl.expected.wgsl +++ b/test/var/initialization/workgroup/vector.wgsl.expected.wgsl @@ -1,6 +1,6 @@ var v : vec3; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = v; } diff --git a/test/var/override/named/no_init/bool.wgsl b/test/var/override/named/no_init/bool.wgsl index 4b58e68d40..fe69ac3f42 100644 --- a/test/var/override/named/no_init/bool.wgsl +++ b/test/var/override/named/no_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool; +@override let o : bool; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/bool.wgsl.expected.wgsl b/test/var/override/named/no_init/bool.wgsl.expected.wgsl index 8fcab9b24e..c4b5efd192 100644 --- a/test/var/override/named/no_init/bool.wgsl.expected.wgsl +++ b/test/var/override/named/no_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool; +@override let o : bool; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/f32.wgsl b/test/var/override/named/no_init/f32.wgsl index c09196d385..5328e9dcce 100644 --- a/test/var/override/named/no_init/f32.wgsl +++ b/test/var/override/named/no_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32; +@override let o : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/f32.wgsl.expected.wgsl b/test/var/override/named/no_init/f32.wgsl.expected.wgsl index 5e60be6a91..1d0945293f 100644 --- a/test/var/override/named/no_init/f32.wgsl.expected.wgsl +++ b/test/var/override/named/no_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32; +@override let o : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/i32.wgsl b/test/var/override/named/no_init/i32.wgsl index 790c56de03..0a3ed57909 100644 --- a/test/var/override/named/no_init/i32.wgsl +++ b/test/var/override/named/no_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32; +@override let o : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/i32.wgsl.expected.wgsl b/test/var/override/named/no_init/i32.wgsl.expected.wgsl index 56a81dd6d3..92a7426f43 100644 --- a/test/var/override/named/no_init/i32.wgsl.expected.wgsl +++ b/test/var/override/named/no_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32; +@override let o : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/u32.wgsl b/test/var/override/named/no_init/u32.wgsl index b4826d8c4c..bce0c7769c 100644 --- a/test/var/override/named/no_init/u32.wgsl +++ b/test/var/override/named/no_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32; +@override let o : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/no_init/u32.wgsl.expected.wgsl b/test/var/override/named/no_init/u32.wgsl.expected.wgsl index ad44144470..31db0667b8 100644 --- a/test/var/override/named/no_init/u32.wgsl.expected.wgsl +++ b/test/var/override/named/no_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32; +@override let o : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/bool.wgsl b/test/var/override/named/val_init/bool.wgsl index 0cb9566c06..9edeffaca1 100644 --- a/test/var/override/named/val_init/bool.wgsl +++ b/test/var/override/named/val_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool = true; +@override let o : bool = true; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/bool.wgsl.expected.wgsl b/test/var/override/named/val_init/bool.wgsl.expected.wgsl index 8e9edf50fe..cbcd033c0b 100644 --- a/test/var/override/named/val_init/bool.wgsl.expected.wgsl +++ b/test/var/override/named/val_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool = true; +@override let o : bool = true; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/f32.wgsl b/test/var/override/named/val_init/f32.wgsl index 904a8ad219..a58f753f65 100644 --- a/test/var/override/named/val_init/f32.wgsl +++ b/test/var/override/named/val_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32 = 1.0; +@override let o : f32 = 1.0; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/f32.wgsl.expected.wgsl b/test/var/override/named/val_init/f32.wgsl.expected.wgsl index 32660b8598..18e6ceb1ce 100644 --- a/test/var/override/named/val_init/f32.wgsl.expected.wgsl +++ b/test/var/override/named/val_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32 = 1.0; +@override let o : f32 = 1.0; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/i32.wgsl b/test/var/override/named/val_init/i32.wgsl index c94ee67c20..642096dcdb 100644 --- a/test/var/override/named/val_init/i32.wgsl +++ b/test/var/override/named/val_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32 = 1; +@override let o : i32 = 1; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/i32.wgsl.expected.wgsl b/test/var/override/named/val_init/i32.wgsl.expected.wgsl index b897fd53cf..46adcb78ac 100644 --- a/test/var/override/named/val_init/i32.wgsl.expected.wgsl +++ b/test/var/override/named/val_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32 = 1; +@override let o : i32 = 1; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/u32.wgsl b/test/var/override/named/val_init/u32.wgsl index 8c8df63c51..582f7abceb 100644 --- a/test/var/override/named/val_init/u32.wgsl +++ b/test/var/override/named/val_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32 = 1u; +@override let o : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/val_init/u32.wgsl.expected.wgsl b/test/var/override/named/val_init/u32.wgsl.expected.wgsl index 3a62e22352..06b1aa0237 100644 --- a/test/var/override/named/val_init/u32.wgsl.expected.wgsl +++ b/test/var/override/named/val_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32 = 1u; +@override let o : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/bool.wgsl b/test/var/override/named/zero_init/bool.wgsl index 1e03a45923..8869f16b58 100644 --- a/test/var/override/named/zero_init/bool.wgsl +++ b/test/var/override/named/zero_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool = bool(); +@override let o : bool = bool(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/bool.wgsl.expected.wgsl b/test/var/override/named/zero_init/bool.wgsl.expected.wgsl index 511bd67843..f68661234d 100644 --- a/test/var/override/named/zero_init/bool.wgsl.expected.wgsl +++ b/test/var/override/named/zero_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : bool = bool(); +@override let o : bool = bool(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/f32.wgsl b/test/var/override/named/zero_init/f32.wgsl index a47d934701..4af2466523 100644 --- a/test/var/override/named/zero_init/f32.wgsl +++ b/test/var/override/named/zero_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32 = f32(); +@override let o : f32 = f32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/f32.wgsl.expected.wgsl b/test/var/override/named/zero_init/f32.wgsl.expected.wgsl index fe1468f1b5..9398382b0f 100644 --- a/test/var/override/named/zero_init/f32.wgsl.expected.wgsl +++ b/test/var/override/named/zero_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : f32 = f32(); +@override let o : f32 = f32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/i32.wgsl b/test/var/override/named/zero_init/i32.wgsl index 64552272a3..132987a493 100644 --- a/test/var/override/named/zero_init/i32.wgsl +++ b/test/var/override/named/zero_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32 = i32(); +@override let o : i32 = i32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/i32.wgsl.expected.wgsl b/test/var/override/named/zero_init/i32.wgsl.expected.wgsl index 5cde67078e..afa82db937 100644 --- a/test/var/override/named/zero_init/i32.wgsl.expected.wgsl +++ b/test/var/override/named/zero_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : i32 = i32(); +@override let o : i32 = i32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/u32.wgsl b/test/var/override/named/zero_init/u32.wgsl index 9d1205e72b..047aeb57b9 100644 --- a/test/var/override/named/zero_init/u32.wgsl +++ b/test/var/override/named/zero_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32 = u32(); +@override let o : u32 = u32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/named/zero_init/u32.wgsl.expected.wgsl b/test/var/override/named/zero_init/u32.wgsl.expected.wgsl index f9d5644b9d..9146204c69 100644 --- a/test/var/override/named/zero_init/u32.wgsl.expected.wgsl +++ b/test/var/override/named/zero_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override]] let o : u32 = u32(); +@override let o : u32 = u32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/bool.wgsl b/test/var/override/numbered/no_init/bool.wgsl index a8b81c7090..407941d1c3 100644 --- a/test/var/override/numbered/no_init/bool.wgsl +++ b/test/var/override/numbered/no_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool; +@override(1234) let o : bool; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/bool.wgsl.expected.wgsl b/test/var/override/numbered/no_init/bool.wgsl.expected.wgsl index e8d6dafc2d..d51cd82ab3 100644 --- a/test/var/override/numbered/no_init/bool.wgsl.expected.wgsl +++ b/test/var/override/numbered/no_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool; +@override(1234) let o : bool; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/f32.wgsl b/test/var/override/numbered/no_init/f32.wgsl index 95e9dfda24..796c8add42 100644 --- a/test/var/override/numbered/no_init/f32.wgsl +++ b/test/var/override/numbered/no_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32; +@override(1234) let o : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/f32.wgsl.expected.wgsl b/test/var/override/numbered/no_init/f32.wgsl.expected.wgsl index cabed6a160..2315774fdf 100644 --- a/test/var/override/numbered/no_init/f32.wgsl.expected.wgsl +++ b/test/var/override/numbered/no_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32; +@override(1234) let o : f32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/i32.wgsl b/test/var/override/numbered/no_init/i32.wgsl index 74846ef2f9..5778c734e2 100644 --- a/test/var/override/numbered/no_init/i32.wgsl +++ b/test/var/override/numbered/no_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32; +@override(1234) let o : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/i32.wgsl.expected.wgsl b/test/var/override/numbered/no_init/i32.wgsl.expected.wgsl index 68fb678baf..cdd1bdda26 100644 --- a/test/var/override/numbered/no_init/i32.wgsl.expected.wgsl +++ b/test/var/override/numbered/no_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32; +@override(1234) let o : i32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/u32.wgsl b/test/var/override/numbered/no_init/u32.wgsl index 152c709d42..7992da9989 100644 --- a/test/var/override/numbered/no_init/u32.wgsl +++ b/test/var/override/numbered/no_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32; +@override(1234) let o : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/no_init/u32.wgsl.expected.wgsl b/test/var/override/numbered/no_init/u32.wgsl.expected.wgsl index 40cb6c0d4a..2a2fc965f5 100644 --- a/test/var/override/numbered/no_init/u32.wgsl.expected.wgsl +++ b/test/var/override/numbered/no_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32; +@override(1234) let o : u32; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/bool.wgsl b/test/var/override/numbered/val_init/bool.wgsl index c29ec30a0d..91cbe009b1 100644 --- a/test/var/override/numbered/val_init/bool.wgsl +++ b/test/var/override/numbered/val_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool = true; +@override(1234) let o : bool = true; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/bool.wgsl.expected.wgsl b/test/var/override/numbered/val_init/bool.wgsl.expected.wgsl index 2ab9051487..57c6d05a2e 100644 --- a/test/var/override/numbered/val_init/bool.wgsl.expected.wgsl +++ b/test/var/override/numbered/val_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool = true; +@override(1234) let o : bool = true; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/f32.wgsl b/test/var/override/numbered/val_init/f32.wgsl index 649d4e8658..72519868ea 100644 --- a/test/var/override/numbered/val_init/f32.wgsl +++ b/test/var/override/numbered/val_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32 = 1.0; +@override(1234) let o : f32 = 1.0; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/f32.wgsl.expected.wgsl b/test/var/override/numbered/val_init/f32.wgsl.expected.wgsl index bb12693e58..d2a4882caf 100644 --- a/test/var/override/numbered/val_init/f32.wgsl.expected.wgsl +++ b/test/var/override/numbered/val_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32 = 1.0; +@override(1234) let o : f32 = 1.0; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/i32.wgsl b/test/var/override/numbered/val_init/i32.wgsl index d867f6a8c8..1036ba5578 100644 --- a/test/var/override/numbered/val_init/i32.wgsl +++ b/test/var/override/numbered/val_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32 = 1; +@override(1234) let o : i32 = 1; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/i32.wgsl.expected.wgsl b/test/var/override/numbered/val_init/i32.wgsl.expected.wgsl index 592dd92695..8f8e5f1b48 100644 --- a/test/var/override/numbered/val_init/i32.wgsl.expected.wgsl +++ b/test/var/override/numbered/val_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32 = 1; +@override(1234) let o : i32 = 1; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/u32.wgsl b/test/var/override/numbered/val_init/u32.wgsl index 22c55f27d5..3ee87d39ba 100644 --- a/test/var/override/numbered/val_init/u32.wgsl +++ b/test/var/override/numbered/val_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32 = 1u; +@override(1234) let o : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/val_init/u32.wgsl.expected.wgsl b/test/var/override/numbered/val_init/u32.wgsl.expected.wgsl index 18bb63b255..4712fda610 100644 --- a/test/var/override/numbered/val_init/u32.wgsl.expected.wgsl +++ b/test/var/override/numbered/val_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32 = 1u; +@override(1234) let o : u32 = 1u; -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/bool.wgsl b/test/var/override/numbered/zero_init/bool.wgsl index 894b5847fb..27a68b3620 100644 --- a/test/var/override/numbered/zero_init/bool.wgsl +++ b/test/var/override/numbered/zero_init/bool.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool = bool(); +@override(1234) let o : bool = bool(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/bool.wgsl.expected.wgsl b/test/var/override/numbered/zero_init/bool.wgsl.expected.wgsl index 653b1da727..2e68a0e38a 100644 --- a/test/var/override/numbered/zero_init/bool.wgsl.expected.wgsl +++ b/test/var/override/numbered/zero_init/bool.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : bool = bool(); +@override(1234) let o : bool = bool(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/f32.wgsl b/test/var/override/numbered/zero_init/f32.wgsl index 0a3908cc67..a022f0b592 100644 --- a/test/var/override/numbered/zero_init/f32.wgsl +++ b/test/var/override/numbered/zero_init/f32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32 = f32(); +@override(1234) let o : f32 = f32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/f32.wgsl.expected.wgsl b/test/var/override/numbered/zero_init/f32.wgsl.expected.wgsl index 589751bd77..e5d2086a72 100644 --- a/test/var/override/numbered/zero_init/f32.wgsl.expected.wgsl +++ b/test/var/override/numbered/zero_init/f32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : f32 = f32(); +@override(1234) let o : f32 = f32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/i32.wgsl b/test/var/override/numbered/zero_init/i32.wgsl index 4dd63fd44a..448f14adae 100644 --- a/test/var/override/numbered/zero_init/i32.wgsl +++ b/test/var/override/numbered/zero_init/i32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32 = i32(); +@override(1234) let o : i32 = i32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/i32.wgsl.expected.wgsl b/test/var/override/numbered/zero_init/i32.wgsl.expected.wgsl index 8c0adcaf38..c250241d66 100644 --- a/test/var/override/numbered/zero_init/i32.wgsl.expected.wgsl +++ b/test/var/override/numbered/zero_init/i32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : i32 = i32(); +@override(1234) let o : i32 = i32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/u32.wgsl b/test/var/override/numbered/zero_init/u32.wgsl index d525204378..ff50cba980 100644 --- a/test/var/override/numbered/zero_init/u32.wgsl +++ b/test/var/override/numbered/zero_init/u32.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32 = u32(); +@override(1234) let o : u32 = u32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/override/numbered/zero_init/u32.wgsl.expected.wgsl b/test/var/override/numbered/zero_init/u32.wgsl.expected.wgsl index d45213b780..1dc6121073 100644 --- a/test/var/override/numbered/zero_init/u32.wgsl.expected.wgsl +++ b/test/var/override/numbered/zero_init/u32.wgsl.expected.wgsl @@ -1,6 +1,6 @@ -[[override(1234)]] let o : u32 = u32(); +@override(1234) let o : u32 = u32(); -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main() { _ = o; } diff --git a/test/var/uses/many_workgroup_vars.wgsl b/test/var/uses/many_workgroup_vars.wgsl index 7857da9643..56df492ece 100644 --- a/test/var/uses/many_workgroup_vars.wgsl +++ b/test/var/uses/many_workgroup_vars.wgsl @@ -99,8 +99,8 @@ var m97 : mat2x2; var m98 : mat2x2; var m99 : mat2x2; -[[stage(compute), workgroup_size(1)]] -fn tint_symbol([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn tint_symbol(@builtin(local_invocation_index) idx : u32) { m00[0][0] = 1.0; m01[0][0] = 1.0; m02[0][0] = 1.0; @@ -201,4 +201,4 @@ fn tint_symbol([[builtin(local_invocation_index)]] idx : u32) { m97[0][0] = 1.0; m98[0][0] = 1.0; m99[0][0] = 1.0; -} \ No newline at end of file +} diff --git a/test/var/uses/many_workgroup_vars.wgsl.expected.wgsl b/test/var/uses/many_workgroup_vars.wgsl.expected.wgsl index 873700f6ff..9d1822e0cd 100644 --- a/test/var/uses/many_workgroup_vars.wgsl.expected.wgsl +++ b/test/var/uses/many_workgroup_vars.wgsl.expected.wgsl @@ -198,8 +198,8 @@ var m98 : mat2x2; var m99 : mat2x2; -[[stage(compute), workgroup_size(1)]] -fn tint_symbol([[builtin(local_invocation_index)]] idx : u32) { +@stage(compute) @workgroup_size(1) +fn tint_symbol(@builtin(local_invocation_index) idx : u32) { m00[0][0] = 1.0; m01[0][0] = 1.0; m02[0][0] = 1.0; diff --git a/test/var/uses/private.wgsl b/test/var/uses/private.wgsl index a08e7051be..6ec289a94d 100644 --- a/test/var/uses/private.wgsl +++ b/test/var/uses/private.wgsl @@ -25,25 +25,25 @@ fn outer() { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1() { a = 42; uses_a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2() { b = 7; uses_b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main3() { outer(); no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main4() { no_uses(); } diff --git a/test/var/uses/private.wgsl.expected.wgsl b/test/var/uses/private.wgsl.expected.wgsl index ae27b42746..477044740d 100644 --- a/test/var/uses/private.wgsl.expected.wgsl +++ b/test/var/uses/private.wgsl.expected.wgsl @@ -27,25 +27,25 @@ fn outer() { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1() { a = 42; uses_a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2() { b = 7; uses_b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main3() { outer(); no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main4() { no_uses(); } diff --git a/test/var/uses/workgroup.wgsl b/test/var/uses/workgroup.wgsl index d47c3da7f0..23736b525e 100644 --- a/test/var/uses/workgroup.wgsl +++ b/test/var/uses/workgroup.wgsl @@ -25,25 +25,25 @@ fn outer() { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1() { a = 42; uses_a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2() { b = 7; uses_b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main3() { outer(); no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main4() { no_uses(); } diff --git a/test/var/uses/workgroup.wgsl.expected.wgsl b/test/var/uses/workgroup.wgsl.expected.wgsl index 95d9b6b12a..a3386fec6c 100644 --- a/test/var/uses/workgroup.wgsl.expected.wgsl +++ b/test/var/uses/workgroup.wgsl.expected.wgsl @@ -27,25 +27,25 @@ fn outer() { no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main1() { a = 42; uses_a(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main2() { b = 7; uses_b(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main3() { outer(); no_uses(); } -[[stage(compute), workgroup_size(1)]] +@stage(compute) @workgroup_size(1) fn main4() { no_uses(); } diff --git a/test/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl b/test/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl index cd91ab7e92..cb95b588e9 100644 --- a/test/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl +++ b/test/vk-gl-cts/api/descriptor_set/descriptor_set_layout_binding/layout_binding_order/0.wgsl @@ -16,13 +16,13 @@ struct block2 { data2 : i32; }; -[[group(0), binding(3)]] var x_4 : result; +@group(0) @binding(3) var x_4 : result; -[[group(0), binding(0)]] var x_6 : block0; +@group(0) @binding(0) var x_6 : block0; -[[group(0), binding(1)]] var x_8 : block1; +@group(0) @binding(1) var x_8 : block1; -[[group(0), binding(2)]] var x_10 : block2; +@group(0) @binding(2) var x_10 : block2; fn main_1() { let x_25 : i32 = x_6.data0; @@ -34,7 +34,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl index 8d78d1eec5..0e4fce3f55 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl @@ -2,14 +2,14 @@ struct block0 { data : vec4; }; -[[group(0), binding(1)]] var x_4 : block0; +@group(0) @binding(1) var x_4 : block0; fn main_1() { x_4.data = vec4(1.0, 2.0, 3.0, 4.0); return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl index 465aac81d4..5cdad21df7 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl @@ -6,7 +6,7 @@ var position : vec4; var frag_color : vec4; -[[group(0), binding(1)]] var x_8 : block0; +@group(0) @binding(1) var x_8 : block0; var gl_Position : vec4; @@ -19,14 +19,14 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; - [[location(0)]] + @location(0) frag_color_1 : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position, frag_color); diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl index 0901c1f0f4..eae3d41b6f 100644 --- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl +++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/1.wgsl @@ -9,12 +9,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) final_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(0)]] frag_color_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(0) frag_color_param : vec4) -> main_out { frag_color = frag_color_param; main_1(); return main_out(final_color); diff --git a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl index b9cc524f09..8e480df11b 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/0-opt.wgsl @@ -13,14 +13,14 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; - [[location(1)]] + @location(1) frag_color_1 : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position, frag_color); diff --git a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl index cbbd62625c..0ad4fe9cf8 100644 --- a/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl +++ b/test/vk-gl-cts/combined_operations/negintdivand/1.wgsl @@ -16,12 +16,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(1)]] frag_color_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(1) frag_color_param : vec4) -> main_out { frag_color = frag_color_param; main_1(); return main_out(color_out); diff --git a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl index 8432d48e62..6d1ff1f71b 100644 --- a/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/access-new-vector-inside-if-condition/0-opt.wgsl @@ -11,11 +11,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl index 32cc07e747..ae0c7b09a8 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; var x_GLF_color : vec4; @@ -101,11 +101,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl index c345dfcd8f..58049a1da7 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl @@ -10,7 +10,7 @@ var obj : QuicksortObject; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_30 : buf0; +@group(0) @binding(0) var x_30 : buf0; fn swap_i1_i1_(i : ptr, j : ptr) { var temp : i32; @@ -185,11 +185,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl index 75f4bd370e..db02da6c2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -91,12 +91,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl index a09f0d4d8c..63e967594d 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl @@ -102,12 +102,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl index 19735eedd9..9c19516e7f 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl @@ -83,11 +83,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl index 5793a6ff69..6200ff3878 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct doesNotMatter { global_seed : i32; @@ -11,9 +11,9 @@ struct buf1 { var gl_LocalInvocationID : vec3; -[[group(0), binding(0)]] var x_7 : doesNotMatter; +@group(0) @binding(0) var x_7 : doesNotMatter; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; fn main_1() { var lid : i32; @@ -55,8 +55,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(16, 1, 1)]] -fn main([[builtin(local_invocation_id)]] gl_LocalInvocationID_param : vec3) { +@stage(compute) @workgroup_size(16, 1, 1) +fn main(@builtin(local_invocation_id) gl_LocalInvocationID_param : vec3) { gl_LocalInvocationID = gl_LocalInvocationID_param; main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl index 5ac0f1a070..557b89caaf 100644 --- a/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/break-in-do-while-with-nested-if/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var GLF_live12c5 : bool; @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl index 817d91b745..04662ee138 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/call-function-with-discard/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -28,11 +28,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl index d68a5ec72e..f655e42fe3 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -62,11 +62,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl index 520dccbc7c..8af8b73c7f 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/color-set-in-for-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl index 088c0f824a..1f03990b0a 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl @@ -61,12 +61,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl index 937a8dfd17..4de0ebdb26 100644 --- a/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/conditional-return-in-infinite-while/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var GLF_live6tree : array; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -39,11 +39,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl index 4affd4fc8f..2a4df8031e 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_25 : buf0; +@group(0) @binding(0) var x_25 : buf0; var gl_FragCoord : vec4; @@ -304,12 +304,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl index c7a4fe29a6..b4400e6fc0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl @@ -6,7 +6,7 @@ var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; fn func_i1_(b : ptr) -> f32 { var ndx : i32; @@ -112,12 +112,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl index 021c3f703e..dd80eb35c6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -54,11 +54,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl index b046ca186f..c36195116d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -63,11 +63,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl index 1fff19f0a9..a652c568a2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var v : vec2; @@ -45,12 +45,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl index 6c62828797..9630567ce4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-acos-ldexp/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { two : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -23,11 +23,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl index 32c79b753c..a4a925f4f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -58,11 +58,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl index d1079cb913..87c4fe3a19 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -48,11 +48,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl index 019dd07cbf..9a720282fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; @@ -12,9 +12,9 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; fn main_1() { var f0 : f32; @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl index e8b285faef..fd64516803 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -53,11 +53,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl index 57cbd69f1d..3b441f6e5b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -46,11 +46,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl index 8bcb3a5cee..be02bf81ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.wgsl @@ -22,11 +22,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl index 3c3604ac96..4861cdf07e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_15 : buf0; +@group(0) @binding(0) var x_15 : buf0; fn main_1() { var m0 : mat3x4; @@ -79,11 +79,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl index 058b636022..f9187eeef0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,11 +44,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl index ba3f0fe42a..fdeb85af2f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var x_GLF_color : vec4; @@ -58,12 +58,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl index ab2be50ee0..f7f4488460 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -8,11 +8,11 @@ struct buf1 { one : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_19 : buf1; +@group(0) @binding(1) var x_19 : buf1; fn main_1() { var arr0 : array; @@ -219,11 +219,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl index f95fe555ea..f71829aa10 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -84,11 +84,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl index 74ba82b913..2ffa4acfc6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -53,11 +53,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl index fbe9843a26..26f785995c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -47,11 +47,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl index 8cbbc0123a..383dd2bf66 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var x_GLF_color : vec4; @@ -61,12 +61,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl index f5e5913c71..5ab1ec2661 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -57,11 +57,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl index 1d88159fe1..b8d916bd1f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl @@ -2,23 +2,23 @@ struct buf2 { zero : f32; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(2)]] var x_6 : buf2; +@group(0) @binding(2) var x_6 : buf2; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -53,11 +53,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl index 73515b97ab..9b8061d488 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl @@ -149,12 +149,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl index b8f5efd953..90b17bf88f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -137,11 +137,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl index 3319941bb7..e8560cac41 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cast-float-to-int-and-back/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var f : f32; @@ -27,11 +27,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl index 6cc8571eec..82acf85308 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl index f53bccb8fd..a5ffc0eec3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; fn main_1() { var a : f32; @@ -41,11 +41,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl index 625194667d..c01653c56e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -71,11 +71,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl index e0b99284ee..bbd9843fb8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; fn main_1() { var v0 : vec2; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl index dc68ea4495..3fc8857ebc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; fn main_1() { var v0 : vec2; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl index 8d15f49efb..4b9df7723c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clear-yz-inside-condition/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -8,9 +8,9 @@ struct buf1 { zero : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -43,11 +43,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl index 7094098957..f0c0fa19ba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf2 { x_GLF_uniform_int_values : Arr_1; @@ -14,7 +14,7 @@ struct buf3 { three : i32; }; -type Arr_2 = [[stride(16)]] array; +type Arr_2 = @stride(16) array; struct buf0 { x_GLF_uniform_uint_values : Arr_2; @@ -22,15 +22,15 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; -[[group(0), binding(2)]] var x_12 : buf2; +@group(0) @binding(2) var x_12 : buf2; -[[group(0), binding(3)]] var x_14 : buf3; +@group(0) @binding(3) var x_14 : buf3; -[[group(0), binding(0)]] var x_16 : buf0; +@group(0) @binding(0) var x_16 : buf0; fn func0_() { var tmp : vec4; @@ -128,12 +128,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl index 4287868774..34680181fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-overwrite-identity-matrix-multiply/0.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -32,12 +32,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl index 5049fc2dd0..181cfc222f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl @@ -2,17 +2,17 @@ struct buf1 { v1 : vec2; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var b : bool; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl index 8cc56012d4..0b91056ebf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl index 3860701cee..fc6c71578d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -8,7 +8,7 @@ struct buf2 { injectionSwitch : vec2; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -16,11 +16,11 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(2)]] var x_9 : buf2; +@group(0) @binding(2) var x_9 : buf2; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; fn main_1() { var a : i32; @@ -60,11 +60,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl index 279f432d75..1bf8ce0c2f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-ceil-vec4/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { quarter : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl index 367bf4033d..e0b9f7dbea 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl @@ -28,11 +28,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl index c3e6f5d5be..95c8f9c974 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-min/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : f32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -18,11 +18,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl index 45f886ff98..38010597a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-vs-original/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var f : f32; @@ -23,11 +23,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl index b2ed065819..cbea4eedeb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { fourtytwo : f32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl index 2617e9c1e8..348724f481 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-dot-condition-true/0-opt.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl index 78b9651a2b..a0b52a6e2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-gte-const-first/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -20,12 +20,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl index bab28c3d53..c5e47de4e0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -68,11 +68,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl index 919120b7da..fe33aadafa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-mod-one-one-lte/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { if (((1.0 % 1.0) <= 0.01)) { @@ -23,11 +23,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl index 9bdf93e169..cb84651195 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -48,11 +48,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl index 92d63c5391..cf2d376b1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-same-condition/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var x_30 : bool; @@ -40,11 +40,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl index f14b530a16..5dd0328ba3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-sinh-inf/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -30,11 +30,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl index 2d4b64104b..a9f8c0d96c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl index aa699030db..aff4ac4b2c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.wgsl @@ -14,11 +14,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl index 0fdf48f02c..903cd157fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -74,11 +74,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl index 98535465b1..9a4d15fca5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-mix-uniform/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -21,11 +21,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl index 3af5bf9c0d..9822ce0df4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-continue-break-discard-return-in-loop/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -10,9 +10,9 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; fn main_1() { let x_28 : i32 = x_5.x_GLF_uniform_int_values[0]; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl index 91ec6879f9..c0a411d5be 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-func-argument/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -58,11 +58,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl index be4b0aed55..6c2ce38b70 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-no-stores/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -30,11 +30,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl index 160423475b..9438771f38 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-copy-prop-arrays-param-uniform/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl index 56180ef236..6301e6672e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cosh-clamped-to-one/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var v : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl index a5bfcb96cc..0eaf9df057 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -91,11 +91,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl index c7c18d1e70..659ece3abd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl index 645096ca13..65441984c5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl index 5c74b32532..ff92b48e01 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl index 1a131cd306..5cc135e2f2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; fn func_f1_(b : ptr) -> f32 { let x_90 : f32 = x_7.x_GLF_uniform_float_values[0]; @@ -78,11 +78,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl index 06ea4a2fa9..01e8325872 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-increment-color/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -36,11 +36,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl index eadf9645d4..1964f4c668 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,11 +44,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl index 1a4e1596ca..308fa1a5e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl @@ -6,9 +6,9 @@ struct buf0 { minusEight : i32; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl index d6f28e9932..52f8b42ac7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -66,11 +66,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl index 14ef8d3f17..76343c78fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-branch-func-return-arg/0-opt.wgsl @@ -108,11 +108,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl index 46da53aaf5..cb78e4d999 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl @@ -8,7 +8,7 @@ var array0 : array; var array1 : array; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; var x_GLF_color : vec4; @@ -72,12 +72,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl index e1e2a9e16e..ddd7fa4291 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -16,11 +16,11 @@ struct buf2 { var x_GLF_global_loop_count : i32; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; -[[group(0), binding(2)]] var x_12 : buf2; +@group(0) @binding(2) var x_12 : buf2; var x_GLF_color : vec4; @@ -79,11 +79,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl index 0155704de7..ffdf8936ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -55,11 +55,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl index af5a1c139f..cd8f3f0ee6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl index b93b128e8d..6006a29304 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -53,11 +53,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl index 690c3dd939..9237ad881b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -60,11 +60,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl index 620e1b8e6d..e09ab73039 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-exp2-two/0-opt.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl index 28e53df556..4ca3a57c24 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl index 35a6b62830..af347a523f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl index 57dfb87dde..91e2f98d8a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-and-zero/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl index 76cdd760ec..92a2bb7f2e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-or-full-mask/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl index a475384cd6..42444720b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-bitwise-xor/0-opt.wgsl @@ -16,11 +16,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl index 3d020482f7..7b6d3b188f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl index 4fa99014f0..39269373cc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl @@ -27,12 +27,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl index 56678abe49..ad83063d7c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.wgsl @@ -13,12 +13,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl index 10c8137108..cdfde15170 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { minusOne : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl index ec3893d3b2..41c2d7962f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-variable/0.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl index 9e985c7364..7cb34b0c34 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : u32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -64,11 +64,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl index f04d8e215a..45e24a8686 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-right-arithmetic/0.wgsl @@ -13,11 +13,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl index be6fc47227..350df86c59 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-switch-udiv/0.wgsl @@ -16,11 +16,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl index 6795d45dfd..e86e68c2fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-clamp-cmp-const-first/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -33,11 +33,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl index 485238cda6..865cffe80c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl index eb496299df..3aeb232ea9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-construct-extract/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { twoandthree : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl index 017d331643..5e92a1d7c4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-extract/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : f32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl index c832a10589..cd134b6379 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-dot-no-extract/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : f32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl index 7c7b28a2ba..1446989e13 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl index eb97819ee2..7e63c10cf9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -21,11 +21,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl index 82d53fc18f..b9dc403992 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { four : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -21,11 +21,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl index 738c840570..dbdf48cfe5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -21,11 +21,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl index 99ec59af35..d7f03d814d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl index 44ac190709..b4a3e58398 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl index 1bba57fb43..6ae50842d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { five : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -31,11 +31,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl index 1315b97148..fa13a35b1e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-mix-uniform-weight/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl index a762a7d916..115f20178a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { four : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl index edfae009dd..37d278a0c0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl index 5938fe4618..2397e0e642 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-redundant-mix/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl index bbb0ca6eb7..16eb822969 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-extract/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl index 49c9205368..7049b3312a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-shuffle-mix/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { threeandfour : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -23,11 +23,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl index 13ebbb0471..e85799676e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-split-vector-init/0-opt.wgsl @@ -16,11 +16,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl index bca241141c..479f2159e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-vec-mix-uniform/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zeroOne : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -25,11 +25,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl index c13349f140..3d3d0e4770 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -41,11 +41,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl index c5585de7f9..6a728fdec1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -59,11 +59,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl index af6ec42ce2..b6ec115a48 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -54,11 +54,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl index 05228f7d6f..9e1b201b40 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; fn main_1() { var f0 : f32; @@ -40,12 +40,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl index a1ab4e0ea0..089938b735 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-smoothstep-undefined/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -48,11 +48,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl index 9d5718a081..3a9c1352cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-bitwise-not/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -36,12 +36,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl index 0ea6e7dcc4..a905e60e00 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var gl_FragCoord : vec4; @@ -85,12 +85,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl index baa752ed9a..ddb1417b1a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; fn main_1() { var icoord : vec2; @@ -62,12 +62,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl index 0791d4630a..20851dec63 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; fn func_f1_(x : ptr) -> f32 { loop { @@ -82,12 +82,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl index b695c169d0..85ca151c52 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; @@ -8,21 +8,21 @@ struct buf2 { zero : f32; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(2)]] var x_10 : buf2; +@group(0) @binding(2) var x_10 : buf2; var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; fn func_vf2_(pos : ptr>) -> bool { let x_62 : f32 = (*(pos)).x; @@ -60,12 +60,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl index 9c26d4493b..b2ded57417 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -8,7 +8,7 @@ var x_GLF_global_loop_count : i32; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { x_GLF_global_loop_count = 0; @@ -55,11 +55,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl index 57432b72e5..caf4f3a83a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -16,11 +16,11 @@ struct buf2 { var x_GLF_global_loop_count : i32; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; -[[group(0), binding(2)]] var x_15 : buf2; +@group(0) @binding(2) var x_15 : buf2; var x_GLF_color : vec4; @@ -130,11 +130,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl index 19d84edb75..96ce6a32f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_global_loop_count : i32; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -63,11 +63,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl index 510a02abe1..3ae2436ddc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -68,11 +68,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl index 231d4144cc..531a3d42d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -8,7 +8,7 @@ var x_GLF_global_loop_count : i32; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { x_GLF_global_loop_count = 0; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl index 080e3bad0e..c5c2c0c966 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -28,11 +28,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl index fa50b1e2c8..eae9e8943f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-switch-fallthrough/0.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { let x_31 : f32 = x_6.x_GLF_uniform_float_values[1]; @@ -45,12 +45,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl index e31894b003..aed3c7742b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -67,11 +67,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl index ff058e89c2..883acb774a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -46,11 +46,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl index e18c700891..885ecabd5e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -43,11 +43,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl index 9dc640bc57..d210920825 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl index d9a10ba3b8..f649776eb1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -71,11 +71,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl index d16fa14c9e..3d51f22595 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_global_loop_count : i32; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -81,11 +81,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl index 5f11cded0d..27f748f36d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -39,11 +39,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl index 0bb69b8dec..a98a0ef554 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl index a1adef2d96..ba4cf88127 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -87,11 +87,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl index 5a5096d3a0..2a3bb62472 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-array-matrix-element/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -58,11 +58,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl index 02f75088e1..02e7cd806c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-vector-component-with-matrix-copy/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -56,11 +56,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl index 7d42f20fec..5ea261307f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-empty-block/0-opt.wgsl @@ -27,12 +27,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl index ab1fd10e95..badcf704e0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-nested-loops/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -68,11 +68,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl index c5a9a86a5f..7405541bc0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl index cf1481af0b..0a01338577 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-unreachable-func/0-opt.wgsl @@ -29,12 +29,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl index 95eb9e4806..6df84d8a7b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; var x_GLF_color : vec4; @@ -73,12 +73,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl index de17bea4e9..4b2c476ae1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -58,11 +58,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl index 46580aed4b..95e3e82cd2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -74,11 +74,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl index 10bc47e705..ce4f886816 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; var x_GLF_color : vec4; @@ -79,12 +79,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl index d0f8b626a5..6284f251a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-pack-unpack/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -89,11 +89,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl index 3e90ab3315..c40e683d68 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -69,11 +69,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl index 8b9be4e0ca..5515fa14fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-xor-add/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -44,11 +44,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl index 41a1c551ab..9f58cd8ca3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-isnan/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { let x_7 : i32 = x_5.x_GLF_uniform_int_values[0]; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl index a6919399cf..b69d2c2baf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ldexp/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; fn main_1() { let x_29 : f32 = x_5.x_GLF_uniform_float_values[0]; @@ -36,11 +36,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl index 5e268e00a0..4de5b475b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_14 : buf1; +@group(0) @binding(1) var x_14 : buf1; fn f1_f1_(a : ptr) -> f32 { var b : i32; @@ -66,12 +66,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl index 4cc9cf8673..d9c43dbaee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-ternary-vector-access/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; fn main_1() { var a : i32; @@ -46,12 +46,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl index ed48840344..a31725e0ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var i : i32; @@ -43,11 +43,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl index 585c193fcd..2465cc6850 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-mul-div-rem-if-undefined-divide-mix/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; fn f1_f1_(a : ptr) -> f32 { let x_100 : f32 = *(a); @@ -64,12 +64,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl index 2b819bad16..d84f847cfe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -85,11 +85,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl index eae85efacb..62a1158be7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; fn main_1() { var i : i32; @@ -59,12 +59,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl index 628a5ecd01..b67d22f7a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -82,11 +82,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl index c18fcc87be..6f2a0b3281 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -84,11 +84,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl index c423f55fc8..d912c182c4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -86,11 +86,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl index 7b441cf692..b3b842d625 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-switch-or-xor/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -39,11 +39,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl index 58bf348cc6..5daa6ead93 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl index 35919945cf..054e604a73 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-value-tracking-inversesqrt/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl index 2c3b18fa83..2ff0ddf27a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl index ebf9237579..450004fd52 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inclusive-or/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl index 6b0ffef88b..e6a5f8c518 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -165,11 +165,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl index dbbbe2b551..ad8bed6c39 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var a : f32; @@ -35,11 +35,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl index e3df98ee87..04e790834d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var a : f32; @@ -35,11 +35,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl index 43f45624b8..fd3b6cd3e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-sqrt/0.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; fn main_1() { let x_31 : f32 = x_5.x_GLF_uniform_float_values[0]; @@ -33,11 +33,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl index fb49913fc5..9dda7ec0d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl @@ -6,15 +6,15 @@ struct buf1 { v1 : vec2; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -147,11 +147,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl index 0590a0ef3e..277fb3a321 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; @@ -12,9 +12,9 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_5 : buf1; +@group(0) @binding(1) var x_5 : buf1; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var i : i32; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl index b584e24558..c915bc37ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-div-round-to-zero/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -30,11 +30,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl index ab9a5fd55a..31c63ab527 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -47,12 +47,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl index 054f760dff..c2cd62afe5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl index a0443e6de5..195dfd7fde 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl @@ -91,11 +91,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl index a31745783f..da37a46841 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ldexp-undefined-mat-vec-multiply/0.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl index cf4338c6c3..1736a9c80f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var x_GLF_color : vec4; @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl index 602982386f..0429c3b886 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var x_32_phi : i32; @@ -39,11 +39,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl index 0a12739518..0d9ad36ab7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl index c13d80fc4e..76b7072d2a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -68,11 +68,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl index 4c1cc2eb94..e839854157 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -42,11 +42,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl index 8f286a399f..7f75d1092e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var x_GLF_global_loop_count : i32; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl index 3dc9b8fbdf..4d7396fabd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -79,11 +79,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl index 4f881f0108..da7adbc78b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var x_GLF_color : vec4; @@ -71,11 +71,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl index d17d68685a..043f22ed81 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var gl_FragCoord : vec4; @@ -81,12 +81,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl index 6bee0d7047..c2a92705a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -53,11 +53,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl index 61e176cd6b..4fb7bb4df3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl index fbaf576d07..749e41da91 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-logical-xor/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -33,11 +33,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl index 5d36dbd4f6..95223c080d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_global_loop_count : i32; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -62,11 +62,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl index 3edff4c853..56035621d2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -81,11 +81,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl index b2a62e1f0d..1afd0fbad1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; @@ -12,11 +12,11 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; fn main_1() { var data : array; @@ -119,12 +119,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl index f9b028dfe7..e4181c505a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; var x_GLF_v1 : vec4; @@ -81,12 +81,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_v1_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_v1); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl index 633587bc65..92c33ac6e9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -40,11 +40,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl index 97d05eeef5..595d15c417 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; @@ -61,12 +61,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl index bacb0e9599..6063cf2e4b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -85,11 +85,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl index 745d30662f..80a5f2ff38 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -32,11 +32,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl index 7556722a92..3000605ccb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-square-mul-with-vector/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl index 6847d17187..0b552c2952 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-clamp-same-minval/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -19,11 +19,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl index 4168f0348e..7c8e12df24 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-max-min-less-than/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -8,7 +8,7 @@ var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; fn main_1() { var a : i32; @@ -29,12 +29,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl index 7987ab9f61..beb04a2687 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl @@ -8,7 +8,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -86,11 +86,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl index 9c1a3affd1..dcf3f7d04d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-unused-component/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { two : f32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -32,11 +32,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl index a30ca1f7aa..38600328cb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-merge-return-condition-twice/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : f32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl index 194355f626..75ef009043 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-intbitstofloat-undefined-never-used/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; fn main_1() { var f : f32; @@ -37,12 +37,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl index 6c6f442b13..c91bc5beec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-min-nested-loop-same-value-for-variables/0-opt.wgsl @@ -12,12 +12,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl index 0eacd57a4c..970ec3aad6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf1 { one : u32; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -10,11 +10,11 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; fn func_() -> f32 { switch(1) { @@ -51,12 +51,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl index ee397ee1d4..4e092af23a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mod-uint-bits-float/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var a : f32; @@ -26,11 +26,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl index 45050a1f67..8dc10594b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl @@ -1,28 +1,28 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf2 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -type Arr_2 = [[stride(16)]] array; +type Arr_2 = @stride(16) array; struct buf1 { x_GLF_uniform_uint_values : Arr_2; }; -[[group(0), binding(2)]] var x_8 : buf2; +@group(0) @binding(2) var x_8 : buf2; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; -[[group(0), binding(1)]] var x_12 : buf1; +@group(0) @binding(1) var x_12 : buf1; var x_GLF_color : vec4; @@ -56,12 +56,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl index 6dbe667a2a..c840fa9dde 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl @@ -648,11 +648,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl index 85ab8566f4..c5a7eecb0c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl @@ -2,13 +2,13 @@ struct buf2 { one : f32; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -16,13 +16,13 @@ struct buf1 { var m : mat4x2; -[[group(0), binding(2)]] var x_10 : buf2; +@group(0) @binding(2) var x_10 : buf2; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_16 : buf1; +@group(0) @binding(1) var x_16 : buf1; var x_GLF_color : vec4; @@ -118,12 +118,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl index 888c7e30c4..fa8927b3c2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -88,11 +88,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl index 6961cb23d3..bc23f2abb5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var x_GLF_global_loop_count : i32; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -319,11 +319,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl index 3542b4bf95..45c6006f72 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -116,11 +116,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl index 014de3f8c4..07176d9b9c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -63,11 +63,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl index 8033cb96d2..ab44f5525c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-loop-unroll-if-if-if-if-do-while/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; @@ -12,9 +12,9 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var a : f32; @@ -63,11 +63,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl index c83f471246..ebcbd97e20 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -64,11 +64,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl index 045939d226..503dd1c2ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-one-minus-clamp-always-one-cast-to-int/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -31,11 +31,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl index 40c7d3e04e..892a12c36a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; var x_GLF_color : vec4; @@ -94,12 +94,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl index 07eb0abac1..9439fb8412 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var gl_FragCoord : vec4; @@ -219,12 +219,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl index 25ac138f28..7ea4c743bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; var x_GLF_color : vec4; @@ -91,11 +91,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl index 967e25d321..fbcbd37e81 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-signum/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl index 23deeb093b..a562dabf35 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pattern-match-single-bit/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl index 9526fa4bd4..d437610114 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; @@ -12,11 +12,11 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; fn main_1() { var i : i32; @@ -71,12 +71,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl index 45a9af89c6..21a181176b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -8,17 +8,17 @@ struct buf2 { one : f32; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(2)]] var x_11 : buf2; +@group(0) @binding(2) var x_11 : buf2; -[[group(0), binding(1)]] var x_13 : buf1; +@group(0) @binding(1) var x_13 : buf1; var x_GLF_color : vec4; @@ -57,11 +57,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl index ed5b89af88..76a7c6fba5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; @@ -8,17 +8,17 @@ struct buf2 { zero : i32; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(2)]] var x_8 : buf2; +@group(0) @binding(2) var x_8 : buf2; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -54,11 +54,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl index 7418f6e618..a2136911d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var a : f32; @@ -35,11 +35,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl index c40a4c6450..3dc8f01696 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-rcp-negative-int/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl index 04d4193d1b..04e7a735a7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reciprocal-var-minus-one/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl index dad9c78b2b..c72ff227b6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var x_9 : array; @@ -32,11 +32,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl index 9d610146dc..af3e4e954e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-extract/0-opt.wgsl @@ -7,7 +7,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -57,11 +57,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl index 8e1fa6517c..41448e1bdc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var gl_FragCoord : vec4; @@ -70,12 +70,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_v1_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_v1); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl index 149bcabe5a..de85f78f0f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -75,11 +75,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl index 708e04682b..8fcba9c3ec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_11 : buf0; +@group(0) @binding(0) var x_11 : buf0; var x_GLF_color : vec4; @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl index d902f3f7b5..25b4aee296 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-do-while/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf1; +@group(0) @binding(0) var x_5 : buf1; fn main_1() { let x_22 : i32 = x_5.x_GLF_uniform_int_values[0]; @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl index 5fbcdd9e6f..8d05b1d0b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; @@ -16,13 +16,13 @@ struct buf2 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; -[[group(0), binding(2)]] var x_11 : buf2; +@group(0) @binding(2) var x_11 : buf2; fn main_1() { var i : i32; @@ -58,12 +58,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl index 4f29ab6205..d1c4406537 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-partly-undefined-vector-from-array/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; fn func_() -> vec2 { var v : vec2; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl index 97c49ab053..5e613adcc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -218,11 +218,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl index 3e5c910fe2..5dac9955a6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -179,11 +179,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl index 2794ec565c..7428919016 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-schedule-dag-rrlist-mix-log-cos/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,11 +44,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl index d74e3c27b0..b90368582f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-assign-back-and-forth/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; @@ -6,7 +6,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var v : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl index b2a778b044..52299447ce 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -48,11 +48,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl index 27faee3bb5..776fce0bd1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl @@ -2,17 +2,17 @@ struct buf1 { v1 : vec2; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(1)]] var x_5 : buf1; +@group(0) @binding(1) var x_5 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; fn main_1() { let x_29 : f32 = x_5.v1.x; @@ -40,11 +40,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl index b48fce6604..530c5ac0f6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-same-cond-twice/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var x_29 : bool; @@ -28,11 +28,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl index 8b99a5629d..a683057762 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -101,11 +101,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl index 75a7f4ca84..133ac579d5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-vector-cos-fragcoord/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -69,12 +69,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl index 30873edf27..58cee81d82 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -77,11 +77,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl index 47c21ce9d9..f0082cf9d6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl @@ -8,9 +8,9 @@ struct buf1 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; fn main_1() { var i : i32; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl index 3fd60e50a9..0cf0b4935a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { sequence : vec4; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl index 4480579292..8100eda8d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-combine-compares-max-max-one/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -30,11 +30,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl index 36eceec299..a9510ff303 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { two : i32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl index 99296b4218..0d58bc34c2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-div-by-uint-one/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { two : u32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl index 98b5b4caaa..b58a8b95f4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -49,11 +49,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl index 66ce6c9338..7c308e3740 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-ldexp-exponent-zero/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl index 2336efa237..a92ccaffcf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -86,11 +86,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl index 2ac7c5ede4..b5acf659a8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-modulo-1/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var a : f32; @@ -36,11 +36,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl index a54df57a33..65a65c4a46 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-mul-identity/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl index 8395edadb4..cd777bee7e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-not-less-than-neg/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { three : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; @@ -29,12 +29,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl index 318f16a185..68db28f9b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-right-shift-greater-than-zero/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -25,11 +25,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl index a90301433a..6b82628356 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-sign-cosh/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -26,11 +26,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl index 2b24d077c9..648957e472 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -44,12 +44,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl index a3418a94f4..853116d2cc 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sin-mul-mat-mat-mul-vec-mat/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; var x_GLF_color : vec4; @@ -76,11 +76,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl index 2e51071cf5..99d78510f5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var g : i32; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -45,11 +45,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl index 0814ab25ac..9875dc81b8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -58,11 +58,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl index cc2ab6741d..878b143871 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl index a52a30ae80..71aaee048e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-step-sinh/0-opt.wgsl @@ -15,11 +15,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl index ba81461739..5656cd659b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl @@ -2,7 +2,7 @@ struct S { numbers : array; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; @@ -16,19 +16,19 @@ struct buf3 { oneVec : vec2; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; -[[group(0), binding(2)]] var x_9 : buf2; +@group(0) @binding(2) var x_9 : buf2; -[[group(0), binding(3)]] var x_12 : buf3; +@group(0) @binding(3) var x_12 : buf3; -[[group(0), binding(0)]] var x_15 : buf0; +@group(0) @binding(0) var x_15 : buf0; var x_GLF_color : vec4; @@ -78,11 +78,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl index 5174f36fea..be7e4b8914 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; @@ -8,19 +8,19 @@ struct buf2 { resolution : vec2; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(2)]] var x_8 : buf2; +@group(0) @binding(2) var x_8 : buf2; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; fn main_1() { var f : f32; @@ -47,11 +47,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl index 0397e5b7c9..47f71836eb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var x_GLF_color : vec4; @@ -91,11 +91,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl index 210236bf39..a95343e12e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; @@ -8,7 +8,7 @@ struct buf2 { zero : f32; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -16,11 +16,11 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_5 : buf1; +@group(0) @binding(1) var x_5 : buf1; -[[group(0), binding(2)]] var x_7 : buf2; +@group(0) @binding(2) var x_7 : buf2; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; fn main_1() { var i : i32; @@ -84,11 +84,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl index c1757e610e..496f7795d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -27,12 +27,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl index 0ee891db0e..0f1c0bbfba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl @@ -6,15 +6,15 @@ struct buf1 { v1 : vec2; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -153,11 +153,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl index 891a9135b0..49874e83ba 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.wgsl @@ -18,11 +18,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl index d2a159764d..a0ae7b1aab 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; @@ -12,11 +12,11 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_7 : buf1; +@group(0) @binding(1) var x_7 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; fn main_1() { var f : f32; @@ -40,12 +40,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl index cb2e89136d..7e44271d1e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-types-return-in-main-never-hit/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var x_24 : vec4; @@ -19,11 +19,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl index 97b93bc312..f73e0ea420 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl @@ -1,4 +1,4 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr; @@ -8,9 +8,9 @@ struct buf1 { v1 : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; @@ -46,11 +46,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl index 8691174ca2..a2cb24ff42 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl @@ -2,13 +2,13 @@ struct S { data : i32; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -85,11 +85,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl index ce444a3eb4..2255ea425a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unpack-unorm-mix-always-one/0-opt.wgsl @@ -1,26 +1,26 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_uint_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr_1; }; -type Arr_2 = [[stride(16)]] array; +type Arr_2 = @stride(16) array; struct buf2 { x_GLF_uniform_float_values : Arr_2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; -[[group(0), binding(2)]] var x_10 : buf2; +@group(0) @binding(2) var x_10 : buf2; var x_GLF_color : vec4; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl index b2e865074d..eb55b501d3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -84,11 +84,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl index f99a3bc3bb..a353c900d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -83,11 +83,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl index 4aa9d43105..f74488d161 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-val-cfg-case-fallthrough/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -31,11 +31,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl index 00262c589b..b301222515 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl index 4c3b34b2b0..18e91bca51 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl index 36afb2ff63..d5df523b50 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; fn main_1() { var a : i32; @@ -35,11 +35,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl index c80f33202b..5cd4d7e5ac 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -55,11 +55,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl index 240d9d9bc0..d54fa3d2d6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl @@ -1,28 +1,28 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf2 { x_GLF_uniform_uint_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -type Arr_2 = [[stride(16)]] array; +type Arr_2 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_2; }; -[[group(0), binding(2)]] var x_6 : buf2; +@group(0) @binding(2) var x_6 : buf2; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; fn main_1() { var f : f32; @@ -45,11 +45,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl index 2c1e64235c..6e1e0ba927 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl @@ -1,10 +1,10 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -149,11 +149,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl index da47422c58..22314e64da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-uniform-incident/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { quarter : f32; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl index 941df15051..50fc802185 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-inc-unused-comp/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : i32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -27,11 +27,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl index 5be733957f..d431a77cc1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-dce-unused-component/0-opt.wgsl @@ -18,11 +18,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl index 2cecb75f66..d7062ee15c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-vector-log2-cosh/0-opt.wgsl @@ -14,11 +14,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl index c5a944928f..85f68d3d43 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -55,11 +55,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl index 9a7681c93b..007b027f5e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl @@ -1,20 +1,20 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr_1; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_8 : buf1; +@group(0) @binding(1) var x_8 : buf1; fn main_1() { var v1 : vec2; @@ -50,11 +50,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl index f3f84a4e4a..549b310ad7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl @@ -1,28 +1,28 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_uint_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf2 { x_GLF_uniform_float_values : Arr_1; }; -type Arr_2 = [[stride(16)]] array; +type Arr_2 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_2; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(2)]] var x_8 : buf2; +@group(0) @binding(2) var x_8 : buf2; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_12 : buf0; +@group(0) @binding(0) var x_12 : buf0; fn main_1() { var a : u32; @@ -51,11 +51,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl index 814eae3710..854255fd66 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf1 { x_GLF_uniform_float_values : Arr; }; -type Arr_1 = [[stride(16)]] array; +type Arr_1 = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr_1; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -103,11 +103,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl index 8551242416..4440fe2fbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-selection-dag-struct-array-clamp-index/0-opt.wgsl @@ -4,13 +4,13 @@ struct S { c : i32; }; -type Arr = [[stride(16)]] array; +type Arr = @stride(16) array; struct buf0 { x_GLF_uniform_int_values : Arr; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl index d154e28acf..54c80fce89 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -87,12 +87,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl index 765114d28f..6f1e3d15f4 100644 --- a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl @@ -6,9 +6,9 @@ struct buf1 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_4 : theSSBO; +@group(0) @binding(0) var x_4 : theSSBO; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; fn main_1() { var i : i32; @@ -101,7 +101,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl index c416382ea2..8a5dbfb712 100644 --- a/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/disc-and-add-in-func-in-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -65,11 +65,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl index 549895bbe9..0be3eee82f 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-continue-return/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,12 +44,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl index 6981641f24..d043efa31a 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl @@ -32,12 +32,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl index 8ff5ce8a08..724ac94e46 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop-in-function/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -39,12 +39,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl index 83948cea44..12ab32e588 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl @@ -50,12 +50,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl index 926c2733d8..8d86b693d4 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl @@ -33,12 +33,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl index c2fa551b12..e826d0a50c 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl @@ -43,11 +43,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl index 45e2a650dd..9784c8bd9a 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -64,11 +64,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl index 2c077a3f5b..60ed7c95aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-loop-in-conditionals/0-opt.wgsl @@ -24,12 +24,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl index 82a7bae3c2..1267e469bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl @@ -2,7 +2,7 @@ struct theSSBO { out_data : i32; }; -[[group(0), binding(0)]] var x_4 : theSSBO; +@group(0) @binding(0) var x_4 : theSSBO; fn main_1() { var x_30 : mat2x2; @@ -37,7 +37,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl index c02f2ce60f..b468753339 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -73,12 +73,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl index 3817d55940..bf208d3d67 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/for-condition-always-false/0-opt.wgsl @@ -31,11 +31,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color); diff --git a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl index 1478c3bd3b..f8bd3f3f12 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/for-loop-with-return/0.wgsl @@ -17,11 +17,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl index 869d8a9365..0eff67b879 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl @@ -31,12 +31,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl index 64ef6161b2..1eefb0f3b0 100644 --- a/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/frag-coord-func-call-and-ifs/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var gl_FragCoord : vec4; @@ -77,12 +77,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl index 2fffb928cf..2285d252b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/function-with-uniform-return/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -50,12 +50,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl index 999c03af15..b57810b3f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { one : f32; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -139,11 +139,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl index 7948d49cea..58d409d561 100644 --- a/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/if-and-switch/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl index 944e5891e5..751210a8f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -261,12 +261,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl index 8d4edc0bb4..b98eed5a46 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -100,11 +100,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl index 132e8f09d8..10bf29ad4c 100644 --- a/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/int-mat2-struct/0-opt.wgsl @@ -34,12 +34,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl index 2002e510a4..c8a6e2228b 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -73,11 +73,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl index b8234b51c2..f4302e5431 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl index eb27e35f23..14c39b05e0 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl @@ -6,7 +6,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -80,11 +80,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl index ee6e11e179..b582c1b29f 100644 --- a/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/matrices-and-return-in-loop/0.wgsl @@ -25,12 +25,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl index 03312ac950..235bcc2171 100644 --- a/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/max-mix-conditional-discard/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var gv : vec4; @@ -28,11 +28,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl index 99c613ea6d..7dbb3e07a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl @@ -11,11 +11,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl index a1058d6c92..599f7fb672 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -61,12 +61,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl index f37535cba2..e5ed27a570 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-loops-with-return/0-opt.wgsl @@ -31,12 +31,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl index 515f38a6d4..ae18c572cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var i : i32; @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl index 1921a1cb46..0f6d9e54fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -109,11 +109,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl index ac98e18a56..a1432ca5a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/nested-switch-break-discard/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var gl_FragCoord : vec4; @@ -36,12 +36,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl index 3a6e54e186..428f9a3630 100644 --- a/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/one-sized-array/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var x_10 : array; @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl index c9c712e3b9..610bceda7a 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/return-float-from-while-loop/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -43,12 +43,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl index 8e2cc4c114..f16375f9e9 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl @@ -49,11 +49,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl index def43264d0..3be5acbb6d 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/return-inside-loop-in-function/0.wgsl @@ -63,11 +63,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl index dc15751873..39c139e376 100644 --- a/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/returned-boolean-in-vector/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -101,11 +101,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl index ff67040d65..96f0064623 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl @@ -6,7 +6,7 @@ var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { loop { @@ -89,12 +89,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl index 6af14a088e..077959b605 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gv : f32; @@ -66,12 +66,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl index 3f8d86d946..23403a2458 100644 --- a/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/smoothstep-after-loop/0-opt.wgsl @@ -21,11 +21,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl index df653e8a7e..f45ccdd434 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var map : array; @@ -335,12 +335,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl index 532521f560..fd017fbac9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -184,12 +184,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl index ec923c069b..8ab78ee61e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -189,12 +189,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl index 2081172c5c..bbc0147f7a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -43,12 +43,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl index f104dd32e6..eace056231 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,12 +44,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl index 57ef3098ed..e9cce2eb18 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -81,12 +81,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl index 57c00069ee..0ee298a25b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -86,12 +86,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl index 8400b6721b..b09ced54d2 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var map : array; @@ -344,12 +344,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl index 4d73d20add..3d8680eb79 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_20 : buf0; +@group(0) @binding(0) var x_20 : buf0; var x_GLF_color : vec4; @@ -100,12 +100,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl index 1d54a262f6..1deee30812 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_20 : buf0; +@group(0) @binding(0) var x_20 : buf0; var x_GLF_color : vec4; @@ -101,12 +101,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl index e41e03c082..12607ba22f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl @@ -10,13 +10,13 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_32 : buf1; +@group(0) @binding(1) var x_32 : buf1; fn merge_i1_i1_i1_(from : ptr, mid : ptr, to : ptr) { var k : i32; @@ -299,12 +299,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl index 39cf66940f..2e55508dc3 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl @@ -10,13 +10,13 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_32 : buf1; +@group(0) @binding(1) var x_32 : buf1; fn merge_i1_i1_i1_(from : ptr, mid : ptr, to : ptr) { var k : i32; @@ -303,12 +303,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl index 7899f1bf76..2a098b038e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl @@ -8,9 +8,9 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -106,12 +106,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl index 6d8202a3aa..78974c66e8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl @@ -8,9 +8,9 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -106,12 +106,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl index 03f5d4aaec..c38f746f34 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl @@ -10,13 +10,13 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_32 : buf1; +@group(0) @binding(1) var x_32 : buf1; fn merge_i1_i1_i1_(from : ptr, mid : ptr, to : ptr) { var k : i32; @@ -303,12 +303,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl index 0c19b19cd9..333d424938 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl @@ -644,11 +644,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl index 62fb33d838..f8056fa45c 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -84,12 +84,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl index 913b37e93c..016470fcf1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -47,12 +47,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl index 8954930f28..310e34e027 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -44,12 +44,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl index 6ee1e3fc2e..e666f6f72d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl @@ -8,9 +8,9 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var x_GLF_color : vec4; @@ -126,12 +126,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl index ce2fc53eaf..9564b95ced 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl @@ -8,9 +8,9 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_9 : buf1; +@group(0) @binding(1) var x_9 : buf1; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var x_GLF_color : vec4; @@ -183,12 +183,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl index 502e8b75e5..dba55584f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -50,12 +50,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl index 0f6f3db951..188c3b92fc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -57,12 +57,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl index 3626dd381f..a57be404ae 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -184,12 +184,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl index a2c109a84d..f652923568 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var map : array; @@ -379,12 +379,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl index 1012c1f706..26ad9ba388 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var map : array; @@ -341,12 +341,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl index 633a6d515d..322b118918 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var gl_FragCoord : vec4; @@ -328,12 +328,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl index bafcb6da06..b480a86be3 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var gl_FragCoord : vec4; @@ -325,12 +325,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl index 5b0e2fef55..066c0aceaf 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -293,12 +293,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl index 2f33bdbdb8..a61c509c74 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -308,12 +308,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl index f9628e73e7..c1fb4811f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -401,12 +401,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl index 1007714a9b..4b36bd51a5 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -400,12 +400,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl index c2695fb13e..8c64b73f74 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -291,12 +291,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl index 90086b833e..ac0f111b6d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -288,12 +288,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl index 6c17b275bd..66ff6afc75 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -92,12 +92,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl index 6821821021..7f55decde4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -95,12 +95,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl index 6afaa07c35..49dd9adde4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -92,12 +92,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl index 12209a375e..a7bed313ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -96,12 +96,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl index a28de2c875..4f2ceb52fc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -93,12 +93,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl index af34df2a89..67a46a05c9 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -93,12 +93,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl index fdca5df37e..6bceeee9be 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -86,12 +86,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl index de4a473326..ddb40942af 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var x_GLF_color : vec4; @@ -71,12 +71,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl index 8ec24b126a..93009378e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var x_GLF_color : vec4; @@ -77,12 +77,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl index bb41ccf7a2..339dc235f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl @@ -10,7 +10,7 @@ var obj : QuicksortObject; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_32 : buf0; +@group(0) @binding(0) var x_32 : buf0; var x_GLF_color : vec4; @@ -243,12 +243,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl index 843a743052..e30253eb34 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl @@ -10,7 +10,7 @@ var obj : QuicksortObject; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_32 : buf0; +@group(0) @binding(0) var x_32 : buf0; var x_GLF_color : vec4; @@ -243,12 +243,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl index 9c263294f7..45b69b1c79 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -90,12 +90,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl index 2f0c558d5c..31783ae8cc 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -87,12 +87,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl index 76d569eae2..fb898a5ac8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl @@ -642,11 +642,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl index dcb31b38d1..5e42687109 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl @@ -8,7 +8,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var gl_FragCoord : vec4; @@ -964,12 +964,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl index 0016d4c9ea..fa23bb3448 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl @@ -253,11 +253,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl index 4d268f6d6b..a546ac55e9 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl @@ -265,12 +265,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl index 1f17892d13..571ad7a9ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl @@ -10,7 +10,7 @@ struct buf0 { var tree_1 : array; -[[group(0), binding(0)]] var x_16 : buf0; +@group(0) @binding(0) var x_16 : buf0; var x_GLF_color : vec4; @@ -281,11 +281,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl index 19d6c9d74f..495c99b288 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl @@ -253,11 +253,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl index 80872f45ee..3831d375ea 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl @@ -16,7 +16,7 @@ var obj : QuicksortObject; var tree : array; -[[group(0), binding(0)]] var x_50 : buf0; +@group(0) @binding(0) var x_50 : buf0; var x_GLF_color : vec4; @@ -307,11 +307,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl index e1656b77ea..1eb7ba1db2 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -55,12 +55,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl index eaaaea2655..9c0e90882d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl @@ -6,9 +6,9 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(1)]] var x_6 : buf1; +@group(0) @binding(1) var x_6 : buf1; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var gl_FragCoord : vec4; @@ -205,12 +205,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl index b30f116035..c51aa779a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var gl_FragCoord : vec4; @@ -103,12 +103,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl index 75204197f2..c089d3bc82 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl @@ -6,13 +6,13 @@ struct buf1 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var gl_FragCoord : vec4; var x_GLF_color : vec4; -[[group(0), binding(1)]] var x_20 : buf1; +@group(0) @binding(1) var x_20 : buf1; fn compute_value_f1_f1_(limit : ptr, thirty_two : ptr) -> f32 { var result : f32; @@ -119,12 +119,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl index 848cfcdc61..f0d8b2037d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var gl_FragCoord : vec4; @@ -106,12 +106,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl index 046ec18300..c1ee8ba0a4 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl @@ -6,11 +6,11 @@ struct buf1 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_16 : buf1; +@group(0) @binding(1) var x_16 : buf1; var x_GLF_color : vec4; @@ -120,12 +120,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl index f3cb6eb1f8..c97f756713 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl @@ -6,11 +6,11 @@ struct buf1 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_19 : buf1; +@group(0) @binding(1) var x_19 : buf1; var x_GLF_color : vec4; @@ -135,12 +135,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl index 3bafe4434d..ebbb314f24 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_13 : buf0; +@group(0) @binding(0) var x_13 : buf0; var gl_FragCoord : vec4; @@ -108,12 +108,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl index eca86f428c..5fd4664943 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl @@ -8,7 +8,7 @@ var temp : array; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_34 : buf0; +@group(0) @binding(0) var x_34 : buf0; var x_GLF_color : vec4; @@ -327,12 +327,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl index 30d100daa7..f58028b2ff 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var gl_FragCoord : vec4; @@ -331,12 +331,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl index 13e696506c..b471144aea 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl @@ -6,7 +6,7 @@ var data : array; var temp : array; -[[group(0), binding(0)]] var x_28 : buf0; +@group(0) @binding(0) var x_28 : buf0; var gl_FragCoord : vec4; @@ -303,12 +303,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl index a800ba961d..d6dc1aea14 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl @@ -10,7 +10,7 @@ var obj : QuicksortObject; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_34 : buf0; +@group(0) @binding(0) var x_34 : buf0; var x_GLF_color : vec4; @@ -267,12 +267,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl index c3d31af96c..cf9871e392 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl @@ -12,7 +12,7 @@ var x_GLF_FragCoord : vec4; var x_GLF_pos : vec4; -[[group(0), binding(0)]] var x_34 : buf0; +@group(0) @binding(0) var x_34 : buf0; var frag_color : vec4; @@ -249,14 +249,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) frag_color_1 : vec4; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_GLF_pos_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) x_GLF_pos_param : vec4) -> main_out { x_GLF_pos = x_GLF_pos_param; main_1(); return main_out(frag_color, gl_Position); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl index b7d3ed1cb9..99980d9a6e 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/1.wgsl @@ -9,12 +9,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(0)]] frag_color_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(0) frag_color_param : vec4) -> main_out { frag_color = frag_color_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl index 7a241666d3..71d617e6d6 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl @@ -16,9 +16,9 @@ var x_GLF_FragCoord : vec4; var x_GLF_pos : vec4; -[[group(0), binding(0)]] var x_33 : buf0; +@group(0) @binding(0) var x_33 : buf0; -[[group(0), binding(1)]] var x_36 : buf1; +@group(0) @binding(1) var x_36 : buf1; var frag_color : vec4; @@ -260,14 +260,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) frag_color_1 : vec4; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_GLF_pos_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) x_GLF_pos_param : vec4) -> main_out { x_GLF_pos = x_GLF_pos_param; main_1(); return main_out(frag_color, gl_Position); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl index a6b6c61589..877d1cb127 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl @@ -12,7 +12,7 @@ var x_GLF_FragCoord : vec4; var x_GLF_pos : vec4; -[[group(0), binding(0)]] var x_34 : buf0; +@group(0) @binding(0) var x_34 : buf0; var frag_color : vec4; @@ -247,14 +247,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) frag_color_1 : vec4; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_GLF_pos_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) x_GLF_pos_param : vec4) -> main_out { x_GLF_pos = x_GLF_pos_param; main_1(); return main_out(frag_color, gl_Position); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl index 89fc186502..ad578ea86d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl @@ -12,7 +12,7 @@ var x_GLF_FragCoord : vec4; var x_GLF_pos : vec4; -[[group(0), binding(0)]] var x_34 : buf0; +@group(0) @binding(0) var x_34 : buf0; var frag_color : vec4; @@ -253,14 +253,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) frag_color_1 : vec4; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_GLF_pos_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) x_GLF_pos_param : vec4) -> main_out { x_GLF_pos = x_GLF_pos_param; main_1(); return main_out(frag_color, gl_Position); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl index 8f8de069f9..fe18daa1fb 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl @@ -16,9 +16,9 @@ var x_GLF_FragCoord : vec4; var x_GLF_pos : vec4; -[[group(0), binding(1)]] var x_34 : buf1; +@group(0) @binding(1) var x_34 : buf1; -[[group(0), binding(0)]] var x_37 : buf0; +@group(0) @binding(0) var x_37 : buf0; var frag_color : vec4; @@ -258,14 +258,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) frag_color_1 : vec4; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_GLF_pos_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) x_GLF_pos_param : vec4) -> main_out { x_GLF_pos = x_GLF_pos_param; main_1(); return main_out(frag_color, gl_Position); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl index 518cf6bad4..448c4ce4a7 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_20 : buf0; +@group(0) @binding(0) var x_20 : buf0; var x_GLF_color : vec4; @@ -113,12 +113,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl index 697b608a12..c2deab3852 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_24 : buf0; +@group(0) @binding(0) var x_24 : buf0; var x_GLF_color : vec4; @@ -130,12 +130,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl index 357f622268..6aa6b5315e 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_24 : buf0; +@group(0) @binding(0) var x_24 : buf0; var x_GLF_color : vec4; @@ -121,12 +121,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl index 048a25ebf0..2c60f19833 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.wgsl @@ -2,7 +2,7 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(0)]] var x_15 : buf0; +@group(0) @binding(0) var x_15 : buf0; var gl_FragCoord : vec4; @@ -150,12 +150,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl index 12eb944756..1f81ee1469 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_24 : buf0; +@group(0) @binding(0) var x_24 : buf0; var x_GLF_color : vec4; @@ -121,12 +121,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl index 6b3a7b03b6..7ba773c9d8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_17 : buf0; +@group(0) @binding(0) var x_17 : buf0; var x_GLF_color : vec4; @@ -115,12 +115,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl index acb40bf508..a3eecf8675 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl @@ -6,13 +6,13 @@ struct buf0 { resolution : vec2; }; -[[group(0), binding(1)]] var x_11 : buf1; +@group(0) @binding(1) var x_11 : buf1; var x_GLF_color : vec4; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_19 : buf0; +@group(0) @binding(0) var x_19 : buf0; fn pointInTriangle_vf2_vf2_vf2_vf2_(p : ptr>, a : ptr>, b : ptr>, c : ptr>) -> i32 { var x_78 : f32; @@ -159,12 +159,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl index f28293aab0..5540bb1e9b 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl @@ -10,7 +10,7 @@ struct buf0 { var struct_array : array; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -39,11 +39,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl index a46cd46bf2..646af01fef 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl @@ -7,7 +7,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var x_GLF_color : vec4; @@ -40,11 +40,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl index 0ea59c0e26..703abb7740 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/struct-used-as-temporary/0-opt.wgsl @@ -8,7 +8,7 @@ struct S_1 { var x_3 : vec4; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; fn main_1() { let x_20 : vec4 = x_5.field0; @@ -20,11 +20,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_3_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_3); diff --git a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl index 1fe34370a0..148481e602 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-if-discard/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -24,11 +24,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl index 027c6a76b9..121453e213 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-inside-while-always-return/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { zero : f32; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -43,11 +43,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl index a458da5bbe..893499ce4a 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -62,11 +62,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl index cdab78bd87..95517da499 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-empty-if-false/0.wgsl @@ -14,11 +14,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl index 7c355bb377..718f25785c 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -62,11 +62,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl index cf0d932758..6199c0e30c 100644 --- a/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/transpose-rectangular-matrix/0.wgsl @@ -29,12 +29,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl index d9ba1c9257..f5a69b747f 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl @@ -6,7 +6,7 @@ var x_GLF_color : vec4; var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; fn main_1() { var odd_index : i32; @@ -97,12 +97,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl index 73c71d0510..3588452db7 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct doesNotMatter { x_compute_data : RTArr; @@ -10,9 +10,9 @@ struct doesNotMatter { var GLF_live2gl_FragCoord : vec4; -[[group(0), binding(1)]] var x_9 : buf0; +@group(0) @binding(1) var x_9 : buf0; -[[group(0), binding(0)]] var x_12 : doesNotMatter; +@group(0) @binding(0) var x_12 : doesNotMatter; fn main_1() { var GLF_live2_looplimiter1 : i32; @@ -91,7 +91,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 18, 6)]] +@stage(compute) @workgroup_size(1, 18, 6) fn main() { main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl index 3177b795f7..e307b1eb3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl @@ -2,7 +2,7 @@ struct buf0 { matrix_a_uni : mat4x4; }; -[[group(0), binding(0)]] var x_8 : buf0; +@group(0) @binding(0) var x_8 : buf0; var x_GLF_color : vec4; @@ -57,11 +57,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl index 027fc0fe52..c2ae08c612 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl @@ -7,7 +7,7 @@ struct StructType { bbbb : vec4; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -67,11 +67,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl index a5541a28ca..6fd343d8e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl @@ -56,11 +56,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl index b68fb061a7..fff1f46f41 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -80,12 +80,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl index 21c6a7be91..e38b6c6160 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl @@ -1,10 +1,10 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct doesNotMatter { x_compute_data : RTArr; }; -[[group(0), binding(0)]] var x_9 : doesNotMatter; +@group(0) @binding(0) var x_9 : doesNotMatter; fn nb_mod_() -> f32 { var s : f32; @@ -55,7 +55,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl index 2124377936..4ac1a23ad1 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-assign-in-infinite-loop/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var GLF_dead6index : i32; @@ -30,11 +30,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl index b6321d8d13..e684e37ad9 100644 --- a/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/undefined-integer-in-function/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn performPartition_() -> i32 { var GLF_live0i : i32; @@ -60,11 +60,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl index dd736564a2..91df442b69 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/uninit-element-cast-in-loop/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; var x_GLF_color : vec4; @@ -32,11 +32,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl index 3b84978d61..fbd4862a3f 100644 --- a/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/uninitialized-var-decrement-and-add/0-opt.wgsl @@ -22,12 +22,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl index aed1aee720..5df2899495 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl @@ -6,7 +6,7 @@ struct buf2 { resolution : vec2; }; -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct doesNotMatter { x_compute_data : RTArr; @@ -14,11 +14,11 @@ struct doesNotMatter { var gl_GlobalInvocationID : vec3; -[[group(0), binding(1)]] var x_10 : buf1; +@group(0) @binding(1) var x_10 : buf1; -[[group(0), binding(2)]] var x_13 : buf2; +@group(0) @binding(2) var x_13 : buf2; -[[group(0), binding(0)]] var x_15 : doesNotMatter; +@group(0) @binding(0) var x_15 : doesNotMatter; fn main_1() { var A : array; @@ -135,8 +135,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] gl_GlobalInvocationID_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) gl_GlobalInvocationID_param : vec3) { gl_GlobalInvocationID = gl_GlobalInvocationID_param; main_1(); } diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl index a7740fea68..f448ed42f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-continue-statement/0.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; fn computeColor_() -> vec3 { var x_injected_loop_counter : i32; @@ -32,11 +32,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl index 54af3d3c10..d4b87d83f5 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement-in-if/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_7 : buf0; +@group(0) @binding(0) var x_7 : buf0; var gl_FragCoord : vec4; @@ -35,12 +35,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl index 473428ad4f..6c9505440f 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl @@ -52,11 +52,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl index e6da47e5f9..2fc3c26932 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_5 : buf0; +@group(0) @binding(0) var x_5 : buf0; fn main_1() { var m : i32; @@ -34,11 +34,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl index 005fa198de..4fbd06f219 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-return-in-loop/0.wgsl @@ -38,11 +38,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl index bd4cfadacd..2606dcd679 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl @@ -37,11 +37,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl index 3761ab16c4..e5dac5c727 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var gl_FragCoord : vec4; -[[group(0), binding(0)]] var x_10 : buf0; +@group(0) @binding(0) var x_10 : buf0; var x_GLF_color : vec4; @@ -99,12 +99,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl index 3461a66bea..83ac1634e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/vectors-and-discard-in-function/0.wgsl @@ -29,11 +29,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl index 9770d45729..1cb22a3901 100644 --- a/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/while-function-always-false/0-opt.wgsl @@ -4,7 +4,7 @@ struct buf0 { var x_GLF_color : vec4; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; fn main_1() { var j : i32; @@ -35,11 +35,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl index ad7b1a1643..1aded6e140 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injected : i32; }; -[[group(0), binding(0)]] var x_9 : buf0; +@group(0) @binding(0) var x_9 : buf0; var x_GLF_color : vec4; @@ -94,11 +94,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl index 086a895c10..b0aa989e5a 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl @@ -15,7 +15,7 @@ struct Obj { var tree_1 : array; -[[group(0), binding(0)]] var x_27 : buf0; +@group(0) @binding(0) var x_27 : buf0; var gl_FragCoord : vec4; @@ -407,12 +407,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl index dd185738e1..dbb226ab3d 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl @@ -87,11 +87,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl index aabebad527..acfcdf2fcf 100644 --- a/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl +++ b/test/vk-gl-cts/graphicsfuzz/wrong-color-in-always-false-if/0-opt.wgsl @@ -2,7 +2,7 @@ struct buf0 { injectionSwitch : vec2; }; -[[group(0), binding(0)]] var x_6 : buf0; +@group(0) @binding(0) var x_6 : buf0; var x_GLF_color : vec4; @@ -19,11 +19,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_GLF_color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(x_GLF_color); diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl index ef817f7103..6b386e9b86 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(4)]] array; +type Arr = @stride(4) array; struct In2 { data_in2 : Arr; }; -type Arr_1 = [[stride(4)]] array; +type Arr_1 = @stride(4) array; struct Out0 { data_out0 : Arr_1; }; -type Arr_2 = [[stride(4)]] array; +type Arr_2 = @stride(4) array; -type Arr_3 = [[stride(4)]] array; +type Arr_3 = @stride(4) array; struct In1 { data_in1 : Arr_3; @@ -24,13 +24,13 @@ struct In0 { var gl_WorkGroupID : vec3; -[[group(0), binding(2)]] var x_13 : In2; +@group(0) @binding(2) var x_13 : In2; -[[group(0), binding(3)]] var x_15 : Out0; +@group(0) @binding(3) var x_15 : Out0; -[[group(0), binding(1)]] var x_17 : In1; +@group(0) @binding(1) var x_17 : In1; -[[group(0), binding(0)]] var x_19 : In0; +@group(0) @binding(0) var x_19 : In0; fn main_1() { var base_index_in : u32; @@ -109,8 +109,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(4, 1, 1)]] -fn main([[builtin(workgroup_id)]] gl_WorkGroupID_param : vec3) { +@stage(compute) @workgroup_size(4, 1, 1) +fn main(@builtin(workgroup_id) gl_WorkGroupID_param : vec3) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl index 7665283ee6..646cf0fb0e 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl @@ -1,18 +1,18 @@ -type Arr = [[stride(4)]] array; +type Arr = @stride(4) array; struct In2 { data_in2 : Arr; }; -type Arr_1 = [[stride(4)]] array; +type Arr_1 = @stride(4) array; struct Out0 { data_out0 : Arr_1; }; -type Arr_2 = [[stride(4)]] array; +type Arr_2 = @stride(4) array; -type Arr_3 = [[stride(4)]] array; +type Arr_3 = @stride(4) array; struct In0 { data_in0 : Arr_3; @@ -24,13 +24,13 @@ struct In1 { var gl_WorkGroupID : vec3; -[[group(0), binding(2)]] var x_13 : In2; +@group(0) @binding(2) var x_13 : In2; -[[group(0), binding(3)]] var x_15 : Out0; +@group(0) @binding(3) var x_15 : Out0; -[[group(0), binding(0)]] var x_17 : In0; +@group(0) @binding(0) var x_17 : In0; -[[group(0), binding(1)]] var x_19 : In1; +@group(0) @binding(1) var x_19 : In1; fn main_1() { var base_index_in : u32; @@ -109,8 +109,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(4, 1, 1)]] -fn main([[builtin(workgroup_id)]] gl_WorkGroupID_param : vec3) { +@stage(compute) @workgroup_size(4, 1, 1) +fn main(@builtin(workgroup_id) gl_WorkGroupID_param : vec3) { gl_WorkGroupID = gl_WorkGroupID_param; main_1(); } diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl index c1d101cf7b..a4fc5616d3 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/0.wgsl @@ -6,11 +6,11 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_1 : vec4; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color); diff --git a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl index 702b11784d..6f3e895cb4 100644 --- a/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl +++ b/test/vk-gl-cts/rasterization/line_continuity/line-strip/1.wgsl @@ -1,6 +1,6 @@ var color_out : vec4; -[[group(0), binding(0)]] var texture : texture_2d; +@group(0) @binding(0) var texture : texture_2d; var gl_FragCoord : vec4; @@ -12,12 +12,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(color_out); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl index 2b3b645115..dfcbf44018 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl @@ -2,15 +2,15 @@ struct Buf1 { result : i32; }; -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct Buf0 { values : RTArr; }; -[[group(0), binding(1)]] var x_4 : Buf1; +@group(0) @binding(1) var x_4 : Buf1; -[[group(0), binding(0)]] var x_7 : Buf0; +@group(0) @binding(0) var x_7 : Buf0; fn main_1() { var i : u32; @@ -37,7 +37,7 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] +@stage(compute) @workgroup_size(1, 1, 1) fn main() { main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl index 0fee5ee567..bed026cd99 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthan/0.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; -[[group(0), binding(2)]] var x_7 : S; +@group(0) @binding(2) var x_7 : S; fn main_1() { let x_21 : u32 = x_2.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl index cf2536e2ef..98535f66fa 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_sgreaterthanequal/0.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; -[[group(0), binding(2)]] var x_7 : S; +@group(0) @binding(2) var x_7 : S; fn main_1() { let x_21 : u32 = x_2.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl index f842e247fe..516e08b083 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthan/0.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; -[[group(0), binding(2)]] var x_7 : S; +@group(0) @binding(2) var x_7 : S; fn main_1() { let x_21 : u32 = x_2.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl index 21548c68dc..fc4ae4a064 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_int_compare/uint_slessthanequal/0.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; -[[group(0), binding(2)]] var x_7 : S; +@group(0) @binding(2) var x_7 : S; fn main_1() { let x_21 : u32 = x_2.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl index 51319acd52..4f4872e06c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,13 +6,13 @@ struct S { var x_3 : vec3; -[[group(0), binding(0)]] var x_6 : S; +@group(0) @binding(0) var x_6 : S; -[[group(0), binding(1)]] var x_7 : S; +@group(0) @binding(1) var x_7 : S; -[[group(0), binding(2)]] var x_8 : S; +@group(0) @binding(2) var x_8 : S; -[[group(0), binding(3)]] var x_9 : S; +@group(0) @binding(3) var x_9 : S; fn main_1() { let x_26 : u32 = x_3.x; @@ -23,8 +23,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_3_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_3_param : vec3) { x_3 = x_3_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl index 8abb109a25..0a7a6fdf57 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,9 +6,9 @@ struct S { var x_3 : vec3; -[[group(0), binding(0)]] var x_6 : S; +@group(0) @binding(0) var x_6 : S; -[[group(0), binding(1)]] var x_7 : S; +@group(0) @binding(1) var x_7 : S; fn main_1() { let x_21 : u32 = x_3.x; @@ -17,8 +17,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_3_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_3_param : vec3) { x_3 = x_3_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl index fce79f0453..52902a47af 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,13 +6,13 @@ struct S { var x_3 : vec3; -[[group(0), binding(0)]] var x_6 : S; +@group(0) @binding(0) var x_6 : S; -[[group(0), binding(1)]] var x_7 : S; +@group(0) @binding(1) var x_7 : S; -[[group(0), binding(2)]] var x_8 : S; +@group(0) @binding(2) var x_8 : S; -[[group(0), binding(3)]] var x_9 : S; +@group(0) @binding(3) var x_9 : S; fn main_1() { let x_23 : u32 = x_3.x; @@ -23,8 +23,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_3_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_3_param : vec3) { x_3 = x_3_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl index c21661d72b..04a0297efe 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_3 : vec3; -[[group(0), binding(0)]] var x_6 : S; +@group(0) @binding(0) var x_6 : S; -[[group(0), binding(1)]] var x_7 : S; +@group(0) @binding(1) var x_7 : S; -[[group(0), binding(2)]] var x_8 : S; +@group(0) @binding(2) var x_8 : S; fn main_1() { let x_21 : u32 = x_3.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_3_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_3_param : vec3) { x_3 = x_3_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl index f83857f2f8..fd0938cde5 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_3 : vec3; -[[group(0), binding(0)]] var x_6 : S; +@group(0) @binding(0) var x_6 : S; -[[group(0), binding(1)]] var x_7 : S; +@group(0) @binding(1) var x_7 : S; -[[group(0), binding(2)]] var x_8 : S; +@group(0) @binding(2) var x_8 : S; fn main_1() { let x_21 : u32 = x_3.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_3_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_3_param : vec3) { x_3 = x_3_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl index de05c79fdd..2bbbe0bcce 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_sdiv/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,11 +6,11 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; -[[group(0), binding(2)]] var x_7 : S; +@group(0) @binding(2) var x_7 : S; fn main_1() { let x_20 : u32 = x_2.x; @@ -20,8 +20,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl index 3e60e98743..f34494afc1 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -6,9 +6,9 @@ struct S { var x_2 : vec3; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; -[[group(0), binding(1)]] var x_6 : S; +@group(0) @binding(1) var x_6 : S; fn main_1() { let x_20 : u32 = x_2.x; @@ -17,8 +17,8 @@ fn main_1() { return; } -[[stage(compute), workgroup_size(1, 1, 1)]] -fn main([[builtin(global_invocation_id)]] x_2_param : vec3) { +@stage(compute) @workgroup_size(1, 1, 1) +fn main(@builtin(global_invocation_id) x_2_param : vec3) { x_2 = x_2_param; main_1(); } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl index eef9fd15a4..5c734e34aa 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/float32/comparison/frexpstruct_1_frag/0.wgsl @@ -14,14 +14,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : u32; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_3_param : vec2) -> main_out { +@stage(vertex) +fn main(@location(0) x_3_param : vec2) -> main_out { x_3 = x_3_param; main_1(); return main_out(x_4, gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl index bf7b1a4ab1..74923daa87 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl index 48a9583a80..1c90a4885a 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_equal/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color_out, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl index 574d2de18a..5707fa3ceb 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl index df3c7e3256..1620bac400 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_greater/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color_out, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl index f3aec87ce9..507511d2a3 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl index 8bf833ae8f..d20dbea80b 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_less_or_equal/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color_out, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl index 1cc00dd49d..6e13950079 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl index 50511693c4..eabe436e58 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/early_fragment/depth_not_equal/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(color_out, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl index 788ee5b2e9..ac55a23c86 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_1/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl index f71b32002d..7b8521463c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl index b6e0701d00..1566cc91f8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthgreater_2/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl index 9f726a7476..310e6db9ab 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_0/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl index bc535caa16..293f469862 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthless_2/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl index 0fe24e6ab7..269e7da484 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_0/1.wgsl @@ -12,14 +12,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl index 04a6db7787..656c0edee8 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_2/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl index f6cb3ea08f..7c01a5cb40 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/graphics/execution_mode/depthunchanged_3/1.wgsl @@ -9,13 +9,13 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) outColor_1 : vec4; - [[builtin(frag_depth)]] + @builtin(frag_depth) gl_FragDepth_1 : f32; }; -[[stage(fragment)]] +@stage(fragment) fn main() -> main_out { main_1(); return main_out(outColor, gl_FragDepth); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl index 081740c776..1ab42ae3df 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/spirv1p4/hlsl_functionality1/decorate_string/0.wgsl @@ -12,14 +12,14 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; - [[location(0)]] + @location(0) pos_1 : u32; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec4) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec4) -> main_out { position = position_param; main_1(); return main_out(gl_Position, pos); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl index 9959aa6072..0e32731420 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_atomic/0-opt.wgsl @@ -14,14 +14,14 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] x_2_param : vec3, [[location(1)]] x_3_param : i32) -> main_out { +@stage(vertex) +fn main(@location(0) x_2_param : vec3, @location(1) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl index 0f3c7320e5..2cd673efdf 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl @@ -4,7 +4,7 @@ var x_3 : i32; var x_4 : i32; -[[group(0), binding(0)]] var x_5 : texture_storage_2d; +@group(0) @binding(0) var x_5 : texture_storage_2d; fn main_1() { x_4 = 1; @@ -19,12 +19,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.glsl index f63590e964..34862ac25e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl:27:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -62,7 +62,7 @@ void main() { Error parsing GLSL shader: ERROR: 0:45: 'int' : must be qualified as flat in -ERROR: 0:45: '' : compilation terminated +ERROR: 0:45: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl index affcd631f4..07e6992bab 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl @@ -14,12 +14,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.glsl index c7468bbf92..2da1cc80c4 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl:22:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -58,7 +58,7 @@ void main() { Error parsing GLSL shader: ERROR: 0:41: 'int' : must be qualified as flat in -ERROR: 0:41: '' : compilation terminated +ERROR: 0:41: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl index 3820a70371..e1c76c95b2 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.wgsl @@ -16,12 +16,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) out_data_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(out_data); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl index e0e933a000..a849b1d02c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl @@ -14,12 +14,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.glsl index 42a871760a..fe31b1c21e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl:22:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -59,7 +59,7 @@ void main() { Error parsing GLSL shader: ERROR: 0:42: 'int' : must be qualified as flat in -ERROR: 0:42: '' : compilation terminated +ERROR: 0:42: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl index fd8dd5f051..da18d1228d 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -10,7 +10,7 @@ var x_3 : i32; var x_4 : i32; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; fn main_1() { x_4 = 1; @@ -25,12 +25,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.glsl index 41b83dd6da..f7d8197967 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl:33:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -67,8 +67,8 @@ void main() { Error parsing GLSL shader: -ERROR: 0:5: '' : array size required -ERROR: 0:6: '' : compilation terminated +ERROR: 0:5: '' : array size required +ERROR: 0:6: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl index 4a8c8a7a3f..48083ee854 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl @@ -1,4 +1,4 @@ -type RTArr = [[stride(4)]] array; +type RTArr = @stride(4) array; struct S { field0 : RTArr; @@ -10,7 +10,7 @@ var x_3 : i32; var x_4 : i32; -[[group(0), binding(0)]] var x_5 : S; +@group(0) @binding(0) var x_5 : S; fn main_1() { x_4 = 1; @@ -25,12 +25,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.glsl index 4b8208ad75..6fe04b3c10 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl:33:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -68,8 +68,8 @@ void main() { Error parsing GLSL shader: -ERROR: 0:5: '' : array size required -ERROR: 0:6: '' : compilation terminated +ERROR: 0:5: '' : array size required +ERROR: 0:6: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl index 5142f3d897..78ca88f2f0 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl @@ -29,12 +29,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) x_4_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +@stage(fragment) +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { x_2 = x_2_param; x_3 = x_3_param; main_1(); diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.glsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.glsl index 2d61612d19..b9ab85df3c 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.glsl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.glsl @@ -1,7 +1,7 @@ SKIP: FAILED vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl:37:70 warning: integral user-defined fragment inputs must have a flat interpolation attribute -fn main([[builtin(position)]] x_2_param : vec4, [[location(0)]] x_3_param : i32) -> main_out { +fn main(@builtin(position) x_2_param : vec4, @location(0) x_3_param : i32) -> main_out { ^^^^^^^^^ #version 310 es @@ -73,7 +73,7 @@ void main() { Error parsing GLSL shader: ERROR: 0:56: 'int' : must be qualified as flat in -ERROR: 0:56: '' : compilation terminated +ERROR: 0:56: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl index cfebf749e2..e62f918783 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/0.wgsl @@ -9,12 +9,12 @@ fn main_1() { } struct main_out { - [[builtin(position)]] + @builtin(position) gl_Position : vec4; }; -[[stage(vertex)]] -fn main([[location(0)]] position_param : vec3) -> main_out { +@stage(vertex) +fn main(@location(0) position_param : vec3) -> main_out { position = position_param; main_1(); return main_out(gl_Position); diff --git a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl index a3e9f61490..bdf8be509a 100644 --- a/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl +++ b/test/vk-gl-cts/subgroup_uniform_control_flow/discard/subgroup_reconverge_discard00/2-opt.wgsl @@ -22,12 +22,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) expect_1 : i32; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(expect); diff --git a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl index cd7d76c70a..711a401966 100644 --- a/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl +++ b/test/vk-gl-cts/texture/subgroup_lod/texel_fetch/1.wgsl @@ -9,12 +9,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) color_out_1 : vec4; }; -[[stage(fragment)]] -fn main([[location(0)]] color_in_param : vec4) -> main_out { +@stage(fragment) +fn main(@location(0) color_in_param : vec4) -> main_out { color_in = color_in_param; main_1(); return main_out(color_out); diff --git a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl index 2130c1a52a..ac4ba8a0df 100644 --- a/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl +++ b/test/vk-gl-cts/texture/texel_offset/texel_offset/0-opt.wgsl @@ -10,12 +10,12 @@ fn main_1() { } struct main_out { - [[location(0)]] + @location(0) result_1 : vec4; }; -[[stage(fragment)]] -fn main([[builtin(position)]] gl_FragCoord_param : vec4) -> main_out { +@stage(fragment) +fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { gl_FragCoord = gl_FragCoord_param; main_1(); return main_out(result); diff --git a/tools/src/cmd/check-spec-examples/main.go b/tools/src/cmd/check-spec-examples/main.go index 733b34054b..760fb682df 100644 --- a/tools/src/cmd/check-spec-examples/main.go +++ b/tools/src/cmd/check-spec-examples/main.go @@ -202,7 +202,7 @@ type example struct { func tryCompile(compiler, wd string, e example) error { code := e.code if e.functionScope { - code = "\n[[stage(vertex)]] fn main() -> [[builtin(position)]] vec4 {\n" + code + " return vec4();}\n" + code = "\n@stage(vertex) fn main() -> @builtin(position) vec4 {\n" + code + " return vec4();}\n" } addedStubFunction := false @@ -213,7 +213,7 @@ func tryCompile(compiler, wd string, e example) error { } if !addedStubFunction { - code += "\n[[stage(vertex)]] fn main() {}\n" + code += "\n@stage(vertex) fn main() {}\n" addedStubFunction = true continue }