Skip to content

Upgrade to wgpu 26.#124

Merged
alice-i-cecile merged 2 commits into
bevyengine:masterfrom
tychedelia:wgpu-26
Jul 16, 2025
Merged

Upgrade to wgpu 26.#124
alice-i-cecile merged 2 commits into
bevyengine:masterfrom
tychedelia:wgpu-26

Conversation

@tychedelia

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/prune/mod.rs
| naga::GatherMode::ShuffleXor(h_src) => {
self.add_expression(function, func_req, context, *h_src, &PartReq::All)
}
naga::GatherMode::QuadSwap(_) => (),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Wasn't totally sure about how to map this tbh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that's right, but also this part of the pruner is wrong looking at it, and the pruner doesn't even compile currently (it's been broken ever version since 0.15. It's a non-default feature that isn't tested in CI that we don't use in bevy so it's easy to overlook). I have no idea why I wrote them returning RayQuery but that's very definitely wrong (pretty sure I just copied WorkGroupUniformLoad, which is also wrong lol).

@Elabajaba Elabajaba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pruner is broken but it's been that way for a long time. Maybe we should consider just dropping it completely.

Comment thread Cargo.toml

[dependencies]
naga = { version = "25", features = ["wgsl-in", "wgsl-out"] }
naga = { version = "26", features = ["wgsl-in", "wgsl-out", "termcolor"] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WGPU seems to blanket enable this so I don't think it matters whether or not we include this feature here? (at least for bevy)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, I was getting a compilation failure without it, let me double check again.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

you may have been hitting brendanzab/codespan#389

│ ╰──────────────^ naga::ir::Function [0]
= The `return` value Some([0]) does not match the function return value
= The `return` expression Some([0]) does not match the declared return type Some([0])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What a wonderful error message lol.

Comment thread src/prune/mod.rs
| naga::GatherMode::ShuffleXor(h_src) => {
self.add_expression(function, func_req, context, *h_src, &PartReq::All)
}
naga::GatherMode::QuadSwap(_) => (),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that's right, but also this part of the pruner is wrong looking at it, and the pruner doesn't even compile currently (it's been broken ever version since 0.15. It's a non-default feature that isn't tested in CI that we don't use in bevy so it's easy to overlook). I have no idea why I wrote them returning RayQuery but that's very definitely wrong (pretty sure I just copied WorkGroupUniformLoad, which is also wrong lol).

Comment thread src/derive.rs
| GatherMode::ShuffleDown(ref mut h_src)
| GatherMode::ShuffleUp(ref mut h_src)
| GatherMode::ShuffleXor(ref mut h_src) => *h_src = map_expr!(h_src),
GatherMode::QuadSwap(_) => (),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why's this one not have ref mut h_src?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The other ones are making sure their Handle<Expression> get remapped correctly (afaik), while QuadSwap just has a Direction enum.

https://docs.rs/naga/latest/naga/ir/enum.GatherMode.html

@alice-i-cecile alice-i-cecile merged commit 8dde16e into bevyengine:master Jul 16, 2025
7 checks passed
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.

6 participants