Update src/tint unittests to new @stage format.
This CL updates all of the Tint unittests to the new @stage shorter
syntax. This also updates the WGSL writer to emit the new short forms
instead of using the deprecated form.
Bug: tint:1503
Change-Id: I8c49e5319a19cccb5b4b5078f3ab39c50f31a9a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92483
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/test/tint/array/function_parameter.wgsl b/test/tint/array/function_parameter.wgsl
index 23de855..be06c51 100644
--- a/test/tint/array/function_parameter.wgsl
+++ b/test/tint/array/function_parameter.wgsl
@@ -10,7 +10,7 @@
return a[1][2][3];
}
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let a1 : array<f32, 4> = array<f32, 4>();
let a2 : array<array<f32, 4>, 3> = array<array<f32, 4>, 3>();
diff --git a/test/tint/array/function_parameter.wgsl.expected.wgsl b/test/tint/array/function_parameter.wgsl.expected.wgsl
index 23de855..be06c51 100644
--- a/test/tint/array/function_parameter.wgsl.expected.wgsl
+++ b/test/tint/array/function_parameter.wgsl.expected.wgsl
@@ -10,7 +10,7 @@
return a[1][2][3];
}
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let a1 : array<f32, 4> = array<f32, 4>();
let a2 : array<array<f32, 4>, 3> = array<array<f32, 4>, 3>();
diff --git a/test/tint/array/function_return_type.wgsl b/test/tint/array/function_return_type.wgsl
index 7491245..4b5dddc 100644
--- a/test/tint/array/function_return_type.wgsl
+++ b/test/tint/array/function_return_type.wgsl
@@ -10,7 +10,7 @@
return array<array<array<f32, 4>, 3>, 2>(f2(), f2());
}
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let a1 : array<f32, 4> = f1();
let a2 : array<array<f32, 4>, 3> = f2();
diff --git a/test/tint/array/function_return_type.wgsl.expected.wgsl b/test/tint/array/function_return_type.wgsl.expected.wgsl
index 7491245..4b5dddc 100644
--- a/test/tint/array/function_return_type.wgsl.expected.wgsl
+++ b/test/tint/array/function_return_type.wgsl.expected.wgsl
@@ -10,7 +10,7 @@
return array<array<array<f32, 4>, 3>, 2>(f2(), f2());
}
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let a1 : array<f32, 4> = f1();
let a2 : array<array<f32, 4>, 3> = f2();
diff --git a/test/tint/array/size.wgsl b/test/tint/array/size.wgsl
index 60721db..f9135ad 100644
--- a/test/tint/array/size.wgsl
+++ b/test/tint/array/size.wgsl
@@ -1,7 +1,7 @@
let slen = 4;
let ulen = 4u;
-@stage(fragment)
+@fragment
fn main() {
var signed_literal : array<f32, 4>;
var unsigned_literal : array<f32, 4u>;
diff --git a/test/tint/array/size.wgsl.expected.wgsl b/test/tint/array/size.wgsl.expected.wgsl
index 0998407..7b6efc6 100644
--- a/test/tint/array/size.wgsl.expected.wgsl
+++ b/test/tint/array/size.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
let ulen = 4u;
-@stage(fragment)
+@fragment
fn main() {
var signed_literal : array<f32, 4>;
var unsigned_literal : array<f32, 4u>;
diff --git a/test/tint/array/strides.spvasm b/test/tint/array/strides.spvasm
index d0ae14d..9730642 100644
--- a/test/tint/array/strides.spvasm
+++ b/test/tint/array/strides.spvasm
@@ -5,7 +5,7 @@
; };
; @group(0) @binding(0) var<storage, read_write> s : S;
;
-; @stage(compute) @workgroup_size(1)
+; @compute @workgroup_size(1)
; fn f() {
; let a : ARR_B = s.a;
; let b : array<@stride(8) array<f32, 2>, 3> = s.a[3];
diff --git a/test/tint/array/strides.spvasm.expected.wgsl b/test/tint/array/strides.spvasm.expected.wgsl
index 14e0a9e..74fe15c 100644
--- a/test/tint/array/strides.spvasm.expected.wgsl
+++ b/test/tint/array/strides.spvasm.expected.wgsl
@@ -30,7 +30,7 @@
return;
}
-@stage(compute) @workgroup_size(1i, 1i, 1i)
+@compute @workgroup_size(1i, 1i, 1i)
fn f() {
f_1();
}
diff --git a/test/tint/array/type_constructor.wgsl b/test/tint/array/type_constructor.wgsl
index 8a07f39..e975089 100644
--- a/test/tint/array/type_constructor.wgsl
+++ b/test/tint/array/type_constructor.wgsl
@@ -1,4 +1,4 @@
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let x : i32 = 42;
diff --git a/test/tint/array/type_constructor.wgsl.expected.wgsl b/test/tint/array/type_constructor.wgsl.expected.wgsl
index 4381ec8..a1a942a 100644
--- a/test/tint/array/type_constructor.wgsl.expected.wgsl
+++ b/test/tint/array/type_constructor.wgsl.expected.wgsl
@@ -1,4 +1,4 @@
-@stage(compute) @workgroup_size(1)
+@compute @workgroup_size(1)
fn main() {
let x : i32 = 42;
let empty : array<i32, 4> = array<i32, 4>();