Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to wgpu 23 #15988

Merged
merged 15 commits into from
Nov 5, 2024
Merged

Upgrade to wgpu 23 #15988

merged 15 commits into from
Nov 5, 2024

Conversation

tychedelia
Copy link
Contributor

@tychedelia tychedelia commented Oct 18, 2024

Fixes #15893

@tychedelia tychedelia added this to the 0.15 milestone Oct 18, 2024
@tychedelia tychedelia added A-Rendering Drawing game state to the screen C-Dependencies A change to the crates that Bevy depends on labels Oct 18, 2024
Copy link
Contributor

@djeedai djeedai left a comment

Choose a reason for hiding this comment

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

Looks good to merge as long as we're OK to take a dependency on a moving target (I don't think we should). Also maybe the danger of upgrading to a new version close to release (but I understand it fixes some bug).

crates/bevy_color/Cargo.toml Outdated Show resolved Hide resolved
@JMS55
Copy link
Contributor

JMS55 commented Oct 23, 2024

No need to wrap bind groups in Some() anymore gfx-rs/wgpu#6452

@JMS55
Copy link
Contributor

JMS55 commented Oct 23, 2024

Actually that makes it worse... Can't automatically convert between bevy's and wgpu's bind group type...

note: required by a bound in `wgpu::RenderPass::<'encoder>::set_bind_group`
   --> C:\Users\Jasmine\.cargo\git\checkouts\wgpu-ebe3fb3e55696655\a9033f5\wgpu\src\api\render_pass.rs:80:26
    |
77  |     pub fn set_bind_group<'a>(
    |            -------------- required by a bound in this associated function
...
80  |         bind_group: impl Into<Option<&'a BindGroup>>,
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RenderPass::<'encoder>::set_bind_group`

error[E0277]: the trait bound `std::option::Option<&wgpu::BindGroup>: From<&bind_group::BindGroup>` is not satisfied
   --> crates\bevy_render\src\view\window\screenshot.rs:626:36
    |
626 |             pass.set_bind_group(0, &prepared_state.bind_group, &[]);
    |                  --------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&bind_group::BindGroup>` is not implemented for `std::option::Option<&wgpu::BindGroup>`, which is required by `&bind_group::BindGroup: Into<std::option::Option<&wgpu::BindGroup>>`
    ```

@AlexAegis
Copy link

gfx-rs/wgpu#6465

Looks like wgpu 23 is about to release! 🎉

@Elabajaba
Copy link
Contributor

This doesn't build on iOS currently according to Francois' testing.

@mockersf
Copy link
Member

Just re-triggered a build, here is the failure: https://github.com/TheBevyFlock/bevy-example-runner/actions/runs/11533949819/job/32107445980

@tychedelia
Copy link
Contributor Author

tychedelia commented Oct 26, 2024

Just re-triggered a build, here is the failure: https://github.com/TheBevyFlock/bevy-example-runner/actions/runs/11533949819/job/32107445980

From last month:

gfx-rs/wgpu@fb0cb1e#diff-46fec780a1b7071adf9590bb9d55dfea0f97bd15419ccbe55ee89607fc244335R27

Edit: pushed a commit to attempt to fix this.

@BenjaminBrienen
Copy link
Contributor

BenjaminBrienen commented Oct 26, 2024

With cargo run --example relative_cursor_position I have to set the web-sys dependency to 0.3.72 and then it compiles.

@mockersf
Copy link
Member

Edit: pushed a commit to attempt to fix this.

Building now works 🎉

@JMS55
Copy link
Contributor

JMS55 commented Oct 27, 2024

Might be worth letting wgpu people know that they should include it in the changelog for wgpu 23.

@mockersf
Copy link
Member

released! https://github.com/gfx-rs/wgpu/releases/tag/v23.0.0

@JMS55
Copy link
Contributor

JMS55 commented Oct 30, 2024

Something we can finally now do is use const arrays with dynamic indexes, for e.g. shadow sampling patterns.

We should take advantage of this to cleanup a bunch of shader code.

@djeedai
Copy link
Contributor

djeedai commented Nov 1, 2024

FYI this also brings CAS atomic operations to Metal. I didn't check if that was the last platform missing them (I expect wasm needs CORS, as with everything atomic due to security reasons, if it even supports CAS at the API level already).

@mockersf
Copy link
Member

mockersf commented Nov 4, 2024

@tychedelia naga_oil 0.16 has been updated and released

@tychedelia tychedelia marked this pull request as ready for review November 4, 2024 21:50
Copy link
Contributor

@kristoff3r kristoff3r left a comment

Choose a reason for hiding this comment

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

LGTM, I also tested a bunch of 2d/3d examples on Linux and WebGL and stuff seems to work.

@mockersf
Copy link
Member

mockersf commented Nov 5, 2024

I would like to merge this one quickly and publish a new rc soon after, so get your reviews now! well in the next day or so

@JMS55
Copy link
Contributor

JMS55 commented Nov 5, 2024

Meshlets worked fine, code looks fine.

@tychedelia tychedelia added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 5, 2024
@mockersf mockersf enabled auto-merge November 5, 2024 21:05
@mockersf mockersf added this pull request to the merge queue Nov 5, 2024
Merged via the queue into bevyengine:main with commit 4b05d2f Nov 5, 2024
33 checks passed
mockersf added a commit that referenced this pull request Nov 5, 2024
Fixes #15893

---------

Co-authored-by: François Mockers <[email protected]>
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Dec 2, 2024
Fixes bevyengine#15893

---------

Co-authored-by: François Mockers <[email protected]>
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 C-Dependencies A change to the crates that Bevy depends on 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.

Spawning or modifying many different 2d or 3d materials hangs for minutes or crashes
9 participants