From e0abf982e1fbaa62091e083d29b522083504a22f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 30 Oct 2019 22:26:42 -0400 Subject: [PATCH] Update to wgpu-native b8d26c9186a59cf71cd8fab4e550c0746d1a2f80 --- Cargo.toml | 7 ++++++- src/lib.rs | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b4357c6fae..ae3e055f07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,13 @@ default = [] # Make Vulkan backend available on platforms where it is by default not, e.g. macOS vulkan = ["wgn/gfx-backend-vulkan"] +[dependencies.wgn] +package = "wgpu-native" +git = "https://github.com/gfx-rs/wgpu" +rev = "b8d26c9186a59cf71cd8fab4e550c0746d1a2f80" +features = ["local"] + [dependencies] -wgn = { package = "wgpu-native", git = "https://github.com/gfx-rs/wgpu", rev = "78fbbba5e928e4a6f15a03a1c04d06916a947673" } arrayvec = "0.5" raw-window-handle = "0.3" zerocopy = "0.2" diff --git a/src/lib.rs b/src/lib.rs index 6e731f7557..a1b8b581ae 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -541,8 +541,9 @@ impl Adapter { /// /// If no adapters are found that suffice all the "hard" options, `None` is returned. pub fn request(options: &wgn::RequestAdapterOptions) -> Option { - wgn::request_adapter(options, &[]) - .map(|id| Adapter { id }) + Some(Adapter { + id: wgn::wgpu_request_adapter(Some(options)), + }) } /// Requests a connection to a physical device, creating a logical device.