-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error on const, shader validation on older shader language version ? #14
Comments
const are not yet supported in That being said, naga was indeed outdated, so I updated it, and published |
🙏 thx |
I'd like to keep that open, if you don't mind. Just to keep track of that. |
Ho np 👍 |
New versions are released with const support. |
Great will take a look at that, thanks. |
Indeed it is now working as expected. cargo-wgsl is also updated already so vscode-wgsl just works ™️ |
Hi,
first of all, this extension is great. GG
I tried to use in vscode but it seems that the validation produces errors when chrome canary is fine with the shader. It seems like the validation is not up to date with the shading language.
on this one the first line produces an error.
--> webgpu-experiment/src/node-functions.wgsl:2:1
error: error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found 'const'
┌─ wgsl:2:1
│
2 │ const NodeMaxLevel = 14;
│ ^^^^^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file
Note that this shader is injected a bit like include in a more complex compute shader and vertex shader. Still It feels that it validates on a different version and the language.
node-functions.txt
The text was updated successfully, but these errors were encountered: