786: Update to naga-13 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot]
2021-03-10 05:41:35 +00:00
committed by GitHub
2 changed files with 6 additions and 20 deletions

View File

@@ -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]]

View File

@@ -54,21 +54,7 @@ impl Context {
self: &Arc<Self>,
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,