wgsl: Separate struct members with commas
Use of semicolons is still supported, but deprecated.
Also updates the parsing methods for structures to better match the
WGSL grammar.
Bug: tint:1475
Change-Id: I7675ba42c13f91080b0ac173c352e0092021f80b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/84380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/test/tint/benchmark/animometer.wgsl b/test/tint/benchmark/animometer.wgsl
index b850d14..393c487 100644
--- a/test/tint/benchmark/animometer.wgsl
+++ b/test/tint/benchmark/animometer.wgsl
@@ -1,13 +1,13 @@
struct Time {
- value : f32;
+ value : f32,
}
struct Uniforms {
- scale : f32;
- offsetX : f32;
- offsetY : f32;
- scalar : f32;
- scalarOffset : f32;
+ scale : f32,
+ offsetX : f32,
+ offsetY : f32,
+ scalar : f32,
+ scalarOffset : f32,
}
@binding(0) @group(0) var<uniform> time : Time;
@@ -16,9 +16,9 @@
struct VertexOutput {
@builtin(position)
- Position : vec4<f32>;
+ Position : vec4<f32>,
@location(0)
- v_color : vec4<f32>;
+ v_color : vec4<f32>,
}
@stage(vertex)