From cb45943753bc158a9ff9e7319e37d70c94ebaf33 Mon Sep 17 00:00:00 2001 From: charlotte Date: Thu, 10 Jul 2025 13:38:20 -0700 Subject: [PATCH] Wgpu 26 released. --- crates/bevy_color/Cargo.toml | 2 +- crates/bevy_image/Cargo.toml | 2 +- crates/bevy_mesh/Cargo.toml | 2 +- crates/bevy_reflect/Cargo.toml | 2 +- crates/bevy_render/Cargo.toml | 8 ++++---- crates/bevy_render/src/render_resource/mod.rs | 2 +- crates/bevy_render/src/renderer/mod.rs | 9 +++++++++ crates/bevy_winit/Cargo.toml | 2 +- 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/crates/bevy_color/Cargo.toml b/crates/bevy_color/Cargo.toml index 45e69f31a5..071ffcd88b 100644 --- a/crates/bevy_color/Cargo.toml +++ b/crates/bevy_color/Cargo.toml @@ -20,7 +20,7 @@ serde = { version = "1.0", features = [ ], default-features = false, optional = true } thiserror = { version = "2", default-features = false } derive_more = { version = "2", default-features = false, features = ["from"] } -wgpu-types = { path = "../../../../gfx-rs/wgpu/wgpu-types", default-features = false, optional = true } +wgpu-types = { version= "26", default-features = false, optional = true } encase = { version = "0.10", default-features = false, optional = true } [features] diff --git a/crates/bevy_image/Cargo.toml b/crates/bevy_image/Cargo.toml index 52da9d1b9d..43c6db0987 100644 --- a/crates/bevy_image/Cargo.toml +++ b/crates/bevy_image/Cargo.toml @@ -70,7 +70,7 @@ image = { version = "0.25.2", default-features = false } # misc bitflags = { version = "2.3", features = ["serde"] } bytemuck = { version = "1.5" } -wgpu-types = { path = "../../../../gfx-rs/wgpu/wgpu-types", default-features = false } +wgpu-types = { version= "26", default-features = false } serde = { version = "1", features = ["derive"] } thiserror = { version = "2", default-features = false } futures-lite = "2.0.1" diff --git a/crates/bevy_mesh/Cargo.toml b/crates/bevy_mesh/Cargo.toml index 8f144188d0..8ec810a037 100644 --- a/crates/bevy_mesh/Cargo.toml +++ b/crates/bevy_mesh/Cargo.toml @@ -27,7 +27,7 @@ bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-fea # other bitflags = { version = "2.3", features = ["serde"] } bytemuck = { version = "1.5" } -wgpu-types = { path = "../../../../gfx-rs/wgpu/wgpu-types", default-features = false } +wgpu-types = { version= "26", default-features = false } serde = { version = "1", default-features = false, features = [ "derive", ], optional = true } diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index 06e6833828..e00ac01885 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -109,7 +109,7 @@ uuid = { version = "1.13.1", default-features = false, optional = true, features "serde", ] } variadics_please = "1.1" -wgpu-types = { path = "../../../../gfx-rs/wgpu/wgpu-types", features = [ +wgpu-types = { version= "26", features = [ "serde", ], optional = true, default-features = false } diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index 65bb457b19..d35f702eb9 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -90,7 +90,7 @@ codespan-reporting = "0.12.0" # It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm. # When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing # and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread. -wgpu = { path = "../../../../gfx-rs/wgpu/wgpu", default-features = false, features = [ +wgpu = { version = "26", default-features = false, features = [ "wgsl", "dx12", "metal", @@ -99,7 +99,7 @@ wgpu = { path = "../../../../gfx-rs/wgpu/wgpu", default-features = false, featur "naga-ir", "fragile-send-sync-non-atomic-wasm", ] } -naga = { path = "../../../../gfx-rs/wgpu/naga", features = ["wgsl-in"] } +naga = { version = "26", features = ["wgsl-in"] } serde = { version = "1", features = ["derive"] } bytemuck = { version = "1.5", features = ["derive", "must_cast"] } downcast-rs = { version = "2", default-features = false, features = ["std"] } @@ -125,7 +125,7 @@ wesl = { version = "0.1.2", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # Omit the `glsl` feature in non-WebAssembly by default. -naga_oil = { path = "../../../naga_oil", default-features = false, features = [ +naga_oil = { git = "https://github.com/tychedelia/naga_oil", branch = "wgpu-26", default-features = false, features = [ "test_shader", ] } @@ -133,7 +133,7 @@ naga_oil = { path = "../../../naga_oil", default-features = false, features = [ proptest = "1" [target.'cfg(target_arch = "wasm32")'.dependencies] -naga_oil = { path = "../../../naga_oil" } +naga_oil = { git = "https://github.com/tychedelia/naga_oil", branch = "wgpu-26" } js-sys = "0.3" web-sys = { version = "0.3.67", features = [ 'Blob', diff --git a/crates/bevy_render/src/render_resource/mod.rs b/crates/bevy_render/src/render_resource/mod.rs index 09be66e840..8c0f87d716 100644 --- a/crates/bevy_render/src/render_resource/mod.rs +++ b/crates/bevy_render/src/render_resource/mod.rs @@ -60,7 +60,7 @@ pub use wgpu::{ TexelCopyBufferInfo, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, TextureDescriptor, TextureDimension, TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType, TextureUsages, TextureView as WgpuTextureView, - TextureViewDescriptor, TextureViewDimension, Tlas, TlasInstance, TlasPackage, VertexAttribute, + TextureViewDescriptor, TextureViewDimension, Tlas, TlasInstance, VertexAttribute, VertexBufferLayout as RawVertexBufferLayout, VertexFormat, VertexState as RawVertexState, VertexStepMode, COPY_BUFFER_ALIGNMENT, }; diff --git a/crates/bevy_render/src/renderer/mod.rs b/crates/bevy_render/src/renderer/mod.rs index 5df4967757..9eddba9122 100644 --- a/crates/bevy_render/src/renderer/mod.rs +++ b/crates/bevy_render/src/renderer/mod.rs @@ -294,6 +294,14 @@ pub async fn initialize_renderer( max_non_sampler_bindings: limits .max_non_sampler_bindings .min(constrained_limits.max_non_sampler_bindings), + max_blas_primitive_count: limits.max_blas_primitive_count + .min(constrained_limits.max_blas_primitive_count), + max_blas_geometry_count: limits + .max_blas_geometry_count + .min(constrained_limits.max_blas_geometry_count), + max_tlas_instance_count: limits + .max_tlas_instance_count + .min(constrained_limits.max_tlas_instance_count), max_color_attachments: limits .max_color_attachments .min(constrained_limits.max_color_attachments), @@ -306,6 +314,7 @@ pub async fn initialize_renderer( max_subgroup_size: limits .max_subgroup_size .min(constrained_limits.max_subgroup_size), + max_acceleration_structures_per_shader_stage: 0, }; } diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 8158a21702..63336913e1 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -59,7 +59,7 @@ cfg-if = "1.0" raw-window-handle = "0.6" serde = { version = "1.0", features = ["derive"], optional = true } bytemuck = { version = "1.5", optional = true } -wgpu-types = { path = "../../../../gfx-rs/wgpu/wgpu-types", optional = true } +wgpu-types = { version= "26", optional = true } accesskit = "0.19" tracing = { version = "0.1", default-features = false, features = ["std"] }