Skip to content

Conversation

@ChristopherBiscardi
Copy link

@ChristopherBiscardi ChristopherBiscardi commented Dec 24, 2025

This is a working naga 28 update. I noticed some tests haven't passed (specifically cargo test --all-features) since before 0.14, so this PR doesn't attempt to make them pass.

enumerate_adaptors

instance.enumerate_adapters is async now (and available on webgpu): gfx-rs/wgpu#8230 . more details in the wgpu release notes.

ControlBarrier & MemoryBarrier

Barrier was split in two to support MemoryBarriers: gfx-rs/wgpu#7630

From the PR, it seems like falling back to ControlBarrier is fine so that's what I did.

Ray Query enable

ray queries require enable wgpu_ray_query;: gfx-rs/wgpu#8545

This doesn't currently seem to make it through, and the relevant test fails.

ImageAtomic

Image atomics were added in gfx-rs/wgpu#6706

Mesh Shaders

Mesh shaders are a major feature of wgpu 28, but I've set their fields to None here in the interest of doing an upgrade and not a feature add at the same time

https://github.com/gfx-rs/wgpu/releases/tag/v28.0.0

update: I found some time and built a wgpu mesh/task shader demo and used that to validate some of the mesh shader functionality. I've used this to successfully compile a task shader with naga-oil and run it, but there's still something missing from the mesh shader module output here.

@ChristopherBiscardi
Copy link
Author

oh actually, cargo test --all-features doesn't pass on master and hasn't even been able to compile since 0.15. 0.14 (7031ca1) fails the test in the same way.

I'm going to back up a bit and just get cargo test to work instead.

@ChristopherBiscardi
Copy link
Author

wgsl directive support was added in #123 and actually works for the ray queries, as long as the add_composable_module function is not used. (so a single file with all the content works)

This seems like a pattern solari actually uses at the moment, so I'm not modifying the test to make it pass, but #123 mentions that trying to make this work got complicated.

Other than that (and no actual implementation for mesh shaders) this seems like the v28 upgrade completed.

@ChristopherBiscardi
Copy link
Author

I was able to fix the rayquery test.

for composable modules, the enable extension needs to be below the #define_import_path like this:

#define_import_path test_module

enable wgpu_ray_query;

If it is not, the error will indicate that the extension is not enabled.

called Result::unwrap() on an Err value: ComposerError { inner: WgslParseError(ParseError { message: "the wgpu_ray_query enable extension is not enabled", labels: [(Span { start: 67, end: 89 }, "the wgpu_ray_query "Enable Extension" is needed for this functionality, but it is not currently enabled.")], notes: ["You can enable this extension by adding enable wgpu_ray_query; at the top of the shader, before any other items."] }), source: Module { name: "test_module", offset: 0, defs: {} } }

@ChristopherBiscardi ChristopherBiscardi changed the title start of naga 28 update naga 28 update Dec 24, 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.

1 participant