Skip to content

Commit fe3db3c

Browse files
committed
Revert "Upgrade to wgpu 23 (bevyengine#15988)"
This reverts commit 059f662.
1 parent bc32924 commit fe3db3c

File tree

12 files changed

+25
-40
lines changed

12 files changed

+25
-40
lines changed

crates/bevy_color/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ derive_more = { version = "1", default-features = false, features = [
2323
"from",
2424
"display",
2525
] }
26-
wgpu-types = { version = "23", default-features = false, optional = true }
26+
wgpu-types = { version = "22", default-features = false, optional = true }
2727
encase = { version = "0.10", default-features = false }
2828

2929
[features]

crates/bevy_core_pipeline/src/bloom/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use upsampling_pipeline::{
3939

4040
const BLOOM_SHADER_HANDLE: Handle<Shader> = Handle::weak_from_u128(929599476923908);
4141

42-
const BLOOM_TEXTURE_FORMAT: TextureFormat = TextureFormat::Rg11b10Ufloat;
42+
const BLOOM_TEXTURE_FORMAT: TextureFormat = TextureFormat::Rg11b10Float;
4343

4444
pub struct BloomPlugin;
4545

crates/bevy_image/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ image = { version = "0.25.2", default-features = false }
4949
# misc
5050
bitflags = { version = "2.3", features = ["serde"] }
5151
bytemuck = { version = "1.5" }
52-
wgpu = { version = "23.0.1", default-features = false }
52+
wgpu = { version = "22", default-features = false }
5353
serde = { version = "1", features = ["derive"] }
5454
derive_more = { version = "1", default-features = false, features = [
5555
"error",

crates/bevy_image/src/dds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ pub fn dds_format_to_texture_format(
182182
DxgiFormat::R10G10B10A2_Typeless | DxgiFormat::R10G10B10A2_UNorm => {
183183
TextureFormat::Rgb10a2Unorm
184184
}
185-
DxgiFormat::R11G11B10_Float => TextureFormat::Rg11b10Ufloat,
185+
DxgiFormat::R11G11B10_Float => TextureFormat::Rg11b10Float,
186186
DxgiFormat::R8G8B8A8_Typeless
187187
| DxgiFormat::R8G8B8A8_UNorm
188188
| DxgiFormat::R8G8B8A8_UNorm_sRGB => {

crates/bevy_image/src/ktx2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ pub fn ktx2_dfd_to_texture_format(
641641
&& sample_information[2].channel_type == 2
642642
&& sample_information[2].bit_length == 10
643643
{
644-
TextureFormat::Rg11b10Ufloat
644+
TextureFormat::Rg11b10Float
645645
} else if sample_information[0].channel_type == 0
646646
&& sample_information[0].bit_length == 9
647647
&& sample_information[1].channel_type == 1
@@ -1276,7 +1276,7 @@ pub fn ktx2_format_to_texture_format(
12761276
ktx2::Format::R32G32B32A32_SINT => TextureFormat::Rgba32Sint,
12771277
ktx2::Format::R32G32B32A32_SFLOAT => TextureFormat::Rgba32Float,
12781278

1279-
ktx2::Format::B10G11R11_UFLOAT_PACK32 => TextureFormat::Rg11b10Ufloat,
1279+
ktx2::Format::B10G11R11_UFLOAT_PACK32 => TextureFormat::Rg11b10Float,
12801280
ktx2::Format::E5B9G9R9_UFLOAT_PACK32 => TextureFormat::Rgb9e5Ufloat,
12811281

12821282
ktx2::Format::X8_D24_UNORM_PACK32 => TextureFormat::Depth24Plus,

crates/bevy_mesh/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.15.1" }
2424
# misc
2525
bitflags = { version = "2.3", features = ["serde"] }
2626
bytemuck = { version = "1.5" }
27-
wgpu = { version = "23.0.1", default-features = false }
27+
wgpu = { version = "22", default-features = false }
2828
serde = { version = "1", features = ["derive"] }
2929
hexasphere = "15.0"
3030
derive_more = { version = "1", default-features = false, features = [

crates/bevy_reflect/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ glam = { version = "0.29", features = ["serde"], optional = true }
5151
petgraph = { version = "0.6", features = ["serde-1"], optional = true }
5252
smol_str = { version = "0.2.0", features = ["serde"], optional = true }
5353
uuid = { version = "1.0", optional = true, features = ["v4", "serde"] }
54-
wgpu-types = { version = "23", features = ["serde"], optional = true }
54+
wgpu-types = { version = "22", features = ["serde"], optional = true }
5555

5656
[dev-dependencies]
5757
ron = "0.8.0"

crates/bevy_render/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ codespan-reporting = "0.11.0"
6868
# It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm.
6969
# When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing
7070
# and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread.
71-
wgpu = { version = "23.0.1", default-features = false, features = [
71+
wgpu = { version = "22", default-features = false, features = [
7272
"wgsl",
7373
"dx12",
7474
"metal",
7575
"naga-ir",
7676
"fragile-send-sync-non-atomic-wasm",
7777
] }
78-
naga = { version = "23", features = ["wgsl-in"] }
78+
naga = { version = "22", features = ["wgsl-in"] }
7979
serde = { version = "1", features = ["derive"] }
8080
bytemuck = { version = "1.5", features = ["derive", "must_cast"] }
8181
downcast-rs = "1.2.0"
@@ -98,12 +98,12 @@ offset-allocator = "0.2"
9898

9999
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
100100
# Omit the `glsl` feature in non-WebAssembly by default.
101-
naga_oil = { version = "0.16", default-features = false, features = [
101+
naga_oil = { version = "0.15", default-features = false, features = [
102102
"test_shader",
103103
] }
104104

105105
[target.'cfg(target_arch = "wasm32")'.dependencies]
106-
naga_oil = "0.16"
106+
naga_oil = "0.15"
107107
js-sys = "0.3"
108108
web-sys = { version = "0.3.67", features = [
109109
'Blob',

crates/bevy_render/src/render_resource/bind_group.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@ impl From<wgpu::BindGroup> for BindGroup {
4545
}
4646
}
4747

48-
impl<'a> From<&'a BindGroup> for Option<&'a wgpu::BindGroup> {
49-
fn from(value: &'a BindGroup) -> Self {
50-
Some(value.deref())
51-
}
52-
}
53-
54-
impl<'a> From<&'a mut BindGroup> for Option<&'a wgpu::BindGroup> {
55-
fn from(value: &'a mut BindGroup) -> Self {
56-
Some(&*value)
57-
}
58-
}
59-
6048
impl Deref for BindGroup {
6149
type Target = wgpu::BindGroup;
6250

crates/bevy_render/src/render_resource/pipeline_cache.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,9 @@ impl PipelineCache {
734734

735735
// TODO: Expose the rest of this somehow
736736
let compilation_options = PipelineCompilationOptions {
737-
constants: &default(),
738-
zero_initialize_workgroup_memory: descriptor.zero_initialize_workgroup_memory,
737+
constants: &std::collections::HashMap::new(),
738+
zero_initialize_workgroup_memory: false,
739+
vertex_pulling_transform: Default::default(),
739740
};
740741

741742
let descriptor = RawRenderPipelineDescriptor {
@@ -747,15 +748,15 @@ impl PipelineCache {
747748
primitive: descriptor.primitive,
748749
vertex: RawVertexState {
749750
buffers: &vertex_buffer_layouts,
750-
entry_point: Some(descriptor.vertex.entry_point.deref()),
751+
entry_point: descriptor.vertex.entry_point.deref(),
751752
module: &vertex_module,
752753
// TODO: Should this be the same as the fragment compilation options?
753754
compilation_options: compilation_options.clone(),
754755
},
755756
fragment: fragment_data
756757
.as_ref()
757758
.map(|(module, entry_point, targets)| RawFragmentState {
758-
entry_point: Some(entry_point),
759+
entry_point,
759760
module,
760761
targets,
761762
// TODO: Should this be the same as the vertex compilation options?
@@ -813,12 +814,12 @@ impl PipelineCache {
813814
label: descriptor.label.as_deref(),
814815
layout: layout.as_ref().map(|layout| -> &PipelineLayout { layout }),
815816
module: &compute_module,
816-
entry_point: Some(&descriptor.entry_point),
817-
// TODO: Expose the rest of this somehow
817+
entry_point: &descriptor.entry_point,
818+
// TODO: Expose this somehow
818819
compilation_options: PipelineCompilationOptions {
819-
constants: &default(),
820-
zero_initialize_workgroup_memory: descriptor
821-
.zero_initialize_workgroup_memory,
820+
constants: &std::collections::HashMap::new(),
821+
zero_initialize_workgroup_memory: false,
822+
vertex_pulling_transform: Default::default(),
822823
},
823824
cache: None,
824825
};

0 commit comments

Comments
 (0)