diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index a341ad5c87..0ff2673ccb 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,14 +26,14 @@ vulkan-portability = ["wgc/gfx-backend-vulkan", "gfx-backend-vulkan"] package = "wgpu-core" #version = "0.6" git = "https://github.com/gfx-rs/wgpu" -rev = "7ac706f0a9d90ebdcffeae48e3c530b9921bff2c" +rev = "99ff41bb998d017ca5afdf9a8657cc744dc225d3" features = ["raw-window-handle"] [dependencies.wgt] package = "wgpu-types" #version = "0.6" git = "https://github.com/gfx-rs/wgpu" -rev = "7ac706f0a9d90ebdcffeae48e3c530b9921bff2c" +rev = "99ff41bb998d017ca5afdf9a8657cc744dc225d3" [dependencies] arrayvec = "0.5" @@ -88,6 +88,7 @@ test = true #gfx-hal = { version = "0.6", path = "../gfx/src/hal" } #gfx-backend-empty = { version = "0.6", path = "../gfx/src/backend/empty" } #gfx-backend-vulkan = { version = "0.6", path = "../gfx/src/backend/vulkan" } +#gfx-backend-gl = { version = "0.6", path = "../gfx/src/backend/gl" } #gfx-backend-dx12 = { version = "0.6", path = "../gfx/src/backend/dx12" } #gfx-backend-dx11 = { version = "0.6", path = "../gfx/src/backend/dx11" } #gfx-backend-metal = { version = "0.6", path = "../gfx/src/backend/metal" } diff --git a/wgpu/examples/hello-compute/main.rs b/wgpu/examples/hello-compute/main.rs index 3103a6c138..5ff78246b5 100644 --- a/wgpu/examples/hello-compute/main.rs +++ b/wgpu/examples/hello-compute/main.rs @@ -21,8 +21,7 @@ async fn run() { async fn execute_gpu(numbers: Vec) -> Vec { // Instantiates instance of WebGPU - // 'wgpu::BackendBit::PRIMARY' selects one of 'Vulkan + Metal + DX12 + Browser WebGPU' as the backend - let instance = wgpu::Instance::new(wgpu::BackendBit::PRIMARY); + let instance = wgpu::Instance::new(wgpu::BackendBit::all()); // `request_adapter` instantiates the general connection to the GPU let adapter = instance diff --git a/wgpu/examples/hello-triangle/main.rs b/wgpu/examples/hello-triangle/main.rs index e5b98551a6..9c31204432 100644 --- a/wgpu/examples/hello-triangle/main.rs +++ b/wgpu/examples/hello-triangle/main.rs @@ -6,7 +6,7 @@ use winit::{ async fn run(event_loop: EventLoop<()>, window: Window, swapchain_format: wgpu::TextureFormat) { let size = window.inner_size(); - let instance = wgpu::Instance::new(wgpu::BackendBit::PRIMARY); + let instance = wgpu::Instance::new(wgpu::BackendBit::all()); let surface = unsafe { instance.create_surface(&window) }; let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { diff --git a/wgpu/examples/hello-windows/main.rs b/wgpu/examples/hello-windows/main.rs index d0f7785cb2..b6e8c6d73f 100644 --- a/wgpu/examples/hello-windows/main.rs +++ b/wgpu/examples/hello-windows/main.rs @@ -67,7 +67,7 @@ async fn run( viewports: Vec<(Window, wgpu::Color)>, swapchain_format: wgpu::TextureFormat, ) { - let instance = wgpu::Instance::new(wgpu::BackendBit::PRIMARY); + let instance = wgpu::Instance::new(wgpu::BackendBit::all()); let viewports: Vec<_> = viewports .into_iter() .map(|(window, color)| ViewportDesc::new(window, color, &instance)) diff --git a/wgpu/examples/hello/main.rs b/wgpu/examples/hello/main.rs index faeee7520f..55618875f3 100644 --- a/wgpu/examples/hello/main.rs +++ b/wgpu/examples/hello/main.rs @@ -1,7 +1,7 @@ /// This example shows how to describe the adapter in use. async fn run() { #[cfg_attr(target_arch = "wasm32", allow(unused_variables))] - let adapter = wgpu::Instance::new(wgpu::BackendBit::PRIMARY) + let adapter = wgpu::Instance::new(wgpu::BackendBit::all()) .request_adapter(&wgpu::RequestAdapterOptions::default()) .await .unwrap(); diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index 319732b7e9..902ece685a 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -45,6 +45,7 @@ impl Context { .metal .as_ref() .map(|inst| inst.create_surface_from_layer(std::mem::transmute(layer))), + gl: None, }; let id = self.0.surfaces.process_id(PhantomData);