-
Notifications
You must be signed in to change notification settings - Fork 1.1k
wgsl interpolate(flat) always results in value of 0 #1775
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
Comments
I discovered in the wgsl spec that flat cannot be used on u32, as integer types are always flat.
|
Does renderdoc capture show anything interesting? |
You can debug the fragment shaders. |
I see the same thing, unfortunately :( |
This looks like a driver bug. Running your sample code on Windows/AMD shows the correct result. |
@rukai are you on NVidia proprietary driver by any chance? What's the GPU? |
I submitted this issue to NVidia Vulkan support and already got a weak confirmation that this may be fixed soon 🚀 |
Yes the card is Nvidia GTX 960 and I am using the Nvidia proprietary driver. |
More specifically, the driver is confused about the presence of multiple location=1 varyings, and isn't able to ignore the ones that need to be ignored (based on the entry point interface). Generally people don't make SPIR-V with multiple entry points, so that driver path was undertested. |
@rukai could you try on 470.62.02 drivers please? The issue is supposedly fixed there. https://developer.nvidia.com/vulkan-driver |
I am on the latest driver used by arch https://archlinux.org/packages/extra/x86_64/nvidia-utils/ and its on 470.63.01-01 |
@rukai looks like this driver is from 2021.8.10, it's an older driver (with somehow newer minor version?).
|
Ok I'll test it when that driver makes its way onto arch. |
Can now confirm this has been fixed! 🎉 |
Fixes #1745: Support out-of-order module scope declarations in WGSL Fixes #1044: Forbid local variable shadowing in WGSL Fixes #2076: [wgsl-in] no error for duplicated type definition Fixes #2071: Global item does not support 'const' Fixes #2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument Fixes #1775: Referencing a function without a return type yields an unknown identifier error. Fixes #2089: Error span reported on the declaration of a variable instead of its use Fixes #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 <[email protected]> Co-authored-by: Jim Blandy <[email protected]>
Description
wgsl interpolate(flat) always results in value of 0, I think, at least the repro is very concise
Issue does not occur with the equivalent glsl
Repro steps
rukai@5c29302
Expected vs observed behavior
I expect blue output but get red
Platform
wgpu master, linux, vulkan
The text was updated successfully, but these errors were encountered: