Skip to content

Commit

Permalink
update wgpu to 0.17 (#378)
Browse files Browse the repository at this point in the history
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)).
  • Loading branch information
barzamin authored Oct 30, 2023
1 parent b387ee2 commit 763a7a9
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 59 deletions.
100 changes: 52 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ bytemuck = "1.12"
raw-window-handle = "0.5"
thiserror = "1.0"
ultraviolet = "0.9"
wgpu = "0.16"
wgpu = "0.17"

[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]
pollster = "0.3"
Expand Down
6 changes: 1 addition & 5 deletions examples/imgui-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ default = ["optimize"]
env_logger = "0.10"
error-iter = "0.4"
imgui = "0.11"
# imgui-wgpu = "0.22"
imgui-wgpu = "0.24"
imgui-winit-support = "0.11"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"

[dependencies.imgui-wgpu]
git = "https://github.com/Nelarius/imgui-wgpu-rs.git"
rev = "1cd675a79a605835c1ea996d68a943cd3c3b4af9"
6 changes: 3 additions & 3 deletions examples/minimal-egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ optimize = ["log/release_max_level_warn"]
default = ["optimize"]

[dependencies]
egui = "0.22"
egui-wgpu = "0.22"
egui-winit = { version = "0.22", default-features = false, features = ["links"] }
egui = "0.23"
egui-wgpu = "0.23"
egui-winit = { version = "0.23", default-features = false, features = ["links"] }
env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl<'req, 'dev, 'win, W: HasRawWindowHandle + HasRawDisplayHandle>
let surface = unsafe { instance.create_surface(self.surface_texture.window) }?;
let compatible_surface = Some(&surface);
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),
None => {
instance
Expand Down

0 comments on commit 763a7a9

Please sign in to comment.