-
Notifications
You must be signed in to change notification settings - Fork 240
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
wgsl output doesn't use parenthesis for mixed operations, generating invalid code #6005
Comments
I have a fix ready for this, but I'll spend some more time tomorrow creating more exhaustive tests for this type of issue. |
Add parentheses for a few cases that Dawn/Tint (WGSL compiler) complains about. Closes shader-slang#6005.
With the above fix, the following WGSL code is now generated for the mentioned https://shader-playground.timjones.io/a6fbc241c06921e0e3b71c5dfd1ad03d |
Hey @aleino-nv, great work!
Same with
|
@expenses Thanks for reporting this! I will re-open this issue and look at some more cases. |
See gfx-rs/wgpu#6857
I got this error in Chromium
slang code: https://github.com/NVIDIAGameWorks/Falcor/blob/9dc819c162b2070335c65060436041690b7937f8/Source/Falcor/Utils/Math/HashUtils.slang#L62-L74
The text was updated successfully, but these errors were encountered: