Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const_expr example does not match its grammar #800

Closed
litherum opened this issue May 22, 2020 · 1 comment · Fixed by #818
Closed

const_expr example does not match its grammar #800

litherum opened this issue May 22, 2020 · 1 comment · Fixed by #818
Labels
wgsl WebGPU Shading Language Issues
Projects

Comments

@litherum
Copy link
Contributor

https://gpuweb.github.io/gpuweb/wgsl.html#literal-statement

const_expr
  : type_decl PAREN_LEFT (const_expr COMMA)? const_expr PAREN_RIGHT
  | const_literal

It appears that, if there's only a single pair of parentheses, that the parentheses must hold either 1 or 2 terms inside them. However, there's an example:

vec4<f32>(1.2, 2.3, 3.4, 2.3)
@litherum litherum added the wgsl WebGPU Shading Language Issues label May 22, 2020
@dj2
Copy link
Member

dj2 commented May 23, 2020

Ah, should be a * instead of a ?.

@grorg grorg added this to Under Discussion in WGSL May 26, 2020
@dj2 dj2 closed this as completed in #818 Jun 1, 2020
WGSL automation moved this from Under Discussion to Done Jun 1, 2020
dj2 added a commit that referenced this issue Jun 1, 2020
This CL updates the const_expr to use the proper * instead of ?.

Fixes #800
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this issue Sep 6, 2022
test path:
webgpu:shader,execution,builtin,isnan:*

WGSL allows implementations to assume NaNs don't occur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wgsl WebGPU Shading Language Issues
Projects
WGSL
Done
Development

Successfully merging a pull request may close this issue.

2 participants