You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not familiar with the WGSL specification and couldn't figure it out quickly, so I'm not sure if this is a validation error or merely a poor error message. Given that it used to be accepted, I'm guessing the latter.
The following passes validation with naga 0.8.5 (current crates.io release) but fails on git (as of commit 27d38aa)
The error goes away if I change 1 to 1u, making it explicitly unsigned. If this program should pass validation, then the message is quite confusing: it doesn't specify that I need an unsigned integer, and it doesn't make it clear that this is a type mismatch and not a syntax error.
The text was updated successfully, but these errors were encountered:
Fixesgfx-rs#1745: Support out-of-order module scope declarations in WGSL
Fixesgfx-rs#1044: Forbid local variable shadowing in WGSL
Fixesgfx-rs#2076: [wgsl-in] no error for duplicated type definition
Fixesgfx-rs#2071: Global item does not support 'const'
Fixesgfx-rs#2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument
Fixesgfx-rs#1775: Referencing a function without a return type yields an unknown identifier error.
Fixesgfx-rs#2089: Error span reported on the declaration of a variable instead of its use
Fixesgfx-rs#1996: [wgsl-in] Confusing error: "expected unsigned/signed integer literal, found '1'"
Separate parsing from lowering by generating an AST, which desugars as
much as possible down to something like Naga IR. The AST is then used
to resolve identifiers while lowering to Naga IR.
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Jim Blandy <jimb@red-bean.com>
I'm not familiar with the WGSL specification and couldn't figure it out quickly, so I'm not sure if this is a validation error or merely a poor error message. Given that it used to be accepted, I'm guessing the latter.
The following passes validation with naga 0.8.5 (current crates.io release) but fails on git (as of commit 27d38aa)
The error goes away if I change
1
to1u
, making it explicitly unsigned. If this program should pass validation, then the message is quite confusing: it doesn't specify that I need an unsigned integer, and it doesn't make it clear that this is a type mismatch and not a syntax error.The text was updated successfully, but these errors were encountered: