diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index f909498453..753764e438 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,20 +26,20 @@ webgl = ["wgc"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "8a5668e0da36bc863091d70853a0766be8b330be" +rev = "0fa52d3826ec8fe8f6177a558922085fe7d0e0cc" features = ["raw-window-handle", "cross"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "8a5668e0da36bc863091d70853a0766be8b330be" +rev = "0fa52d3826ec8fe8f6177a558922085fe7d0e0cc" features = ["raw-window-handle", "cross"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "8a5668e0da36bc863091d70853a0766be8b330be" +rev = "0fa52d3826ec8fe8f6177a558922085fe7d0e0cc" [dependencies] arrayvec = "0.5" @@ -68,13 +68,13 @@ wgpu-subscriber = "0.1" # used to test all the example shaders [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -tag = "gfx-12" +tag = "gfx-13" features = ["wgsl-in"] # used to generate SPIR-V for the Web target [target.'cfg(target_arch = "wasm32")'.dependencies.naga] git = "https://github.com/gfx-rs/naga" -tag = "gfx-12" +tag = "gfx-13" features = ["wgsl-in", "spv-out"] [[example]] diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index d5a7958055..59b37e2fbc 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -54,21 +54,7 @@ impl Context { self: &Arc, layer: *mut std::ffi::c_void, ) -> crate::Surface { - let surface = wgc::instance::Surface { - #[cfg(feature = "vulkan-portability")] - vulkan: None, //TODO: create_surface_from_layer ? - metal: self - .0 - .instance - .metal - .as_ref() - .map(|inst| inst.create_surface_from_layer(std::mem::transmute(layer))), - }; - - let id = self.0.surfaces.process_id(PhantomData); - self.0 - .surfaces - .register(id, surface, &mut wgc::hub::Token::root()); + let id = self.0.instance_create_surface_metal(layer, PhantomData); crate::Surface { context: Arc::clone(self), id,