Skip to content

Commit

Permalink
[rs] Merge gfx-rs#786
Browse files Browse the repository at this point in the history
786: Update to naga-13 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
  • Loading branch information
bors[bot] and kvark authored Mar 10, 2021
2 parents f525302 + d754964 commit db923b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
10 changes: 5 additions & 5 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]]
Expand Down
16 changes: 1 addition & 15 deletions wgpu/src/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit db923b0

Please sign in to comment.