Replies: 1 comment 3 replies
-
I'm hesitating to make wgpu-rs accept a naga::Module because that would make Also, accepting Finally, Naga's IR is very close WGSL. Conversion to WGSL is very lightweight, and so is parsing WGSL. So you can just convert Naga IR to WGSL and pass it to us, portably. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking into building a procedural macro in Rust that outputs a WSGL shader and was wondering how a
naga::Module
can be used directly instead ofwgpu::ShaderSource
. I found that inwgpu::Context::device_create_shader_module
this is already being done based of astr
throughwgc::pipeline::ShaderModuleSource::Wgsl
.I was thinking of using
naga::Module
as the target of my shader transpiler instead of just concatenating strings with bits of WGSL.Please tell me if this is not a good idea, and otherwise what the best way is to implement this feature?
Beta Was this translation helpful? Give feedback.
All reactions