Skip to content

Commit

Permalink
Allow for trailing comma in var template declaration (gpuweb#3959)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter McNeeley <[email protected]>
  • Loading branch information
2 people authored and teoxoy committed Oct 25, 2024
1 parent 07b4ee2 commit b4f7d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/webgpu/shader/validation/decl/var.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit b4f7d41

Please sign in to comment.