Skip to content
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

Cannot select MSL version with naga-cli #5389

Closed
pcleavelin opened this issue Mar 14, 2024 · 1 comment
Closed

Cannot select MSL version with naga-cli #5389

pcleavelin opened this issue Mar 14, 2024 · 1 comment

Comments

@pcleavelin
Copy link

Forgive me if this should be a bug report (not sure it really qualifies).

I've been working on a project that originally used wgpu but have switched codebases/languages, however I still want to use the naga compiler. Since I'm on macOS (Apple Silicon) I'm compiling WGSL shader code to MSL using naga-cli v.0.19.0. Although, when using instancing (in particular @builtin(instance_index)) running naga shader.wgsl shader.metal outputs

attribute 'instance_id' is not supported for target MSL version

This looks to be because naga-cli uses the default version (which is MSL 1.0) when compiling, but naga-cli has no way to choose which metal version to use.

I've currently been using my own fork which adds support for this here. I can submit a PR for this, but I wasn't sure if there was a reason for leaving this feature out.

Also sorry if this is a duplicate issue, it can be hard to filter out issues only pertaining to the CLI.

@cwfitzgerald
Copy link
Member

Yes, lets have it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants