Update wgpu to 27.0.0 (#7580)
This commit is contained in:
parent
096ed1c0cb
commit
427c0766fd
101
Cargo.lock
101
Cargo.lock
|
|
@ -49,7 +49,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "ec27574c1baeb7747c802a194566b46b602461e81dc4957949580ea8da695038"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -60,7 +60,7 @@ checksum = "bf962bfd305aed21133d06128ab3f4a6412031a5b8505534d55af869788af272"
|
|||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_consumer",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.2",
|
||||
"objc2 0.5.2",
|
||||
"objc2-app-kit 0.2.2",
|
||||
"objc2-foundation 0.2.2",
|
||||
|
|
@ -92,7 +92,7 @@ checksum = "e4cd727229c389e32c1a78fe9f74dc62d7c9fb6eac98cfa1a17efde254fb2d98"
|
|||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_consumer",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.2",
|
||||
"static_assertions",
|
||||
"windows 0.61.1",
|
||||
"windows-core 0.61.0",
|
||||
|
|
@ -1701,6 +1701,12 @@ version = "0.1.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
||||
|
||||
[[package]]
|
||||
name = "fontconfig-parser"
|
||||
version = "0.5.7"
|
||||
|
|
@ -2012,7 +2018,7 @@ checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca"
|
|||
dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
"gpu-descriptor-types",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2041,7 +2047,16 @@ version = "0.15.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
||||
dependencies = [
|
||||
"foldhash",
|
||||
"foldhash 0.1.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
|
||||
dependencies = [
|
||||
"foldhash 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2297,7 +2312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2435,9 +2450,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.168"
|
||||
version = "0.2.176"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
|
||||
checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
|
@ -2638,9 +2653,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c"
|
||||
checksum = "12b2e757b11b47345d44e7760e45458339bc490463d9548cd8651c53ae523153"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.8.0",
|
||||
|
|
@ -2649,7 +2664,7 @@ dependencies = [
|
|||
"cfg_aliases",
|
||||
"codespan-reporting",
|
||||
"half",
|
||||
"hashbrown",
|
||||
"hashbrown 0.16.0",
|
||||
"hexf-parse",
|
||||
"indexmap",
|
||||
"libm",
|
||||
|
|
@ -2658,7 +2673,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"rustc-hash",
|
||||
"spirv",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.17",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
|
|
@ -3506,7 +3521,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
|||
dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3895,9 +3910,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.13.2"
|
||||
version = "1.15.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
||||
|
||||
[[package]]
|
||||
name = "smithay-client-toolkit"
|
||||
|
|
@ -4118,11 +4133,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.11"
|
||||
version = "2.0.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
|
||||
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.11",
|
||||
"thiserror-impl 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4138,9 +4153,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.11"
|
||||
version = "2.0.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
||||
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -4751,16 +4766,16 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
|
|||
|
||||
[[package]]
|
||||
name = "wgpu"
|
||||
version = "26.0.1"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798"
|
||||
checksum = "3a355f55850044d897fdaa72199509ff08baaa0c387c4c80599decb5ee86790b"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags 2.9.0",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"document-features",
|
||||
"hashbrown",
|
||||
"hashbrown 0.16.0",
|
||||
"js-sys",
|
||||
"log",
|
||||
"naga",
|
||||
|
|
@ -4780,17 +4795,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "26.0.1"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9"
|
||||
checksum = "893764e276cdafec946c7f394f044e283bc8f1e445ab3fea8ad3b6dbc10c0322"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.8.0",
|
||||
"bit-vec 0.8.0",
|
||||
"bitflags 2.9.0",
|
||||
"bytemuck",
|
||||
"cfg_aliases",
|
||||
"document-features",
|
||||
"hashbrown",
|
||||
"hashbrown 0.16.0",
|
||||
"indexmap",
|
||||
"log",
|
||||
"naga",
|
||||
|
|
@ -4801,7 +4817,7 @@ dependencies = [
|
|||
"raw-window-handle",
|
||||
"rustc-hash",
|
||||
"smallvec",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.17",
|
||||
"wgpu-core-deps-apple",
|
||||
"wgpu-core-deps-emscripten",
|
||||
"wgpu-core-deps-wasm",
|
||||
|
|
@ -4812,45 +4828,45 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-apple"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf"
|
||||
checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-emscripten"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7670e390f416006f746b4600fdd9136455e3627f5bd763abf9a65daa216dd2d"
|
||||
checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-wasm"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c03b9f9e1a50686d315fc6debe4980cc45cd37b0e919351917df494e8fdc8885"
|
||||
checksum = "9b1027dcf3b027a877e44819df7ceb0e2e98578830f8cd34cd6c3c7c2a7a50b7"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-windows-linux-android"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14"
|
||||
checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "26.0.4"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e"
|
||||
checksum = "a753c3dc95e69be3aacfe9c871c5fa2cfa9e35748cdc87de7ba5fc1735b61604"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"arrayvec",
|
||||
|
|
@ -4867,7 +4883,7 @@ dependencies = [
|
|||
"gpu-alloc",
|
||||
"gpu-allocator",
|
||||
"gpu-descriptor",
|
||||
"hashbrown",
|
||||
"hashbrown 0.16.0",
|
||||
"js-sys",
|
||||
"khronos-egl",
|
||||
"libc",
|
||||
|
|
@ -4877,6 +4893,7 @@ dependencies = [
|
|||
"naga",
|
||||
"ndk-sys",
|
||||
"objc",
|
||||
"once_cell",
|
||||
"ordered-float",
|
||||
"parking_lot",
|
||||
"portable-atomic",
|
||||
|
|
@ -4886,7 +4903,7 @@ dependencies = [
|
|||
"raw-window-handle",
|
||||
"renderdoc-sys",
|
||||
"smallvec",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.17",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
"wgpu-types",
|
||||
|
|
@ -4896,15 +4913,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "26.0.0"
|
||||
version = "27.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2"
|
||||
checksum = "d67453b02f7adc33c452d17da1c2cad813448221df1547bce9dd4b02d3558538"
|
||||
dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
"bytemuck",
|
||||
"js-sys",
|
||||
"log",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.17",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ wasm-bindgen = "0.2"
|
|||
wasm-bindgen-futures = "0.4"
|
||||
web-sys = "0.3.73"
|
||||
web-time = "1.1.0" # Timekeeping for native and web
|
||||
wgpu = { version = "26.0.1", default-features = false }
|
||||
wgpu = { version = "27.0.0", default-features = false }
|
||||
windows-sys = "0.60"
|
||||
winit = { version = "0.30.12", default-features = false }
|
||||
|
||||
|
|
|
|||
|
|
@ -179,15 +179,13 @@ impl Default for WgpuSetupCreateNew {
|
|||
|
||||
wgpu::DeviceDescriptor {
|
||||
label: Some("egui wgpu device"),
|
||||
required_features: wgpu::Features::default(),
|
||||
required_limits: wgpu::Limits {
|
||||
// When using a depth buffer, we have to be able to create a texture
|
||||
// large enough for the entire surface, and we want to support 4k+ displays.
|
||||
max_texture_dimension_2d: 8192,
|
||||
..base_limits
|
||||
},
|
||||
memory_hints: wgpu::MemoryHints::default(),
|
||||
trace: wgpu::Trace::Off,
|
||||
..Default::default()
|
||||
}
|
||||
}),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ use std::iter;
|
|||
use std::mem::size_of;
|
||||
use std::sync::mpsc::channel;
|
||||
|
||||
use crate::wgpu::WAIT_TIMEOUT;
|
||||
|
||||
pub(crate) fn texture_to_image(device: &Device, queue: &Queue, texture: &Texture) -> RgbaImage {
|
||||
let buffer_dimensions =
|
||||
BufferDimensions::new(texture.width() as usize, texture.height() as usize);
|
||||
|
|
@ -48,7 +50,10 @@ pub(crate) fn texture_to_image(device: &Device, queue: &Queue, texture: &Texture
|
|||
|
||||
// Poll the device in a blocking manner so that our future resolves.
|
||||
device
|
||||
.poll(wgpu::PollType::WaitForSubmissionIndex(submission_index))
|
||||
.poll(wgpu::PollType::Wait {
|
||||
submission_index: Some(submission_index),
|
||||
timeout: Some(WAIT_TIMEOUT),
|
||||
})
|
||||
.expect("Failed to poll device");
|
||||
|
||||
receiver.recv().unwrap().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use std::iter::once;
|
||||
use std::sync::Arc;
|
||||
use std::{iter::once, time::Duration};
|
||||
|
||||
use egui::TexturesDelta;
|
||||
use egui_wgpu::{RenderState, ScreenDescriptor, WgpuSetup, wgpu};
|
||||
|
|
@ -7,6 +7,9 @@ use image::RgbaImage;
|
|||
|
||||
use crate::texture_to_image::texture_to_image;
|
||||
|
||||
/// Timeout for waiting on the GPU to finish rendering.
|
||||
pub(crate) const WAIT_TIMEOUT: Duration = Duration::from_secs(1);
|
||||
|
||||
/// Default wgpu setup used for the wgpu renderer.
|
||||
pub fn default_wgpu_setup() -> egui_wgpu::WgpuSetup {
|
||||
let mut setup = egui_wgpu::WgpuSetupCreateNew::default();
|
||||
|
|
@ -205,7 +208,10 @@ impl crate::TestRenderer for WgpuTestRenderer {
|
|||
|
||||
self.render_state
|
||||
.device
|
||||
.poll(wgpu::PollType::Wait)
|
||||
.poll(wgpu::PollType::Wait {
|
||||
submission_index: None,
|
||||
timeout: Some(WAIT_TIMEOUT),
|
||||
})
|
||||
.map_err(|err| format!("PollError: {err}"))?;
|
||||
|
||||
Ok(texture_to_image(
|
||||
|
|
|
|||
|
|
@ -57,8 +57,9 @@ skip = [
|
|||
{ name = "core-graphics-types" }, # version conflict between winit and wgpu ecosystems
|
||||
]
|
||||
skip-tree = [
|
||||
{ name = "rfd" }, # example dependency
|
||||
{ name = "windows" }, # the ecosystem is currently transitioning from 0.58 to 0.61
|
||||
{ name = "hashbrown" }, # wgpu's naga depends on 0.16, accesskit depends on 0.15
|
||||
{ name = "rfd" }, # example dependency
|
||||
{ name = "windows" }, # the ecosystem is currently transitioning from 0.58 to 0.61
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue