-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add SPIRV parsing test case with Embark Rust shaders #341
base: master
Are you sure you want to change the base?
Conversation
Thank you for providing the shader! It does use a hell lot of features that are not supported by WebGPU (multiview, variable pointers). |
I think it's ok to keep this PR open and link it to progress we make towards supporting that test. |
Didn't we add VkMEMModel support? |
It was just the first blocker out of an unknown number. We are a few steps closer now. |
Current blockers seem to be:
Full Disassembled Shader
|
Those could modeled with binding arrays, if their usage was well-behaved. |
With #2199 merged we are getting closer to get this working. However, considering this PR is now 2 years old I imagine there have been improvements and fixes in @repi could you regenerate the testcase or provide new ones? They can go in the |
did a quick test with our latest set of shaders and they all fail now on |
Hmm, I think we forgot to add it here Lines 79 to 83 in a7b52b8
although, which capabilities do the shaders need that are enabled by that extension? @Patryk27 shouldn't we now support some of those capabilities in the frontend? |
here is an one compute shader as an example blur-blur_cs.spv.zip |
Ah yes, it looks like we at the very least support RuntimeDescriptorArrayEXT now; I'm not sure on the other capabilities there 🤔 |
We are missing
and
|
thanks! once that is implemented I can update this PR to include all of our shaders as individual .spv files and include in the test suite. |
Hello, thank you for your PR against Naga! As part of gfx-rs/wgpu#4231, we have moved development of Naga into the wgpu repository in the Naga subfolder. We have transferred all issues, but we are unable to automatically transfer PRs. As such, please recreate your PR against the wgpu repository. We apologize for the inconvenience this causes, but will make contributing to both projects more streamlined going forward. We are leaving PRs open, but once they are transferred, please close the original Naga PR. |
This adds SPIRV binary shaders and a test case to reproduce the SPIRV parsing issues with a set of shaders we have here at Embark Studios as repro for gfx-rs/wgpu#4308. It is a single SPIRV binary module with multiple shaders inside it.
Since I filed the original we have switched from using GLSL for our shaders to use Rust and our new Rust GPU shader compiler backend which generates SPIRV. Note as this is a very young SPIRV compiler there may be SPIRV code generation issues in the resulting binary, but at least the shaders to work with Nvidia and AMD drivers on PC and Linux and render correctly in our engine.
The new test case here will fails to parse, initially with this error:
But as described in issue gfx-rs/wgpu#4308 there likely are additional SPIRV input parsing issues as well.
We could potentially merge this in but with the test marked as
#[ignored]
so it is not run by default (and as such fail), so one can do incremental fixes and improvements to the SPIRV parsing to get this running?