-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix shaderf16 support on vulkan/nvidia #7656
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
Conversation
wgpu/naga/src/back/spv/writer.rs Line 1207 in 50eb207
As for Dawn https://issues.chromium.org/issues/42251212:
I think naga also does pollyfill somewhere. |
Any idea where would be the best place to add the polyfill? |
Related: #7468 |
This fixes an issue I had when trying to profile code using f16 in Nsight. |
@cryvosh can we take this PR out of draft, and leave pollyfilling to a followup? |
All of the Vulkan features are required for the |
Landing this PR as is would make the functionality of the |
CI seems to correctly catch this as a vulkan validation error. |
As this isn't actually allowed, I'm going to close this PR - we would accept a followup which adds the polyfill using f32. |
For future reference, what's not allowed? |
Basically, if you use |
Oh gotcha, I thought you meant I broke some rule I'll look into adding the polyfill and open new PR when I get the chance (in meantime any suggestions on where / at what stage in the pipeline to add this would be appreciated) |
Connections
N/A
Description
On my Laptop 4090, vulkaninfo reports:
However the wgpu vulkan backend requires all four to be true for the SHADER_F16 feature to be supported.
This doesn't seem necessary, and as far as I can tell,
storage_input_output16
isn't even read anywhere in wgpu.This is also how dawn handles f16 support checking here.
Testing
My personal project using f16s (developed in chrome wasm which doesn't have this issue) was tested and works fine on Windows 11 native, Vulkan Backend.
Squash or Rebase?
Squash
Checklist
cargo fmt
.taplo format
.cargo clippy --tests
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.CHANGELOG.md
entry.