ScanMountGoat / wgsl_to_wgpu

Generate typesafe Rust bindings from WGSL shaders to wgpu
MIT License
40 stars 9 forks source link

Debug labels #59

Open 9SMTM6 opened 2 weeks ago

9SMTM6 commented 2 weeks ago

Hey there,

this is a quite helpful package. I'm currently looking at primarily your package and the fork wgsl_bindgen.

wgsl_bindgen does a bunch of stuff by default, that I'm not sure I need. However it does also do one thing, that I currently consider quite crucial. It generates debug labels for everything that accepts them. That I'm not really able to retrofit with the generated source from your package, since you only provide functions that immediately pass descriptors to the device.

For me to consider this package I'd either need to access the descriptors without directly passing them to the device (ShaderModuleDescriptor can be const actually) or allow to either automatically infer some labels, or to pass one label for all generated code for one wgsl source (which would be sufficient granularity at least for me).

ScanMountGoat commented 1 week ago

What debug labels do you need to set that aren't exposed currently? I usually just label the pipelines themselves instead of their descriptors.