-
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
Use argument buffers on Metal #2547
base: master
Are you sure you want to change the base?
Conversation
- Begins defining argument buffers per entry point rather than globally
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. |
Overview
This PR attempts to close gfx-rs/wgpu#4491
Progress
In its current state, this PR can parse WGSL and generate Metal shaders that, when run with the corresponding PR of wgpu, work correctly in most use cases, with two known exceptions:
When complete, this work should simplify the Metal backend significantly as it allows the binding layout to be driven by the shader itself, obviating the need for hacks like
fake_missing_bindings
. In addition, it enables "bindless" features such as non-uniform indexing of very large arrays of textures.Further work required
While I believe the bulk of the work has been done, I have sadly run out of available time to fully test and resolve all the edge cases required to finish this issue.
In particular, the use cases of writable textures on devices below tier 1, buffers with dynamic offsets and other potential use cases that have not yet been discovered, will require falling back to the existing binding model. This should be possible by simply checking for the presence of these, or any other necessary conditions and emitting a member of the function argument table, as per the existing architecture.