update wgpu to 0.17 (#378)

required changes are entirely trivial:
wgpu::util::initialize_adapter_from_env's signature changed;
the backend_bits parameter is removed, and now solely specified by
the instance's enabled backends (see [the changelog](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#initialize_adapter_from_env-argument-changes)).
This commit is contained in:
erin petra sofiya moon 2023-10-29 23:49:07 -05:00 committed by GitHub
parent b387ee2044
commit 763a7a9b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 59 deletions

100
Cargo.lock generated
View file

@ -168,12 +168,6 @@ dependencies = [
"system-deps", "system-deps",
] ]
[[package]]
name = "atomic_refcell"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c"
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.1.0" version = "1.1.0"
@ -621,12 +615,12 @@ dependencies = [
[[package]] [[package]]
name = "d3d12" name = "d3d12"
version = "0.6.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 2.4.1",
"libloading 0.7.4", "libloading 0.8.1",
"winapi", "winapi",
] ]
@ -708,18 +702,18 @@ dependencies = [
[[package]] [[package]]
name = "ecolor" name = "ecolor"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e479a7fa3f23d4e794f8b2f8b3568dd4e47886ad1b12c9c095e141cb591eb63" checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
] ]
[[package]] [[package]]
name = "egui" name = "egui"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3aef8ec3ae1b772f340170c65bf27d5b8c28f543a0116c844d2ac08d01123e7" checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7"
dependencies = [ dependencies = [
"ahash", "ahash",
"epaint", "epaint",
@ -729,9 +723,9 @@ dependencies = [
[[package]] [[package]]
name = "egui-wgpu" name = "egui-wgpu"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33caaedd8283779c787298af23d8754a7e88421ff32e89ad0040c855fc0b0224" checksum = "62d4c9ab93d9528c184ef1d695c8c99b2e6d50833696ec3f513063efeee0fe77"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"epaint", "epaint",
@ -743,23 +737,23 @@ dependencies = [
[[package]] [[package]]
name = "egui-winit" name = "egui-winit"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a49155fd4a0a4fb21224407a91de0030847972ef90fc64edb63621caea61cb2" checksum = "c15479a96d9fadccf5dac690bdc6373b97b8e1c0dd28367058f25a5298da0195"
dependencies = [ dependencies = [
"egui", "egui",
"instant",
"log", "log",
"raw-window-handle 0.5.2", "raw-window-handle 0.5.2",
"web-time",
"webbrowser", "webbrowser",
"winit 0.28.7", "winit 0.28.7",
] ]
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3857d743a6e0741cdd60b622a74c7a36ea75f5f8f11b793b41d905d2c9721a4b" checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
] ]
@ -779,13 +773,12 @@ dependencies = [
[[package]] [[package]]
name = "epaint" name = "epaint"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09333964d4d57f40a85338ba3ca5ed4716070ab184dcfed966b35491c5c64f3b" checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"ahash", "ahash",
"atomic_refcell",
"bytemuck", "bytemuck",
"ecolor", "ecolor",
"emath", "emath",
@ -1287,21 +1280,21 @@ dependencies = [
[[package]] [[package]]
name = "gpu-alloc" name = "gpu-alloc"
version = "0.5.4" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 2.4.1",
"gpu-alloc-types", "gpu-alloc-types",
] ]
[[package]] [[package]]
name = "gpu-alloc-types" name = "gpu-alloc-types"
version = "0.2.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 2.4.1",
] ]
[[package]] [[package]]
@ -1527,8 +1520,9 @@ dependencies = [
[[package]] [[package]]
name = "imgui-wgpu" name = "imgui-wgpu"
version = "0.22.0" version = "0.24.0"
source = "git+https://github.com/Nelarius/imgui-wgpu-rs.git?rev=1cd675a79a605835c1ea996d68a943cd3c3b4af9#1cd675a79a605835c1ea996d68a943cd3c3b4af9" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c7cf3740fd216da2721676c0e5264821169211f557ac6baa99c644a3869b324"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"imgui", "imgui",
@ -1852,16 +1846,17 @@ dependencies = [
[[package]] [[package]]
name = "metal" name = "metal"
version = "0.24.0" version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 2.4.1",
"block", "block",
"core-graphics-types", "core-graphics-types",
"foreign-types 0.3.2", "foreign-types 0.5.0",
"log", "log",
"objc", "objc",
"paste",
] ]
[[package]] [[package]]
@ -1978,12 +1973,12 @@ dependencies = [
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.12.3" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e"
dependencies = [ dependencies = [
"bit-set", "bit-set",
"bitflags 1.3.2", "bitflags 2.4.1",
"codespan-reporting", "codespan-reporting",
"hexf-parse", "hexf-parse",
"indexmap 1.9.3", "indexmap 1.9.3",
@ -3507,6 +3502,16 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "web-time"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]] [[package]]
name = "webbrowser" name = "webbrowser"
version = "0.8.12" version = "0.8.12"
@ -3526,9 +3531,9 @@ dependencies = [
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "0.16.3" version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" checksum = "ed547920565c56c7a29afb4538ac5ae5048865a5d2f05bff3ad4fbeb921a9a2c"
dependencies = [ dependencies = [
"arrayvec 0.7.4", "arrayvec 0.7.4",
"cfg-if", "cfg-if",
@ -3550,9 +3555,9 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "0.16.1" version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" checksum = "0f8a44dd301a30ceeed3c27d8c0090433d3da04d7b2a4042738095a424d12ae7"
dependencies = [ dependencies = [
"arrayvec 0.7.4", "arrayvec 0.7.4",
"bit-vec", "bit-vec",
@ -3573,9 +3578,9 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-hal" name = "wgpu-hal"
version = "0.16.2" version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" checksum = "9a80bf0e3c77399bb52850cb0830af9bad073d5cfcb9dd8253bef8125c42db17"
dependencies = [ dependencies = [
"android_system_properties", "android_system_properties",
"arrayvec 0.7.4", "arrayvec 0.7.4",
@ -3585,7 +3590,6 @@ dependencies = [
"block", "block",
"core-graphics-types", "core-graphics-types",
"d3d12", "d3d12",
"foreign-types 0.3.2",
"glow", "glow",
"gpu-alloc", "gpu-alloc",
"gpu-allocator", "gpu-allocator",
@ -3615,9 +3619,9 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "0.16.1" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"js-sys", "js-sys",

View file

@ -24,10 +24,10 @@ bytemuck = "1.12"
raw-window-handle = "0.5" raw-window-handle = "0.5"
thiserror = "1.0" thiserror = "1.0"
ultraviolet = "0.9" ultraviolet = "0.9"
wgpu = "0.16" wgpu = "0.17"
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
wgpu = { version = "0.16", features = ["webgl"] } wgpu = { version = "0.17", features = ["webgl"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pollster = "0.3" pollster = "0.3"

View file

@ -13,13 +13,9 @@ default = ["optimize"]
env_logger = "0.10" env_logger = "0.10"
error-iter = "0.4" error-iter = "0.4"
imgui = "0.11" imgui = "0.11"
# imgui-wgpu = "0.22" imgui-wgpu = "0.24"
imgui-winit-support = "0.11" imgui-winit-support = "0.11"
log = "0.4" log = "0.4"
pixels = { path = "../.." } pixels = { path = "../.." }
winit = "0.27" winit = "0.27"
winit_input_helper = "0.13" winit_input_helper = "0.13"
[dependencies.imgui-wgpu]
git = "https://github.com/Nelarius/imgui-wgpu-rs.git"
rev = "1cd675a79a605835c1ea996d68a943cd3c3b4af9"

View file

@ -10,9 +10,9 @@ optimize = ["log/release_max_level_warn"]
default = ["optimize"] default = ["optimize"]
[dependencies] [dependencies]
egui = "0.22" egui = "0.23"
egui-wgpu = "0.22" egui-wgpu = "0.23"
egui-winit = { version = "0.22", default-features = false, features = ["links"] } egui-winit = { version = "0.23", default-features = false, features = ["links"] }
env_logger = "0.10" env_logger = "0.10"
error-iter = "0.4" error-iter = "0.4"
log = "0.4" log = "0.4"

View file

@ -253,7 +253,7 @@ impl<'req, 'dev, 'win, W: HasRawWindowHandle + HasRawDisplayHandle>
let surface = unsafe { instance.create_surface(self.surface_texture.window) }?; let surface = unsafe { instance.create_surface(self.surface_texture.window) }?;
let compatible_surface = Some(&surface); let compatible_surface = Some(&surface);
let request_adapter_options = &self.request_adapter_options; let request_adapter_options = &self.request_adapter_options;
let adapter = match wgpu::util::initialize_adapter_from_env(&instance, self.backend) { let adapter = match wgpu::util::initialize_adapter_from_env(&instance, compatible_surface) {
Some(adapter) => Some(adapter), Some(adapter) => Some(adapter),
None => { None => {
instance instance