Skip to content

Upgrade to wgpu 30 - #24841

Merged
alice-i-cecile merged 27 commits into
bevyengine:mainfrom
ChristopherBiscardi:wgpu-30
Jul 16, 2026
Merged

Upgrade to wgpu 30#24841
alice-i-cecile merged 27 commits into
bevyengine:mainfrom
ChristopherBiscardi:wgpu-30

Conversation

@ChristopherBiscardi

@ChristopherBiscardi ChristopherBiscardi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Objective

Upgrade to wgpu 30

Solution

  • Update and merge naga_oil
    • Publish naga_oil
  • Update and merge dlss_wgpu
    • publish dlss_wgpu
  • remove dependency patches for naga_oil and dlss_wgpu

Relevant Changes

Testing

  • 3d_scene
  • solari with dlss

Showcase

3d_scene on macos

image

ssao on macos

image

bevy_city on macos

image

Solari on Windows 11

image

Comment thread crates/bevy_render/src/render_resource/texture.rs Outdated
Comment thread crates/bevy_solari/src/realtime/prepare.rs Outdated
Comment thread Cargo.toml Outdated

@Zeophlite Zeophlite 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.

Approve all but Solaris changes

Comment thread crates/bevy_render/src/error_handler.rs Outdated
@ChristopherBiscardi

Copy link
Copy Markdown
Contributor Author

CI is passing except for the building of the integration tests because of the patches.

@Zeophlite Zeophlite added A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jul 2, 2026
@Zeophlite Zeophlite added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Jul 2, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jul 2, 2026
@Zeophlite Zeophlite added this to the 0.20 milestone Jul 2, 2026
@ChristopherBiscardi ChristopherBiscardi added the S-Blocked This cannot move forward until something else changes label Jul 8, 2026
@ChristopherBiscardi

Copy link
Copy Markdown
Contributor Author

current status of this PR is waiting for new naga_oil/dlss_wgpu crates to be published to crates.io, so marking as blocked until then for clarity.

@stuartparmenter stuartparmenter 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.

All the changes look good. I've been testing Bevy w/ wgpu v30 (and trunk right before v30) for the last 6 weeks or so, and have been doing additional testing moving over to this PR. My game, tests, etc all work fine.

The solari change will have a conflict if #24767 lands first (which it probably will)

Comment thread crates/bevy_solari/src/realtime/world_cache_compact.wgsl Outdated
@ChristopherBiscardi

Copy link
Copy Markdown
Contributor Author

The example run differences seem to be caused by something on main, where examples like world_serialization and custom_skinned_mesh are failing with panics.

@JMS55 JMS55 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.

Approving solari changes

@ChristopherBiscardi ChristopherBiscardi added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Blocked This cannot move forward until something else changes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 15, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Jul 16, 2026
Merged via the queue into bevyengine:main with commit 5036d97 Jul 16, 2026
43 of 44 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Rendering Jul 16, 2026
stuartparmenter added a commit to stuartparmenter/bevy that referenced this pull request Jul 17, 2026
Upstream upgraded to wgpu 30 (bevyengine#24841), which contains all of the wgpu
HDR work our [patch] pin pointed at (a03be8d2 is an ancestor of
v30.0.0), so the git pins are dropped and wgpu/wgpu-types/naga/
wgpu-naga-bridge now resolve to crates.io 30.0.0.

Most code conflicts were upstream independently making the same wgpu 30
API migration this branch already carried via the trunk pin; kept our
sides where they had more specific expect messages or the HDR surface
negotiation, and adopted upstream's present(&RenderQueue) signature.
Also removes the two #[expect(clippy::large_enum_variant)] workarounds
obsoleted by upstream boxing RenderResources.
pull Bot pushed a commit to orzogc/bevy that referenced this pull request Jul 28, 2026
# Objective

[Ray tracing on Metal](gfx-rs/wgpu#8071) has
been available since wgpu 29.

I shipped a PR to wgpu for [implementing bindless storage
buffers](gfx-rs/wgpu#9081) for metal, which was
released with wgpu 30. With the [wgpu 30
PR](bevyengine#24841) in bevy merged, we
are fully ready to add support to Solari on metal backends!

However because there is a limit of 31 buffer slots per shader stage.
Running Solari on main on a raytracing compatible Mac results in a
crash.

## Solution

I had combine the world cache into a single packed buffer. In theory
this should not introduce performance regressions since it’s only
reorganizing bindings and doesn’t introduce and copy or other passes.
Tried keeping the diff fairly minimal and easy to review.

Getting the buffer layout for the world cache on the CPU with
`ShaderType` was tricky. To avoid blowing up memory I put it in a
private module so you can't construct it.

## Testing

- Ran the Solari example on mac

```
cargo run --example solari --features bevy_solari,https,free_camera
```

Currently this PR needs a benchmark against main to ensure there's no
perf regression. I could use some help with that!

---

## Showcase

<img width="2566" height="1514" alt="shot"
src="https://github.com/user-attachments/assets/691b9bd3-129f-47e6-8efe-313cbadd6ff5"
/>

## Known limitations

Tracing spans incorrectly report 0.0ms , tracking in
gfx-rs/wgpu#9414

No denoising support yet. Could theoretically use [MetalFX Ray
Reconstruction](https://crates.io/crates/objc2-metal-fx) in place of
DLSS for cross-platform denoising support in Solari. In the longer term
we are also looking at Open Image Denoise 3.0 that promises temporal
denoising support.

---------

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants