Skip to content

Commit fbe0da0

Browse files
ChristopherBiscardiatlv24
authored andcommitted
wgpu update for v29. I have tested on macos m1, m5, and windows. Linux testing is appreciated. - [x] before merge, naga_oil and dlss_wgpu need to be published, and the patches referencing their respective PRs removed from the workspace Cargo.toml ##### other PRs - naga_oil: bevyengine/naga_oil#134 - dlss_wgpu: bevyengine/dlss_wgpu#27 ##### Source of relevant changes - `Dx12Compiler::DynamicDxc` no longer has `max_shader_model` - gfx-rs/wgpu#8607 - `Dx12BackendOptions::force_shader_model` comes from: - gfx-rs/wgpu#8984 - Allow optional `RawDisplayHandle` in `InstanceDescriptor` - gfx-rs/wgpu#8012 - Add `GlDebugFns` option to disable OpenGL debug functions - gfx-rs/wgpu#8931 - Add a DX12 backend option to force a certain shader model - gfx-rs/wgpu#8984 - Migrate validation from maxInterStageShaderComponents to maxInterStageShaderVariables - gfx-rs/wgpu#8652 - gaps are now supported in bind group layouts - gfx-rs/wgpu#9034 - depth validation changed to option to match spec - gfx-rs/wgpu#8840 - SHADER_PRIMITIVE_INDEX is now PRIMITIVE_INDEX - gfx-rs/wgpu#9101 - Support for binding arrays of RT acceleration structures - gfx-rs/wgpu#8923 - Make HasDisplayHandle optional in WindowHandle - gfx-rs/wgpu#8782 - `QueueWriteBufferView` can no longer be dereferenced to `&mut [u8]`, so use `WriteOnly`. - gfx-rs/wgpu#9042 - ~bevy_mesh currently has an added dependency on `wgpu`, can we move `WriteOnly` to wgpu-types?~ (it is in wgpu-types now) - Change max_*_buffer_binding_size type to match WebGPU spec (u32 -> u64) - gfx-rs/wgpu#9146 - raw vulkan init `open_with_callback` takes Limits as argument now - gfx-rs/wgpu#8756 ## Known Issues There is currently one known issue with occlusion culling on macos, which we've decided to disable on macos by checking the limits we actually require. This makes it so that if wgpu releases a patch fix, bevy 0.19 users will benefit from occlusion culling re-enabling for them. <details><summary>More details</summary> On macos, the wpgu limits were changed to align with the spec and now put the early and late GPU occlusion culling `StorageBuffer` limit at 8, but we currently use 9. [Filed in wgpu repo](gfx-rs/wgpu#9287) ``` 2026-03-19T01:37:10.771117Z ERROR bevy_render::error_handler: Caught rendering error: Validation Error Caused by: In Device::create_bind_group_layout, label = 'build mesh uniforms GPU late occlusion culling bind group layout' Too many bindings of type StorageBuffers in Stage ShaderStages(COMPUTE), limit is 8, count was 9. Check the limit `max_storage_buffers_per_shader_stage` passed to `Adapter::request_device` ``` </details> solari working on wgpu 29: <img width="1282" height="752" alt="image" src="https://github.com/user-attachments/assets/4744faec-65c0-4a72-93e1-34a721fc26d8" /> --------- Co-authored-by: atlv <email@atlasdostal.com>
1 parent 56a4fd7 commit fbe0da0

48 files changed

Lines changed: 182 additions & 123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/bevy_anti_alias/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.19.0-dev" }
3434

3535
# other
3636
tracing = { version = "0.1", default-features = false, features = ["std"] }
37-
dlss_wgpu = { version = "4.0.0-dev", optional = true }
37+
dlss_wgpu = { version = "4.0.0", optional = true }
3838
uuid = { version = "1.21.0", optional = true }
3939

4040
[lints]

crates/bevy_anti_alias/src/smaa/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ impl SpecializedRenderPipeline for SmaaEdgeDetectionPipeline {
477477
}),
478478
depth_stencil: Some(DepthStencilState {
479479
format: TextureFormat::Stencil8,
480-
depth_write_enabled: false,
481-
depth_compare: CompareFunction::Always,
480+
depth_write_enabled: Some(false),
481+
depth_compare: Some(CompareFunction::Always),
482482
stencil: StencilState {
483483
front: stencil_face_state,
484484
back: stencil_face_state,
@@ -534,8 +534,8 @@ impl SpecializedRenderPipeline for SmaaBlendingWeightCalculationPipeline {
534534
}),
535535
depth_stencil: Some(DepthStencilState {
536536
format: TextureFormat::Stencil8,
537-
depth_write_enabled: false,
538-
depth_compare: CompareFunction::Always,
537+
depth_write_enabled: Some(false),
538+
depth_compare: Some(CompareFunction::Always),
539539
stencil: StencilState {
540540
front: stencil_face_state,
541541
back: stencil_face_state,

crates/bevy_camera/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bevy_color = { path = "../bevy_color", version = "0.19.0-dev", features = [
2828
bevy_window = { path = "../bevy_window", version = "0.19.0-dev" }
2929

3030
# other
31-
wgpu-types = { version = "28", default-features = false }
31+
wgpu-types = { version = "29", default-features = false }
3232
serde = { version = "1", default-features = false, features = ["derive"] }
3333
thiserror = { version = "2", default-features = false }
3434
downcast-rs = { version = "2", default-features = false, features = ["std"] }

crates/bevy_color/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ serde = { version = "1.0", features = [
2020
], default-features = false, optional = true }
2121
thiserror = { version = "2", default-features = false }
2222
derive_more = { version = "2", default-features = false, features = ["from"] }
23-
wgpu-types = { version = "28", default-features = false, optional = true }
23+
wgpu-types = { version = "29", default-features = false, optional = true }
2424
encase = { version = "0.12", default-features = false, optional = true }
2525

2626
[features]

crates/bevy_core_pipeline/src/deferred/copy_lighting_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ pub fn init_copy_deferred_lighting_id_pipeline(
124124
}),
125125
depth_stencil: Some(DepthStencilState {
126126
format: DEFERRED_LIGHTING_PASS_ID_DEPTH_FORMAT,
127-
depth_write_enabled: true,
128-
depth_compare: CompareFunction::Always,
127+
depth_write_enabled: Some(true),
128+
depth_compare: Some(CompareFunction::Always),
129129
stencil: StencilState::default(),
130130
bias: DepthBiasState::default(),
131131
}),

crates/bevy_core_pipeline/src/prepass/background_motion_vectors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ impl SpecializedRenderPipeline for BackgroundMotionVectorsPipeline {
155155
vertex: self.fullscreen_shader.to_vertex_state(),
156156
depth_stencil: Some(DepthStencilState {
157157
format: CORE_3D_DEPTH_FORMAT,
158-
depth_write_enabled: false,
159-
depth_compare: CompareFunction::GreaterEqual,
158+
depth_write_enabled: Some(false),
159+
depth_compare: Some(CompareFunction::GreaterEqual),
160160
stencil: default(),
161161
bias: default(),
162162
}),

crates/bevy_core_pipeline/src/skybox/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ impl SpecializedRenderPipeline for SkyboxPipeline {
148148
},
149149
depth_stencil: Some(DepthStencilState {
150150
format: key.depth_format,
151-
depth_write_enabled: false,
152-
depth_compare: CompareFunction::GreaterEqual,
151+
depth_write_enabled: Some(false),
152+
depth_compare: Some(CompareFunction::GreaterEqual),
153153
stencil: StencilState {
154154
front: StencilFaceState::IGNORE,
155155
back: StencilFaceState::IGNORE,

crates/bevy_dev_tools/src/infinite_grid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ impl SpecializedRenderPipeline for InfiniteGridPipeline {
488488
},
489489
depth_stencil: Some(DepthStencilState {
490490
format: TextureFormat::Depth32Float,
491-
depth_write_enabled: false,
492-
depth_compare: CompareFunction::Greater,
491+
depth_write_enabled: Some(false),
492+
depth_compare: Some(CompareFunction::Greater),
493493
stencil: Default::default(),
494494
bias: Default::default(),
495495
}),

crates/bevy_gizmos_render/src/pipeline_2d.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ impl SpecializedRenderPipeline for LineGizmoPipeline {
154154
layout,
155155
depth_stencil: Some(DepthStencilState {
156156
format: CORE_2D_DEPTH_FORMAT,
157-
depth_write_enabled: false,
158-
depth_compare: CompareFunction::Always,
157+
depth_write_enabled: Some(false),
158+
depth_compare: Some(CompareFunction::Always),
159159
stencil: StencilState {
160160
front: StencilFaceState::IGNORE,
161161
back: StencilFaceState::IGNORE,
@@ -243,8 +243,8 @@ impl SpecializedRenderPipeline for LineJointGizmoPipeline {
243243
primitive: PrimitiveState::default(),
244244
depth_stencil: Some(DepthStencilState {
245245
format: CORE_2D_DEPTH_FORMAT,
246-
depth_write_enabled: false,
247-
depth_compare: CompareFunction::Always,
246+
depth_write_enabled: Some(false),
247+
depth_compare: Some(CompareFunction::Always),
248248
stencil: StencilState {
249249
front: StencilFaceState::IGNORE,
250250
back: StencilFaceState::IGNORE,

crates/bevy_gizmos_render/src/pipeline_3d.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ fn init_line_gizmo_pipelines(
9898
],
9999
depth_stencil: Some(DepthStencilState {
100100
format: CORE_3D_DEPTH_FORMAT,
101-
depth_write_enabled: true,
102-
depth_compare: CompareFunction::Greater,
101+
depth_write_enabled: Some(true),
102+
depth_compare: Some(CompareFunction::Greater),
103103
stencil: StencilState::default(),
104104
bias: DepthBiasState::default(),
105105
}),
@@ -252,8 +252,8 @@ impl SpecializedRenderPipeline for LineJointGizmoPipeline {
252252
layout,
253253
depth_stencil: Some(DepthStencilState {
254254
format: CORE_3D_DEPTH_FORMAT,
255-
depth_write_enabled: true,
256-
depth_compare: CompareFunction::Greater,
255+
depth_write_enabled: Some(true),
256+
depth_compare: Some(CompareFunction::Greater),
257257
stencil: StencilState::default(),
258258
bias: DepthBiasState::default(),
259259
}),

0 commit comments

Comments
 (0)