WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Firestar99
Copy link
Member

Requires #491

Supersedes #280

Adds spirv-unknown-naga-wgsl target for built-in naga transpilation to wgsl. Further naga targets could be added easily.

Quite a lot compiletest still fail with the naga target.

@Firestar99 Firestar99 marked this pull request as draft December 17, 2025 16:44
@Firestar99 Firestar99 changed the title Naga wgsl v2 Add naga-wgsl target v2 Dec 17, 2025
Comment on lines +23 to +26
use-installed-tools = ["spirv-tools/use-installed-tools", "naga"]
# If enabled will compile and link the C++ code for the spirv tools, the compiled
# version is preferred if both this and `use-installed-tools` are enabled
use-compiled-tools = ["spirv-tools/use-compiled-tools"]
use-compiled-tools = ["spirv-tools/use-compiled-tools", "naga"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this effectively makes naga non-optional if I'm reading it correctly. Is it intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's from the old PR, added with comment

wgsl: enable naga feature by default, cargo-gpu can't handle it

So this was more a hack than anything else. I'll have a look what the compile time impact is, and if it's actually significant (which next to spirv-tools-sys may not be), look into making it optional and supported by cargo-gpu.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if naga should really be a dependency of either of those two features. Why not let user specify it explicitly instead?

Copy link
Member Author

@Firestar99 Firestar99 Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo-gpu can't handle it

we'd need to build the infra in cargo-gpu first

@Firestar99 Firestar99 mentioned this pull request Dec 19, 2025
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

Successfully merging this pull request may close these issues.

3 participants