From b4f7d41883bf16828d841c6e9b1eb87732d90db9 Mon Sep 17 00:00:00 2001 From: petermcneeleychromium <96925679+petermcneeleychromium@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:48:20 -0400 Subject: [PATCH] Allow for trailing comma in var template declaration (#3959) Co-authored-by: Peter McNeeley --- src/webgpu/shader/validation/decl/var.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webgpu/shader/validation/decl/var.spec.ts b/src/webgpu/shader/validation/decl/var.spec.ts index f9e15bd6e2a6..1abf8bcf4fdb 100644 --- a/src/webgpu/shader/validation/decl/var.spec.ts +++ b/src/webgpu/shader/validation/decl/var.spec.ts @@ -749,7 +749,8 @@ g.test('var_access_mode_bad_other_template_contents') .fn(t => { const prog = `@group(0) @binding(0) var<${t.params.prefix}${t.params.accessMode}${t.params.suffix}> x: i32;`; - const ok = t.params.prefix === 'storage,' && t.params.suffix === ''; + const ok = + t.params.prefix === 'storage,' && (t.params.suffix === '' || t.params.suffix === ','); t.expectCompileResult(ok, prog); });