-
Notifications
You must be signed in to change notification settings - Fork 938
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 #4491
Comments
Some updates on this one:
Some notes (for my reference, or for anyone who wants to pick this up should I get hit by a bus):
|
Some considerations:
|
@kanerogers The "Without argument buffers" example in the top comment seems mangled - is that valid MSL? |
Ah, good pick up! 😅 No, it's not valid MSL. This was just a rough sketch I wrote, mostly for myself, when I was first looking into the project. |
Background
This is a companion to the wgpu issue #3334
Using argument buffers would simplify the Metal shaders emitted by naga. Instead of having to pass each binding to the shader function as an argument, each binding group can be bundled into a struct which can then be used throughout the shader. For example:
Input wgsl
Without argument buffers
With argument buffers
The text was updated successfully, but these errors were encountered: