wgsl: Do not require a semicolon after a struct
Don't generate them either, which generated a lot of test churn.
Fixed: tint:1380
Change-Id: I0a7cfdd2ef0ffe8e7fda111fbc57997b36b949e0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77165
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/test/samples/compute_boids.wgsl.expected.wgsl b/test/samples/compute_boids.wgsl.expected.wgsl
index 8fd0a19..394631c 100644
--- a/test/samples/compute_boids.wgsl.expected.wgsl
+++ b/test/samples/compute_boids.wgsl.expected.wgsl
@@ -13,7 +13,7 @@
struct Particle {
pos : vec2<f32>;
vel : vec2<f32>;
-};
+}
struct SimParams {
deltaT : f32;
@@ -23,11 +23,11 @@
rule1Scale : f32;
rule2Scale : f32;
rule3Scale : f32;
-};
+}
struct Particles {
particles : array<Particle, 5>;
-};
+}
[[binding(0), group(0)]] var<uniform> params : SimParams;
diff --git a/test/samples/cube.wgsl.expected.wgsl b/test/samples/cube.wgsl.expected.wgsl
index 29109a6..a764703 100644
--- a/test/samples/cube.wgsl.expected.wgsl
+++ b/test/samples/cube.wgsl.expected.wgsl
@@ -1,6 +1,6 @@
struct Uniforms {
modelViewProjectionMatrix : mat4x4<f32>;
-};
+}
[[binding(0), group(0)]] var<uniform> uniforms : Uniforms;
@@ -9,14 +9,14 @@
cur_position : vec4<f32>;
[[location(1)]]
color : vec4<f32>;
-};
+}
struct VertexOutput {
[[location(0)]]
vtxFragColor : vec4<f32>;
[[builtin(position)]]
Position : vec4<f32>;
-};
+}
[[stage(vertex)]]
fn vtx_main(input : VertexInput) -> VertexOutput {
diff --git a/test/samples/simple_vertex.spvasm.expected.wgsl b/test/samples/simple_vertex.spvasm.expected.wgsl
index 45b705f..372bb24 100644
--- a/test/samples/simple_vertex.spvasm.expected.wgsl
+++ b/test/samples/simple_vertex.spvasm.expected.wgsl
@@ -8,7 +8,7 @@
struct main_out {
[[builtin(position)]]
gl_Position : vec4<f32>;
-};
+}
[[stage(vertex)]]
fn main() -> main_out {