Skip to content

Conversation

@andrewbaxter
Copy link

I set immediate_size to zero because AFAICT Naga's Type enum doesn't have Immediate yet so it isn't supported? I couldn't find much info about it, it was added in gfx-rs/wgpu#8724

This works in my usage (compiles), but I may not be using all the features and the diff for that MR is pretty big.

@gooroo-dev
Copy link

gooroo-dev bot commented Dec 25, 2025

Please double check the following review of the pull request:

🐞Mistake 🤪Typo 🚨Security 🚀Performance 💪Best Practices 📖Readability ❓Others
0 0 0 0 0 0 0

Changes in the diff

  • 🛠️ Updated the wgsl_bindgen version comment from 0.21.1 to 0.21.2 in generated file.
  • 🛠️ Updated the source hash comment in generated file.
  • ➖ Removed all uses of the deprecated push_constant_ranges field in wgpu::PipelineLayoutDescriptor.
  • ➕ Added immediate_size: 0 to all pipeline layout descriptors to comply with wgpu 0.28 API changes.
  • 🛠️ Updated code generation in wgsl_bindgen/src/generate/pipeline.rs to replace push_constant_ranges with immediate_size: 0.

Identified Issues

No issues identified. The changes are straightforward API updates to conform to wgpu 0.28, replacing push_constant_ranges with immediate_size as per the new API. The value 0 for immediate_size is consistent with the previous empty push constant ranges.

Summary

The diff correctly updates the code to be compatible with wgpu 0.28, which replaced push_constant_ranges with immediate_size in PipelineLayoutDescriptor. The change is applied consistently across all pipeline layout creations and in the code generator. There are no mistakes, typos, security, or performance issues introduced. The change is necessary and correctly done.

Missing Tests

No new functionality or behavioral changes were introduced that require new tests. The changes are API compatibility fixes and code generation updates. Existing tests should cover pipeline layout creation and shader binding generation.

Summon me to re-review when updated! Yours, Gooroo.dev
I'd appreciate your feedback! React or reply.

@andrewbaxter
Copy link
Author

Ah yeah, I forgot to ask - how should version compatibility be handled here? Since 28 is a breaking change (?)

@Swoorup
Copy link
Owner

Swoorup commented Dec 26, 2025

Ah yeah, I forgot to ask - how should version compatibility be handled here? Since 28 is a breaking change (?)

We only roll forward, however we have to ensure that both naga_oil dependency as well as the example uses the wgpu crate 28. Unfortunately if naga_oil doesn't support the latest version, we would have to wait until it is supported.

@andrewbaxter
Copy link
Author

Ah okay sorry, yeah that looks like it's still on 27. I made this because I thought I'd need it for something, but I ended up hitting other issues and switching to another solution.

Please feel free to close this, it's pretty small so I'm not sure it's worth keeping around.

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.

2 participants