From cb692620cab03592362f5f3e33e0eecd421cb217 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 2 Nov 2019 00:24:36 -0400 Subject: [PATCH] Don't depend on gfx-auxil --- Cargo.lock | 2 +- wgpu-native/Cargo.toml | 2 +- wgpu-native/src/device.rs | 2 +- wgpu-native/src/lib.rs | 3 +++ wgpu-native/src/track/mod.rs | 3 +-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ce2f4577..3109438e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -681,7 +681,7 @@ dependencies = [ "arrayvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-auxil 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=46386475f7e823e807ec984c372ffe04dcc0a22b)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx-backend-dx11 0.4.0 (git+https://github.com/gfx-rs/gfx?rev=46386475f7e823e807ec984c372ffe04dcc0a22b)", "gfx-backend-dx12 0.4.0 (git+https://github.com/gfx-rs/gfx?rev=46386475f7e823e807ec984c372ffe04dcc0a22b)", "gfx-backend-empty 0.4.0 (git+https://github.com/gfx-rs/gfx?rev=46386475f7e823e807ec984c372ffe04dcc0a22b)", diff --git a/wgpu-native/Cargo.toml b/wgpu-native/Cargo.toml index 6f3682f78..a8ff98c0f 100644 --- a/wgpu-native/Cargo.toml +++ b/wgpu-native/Cargo.toml @@ -26,10 +26,10 @@ metal-auto-capture = ["gfx-backend-metal/auto-capture"] arrayvec = "0.5" bitflags = "1.0" copyless = "0.1" +fxhash = "0.2" lazy_static = { version = "1.1.0", optional = true } log = "0.4" hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "46386475f7e823e807ec984c372ffe04dcc0a22b" } -gfx-auxil = { git = "https://github.com/gfx-rs/gfx", rev = "46386475f7e823e807ec984c372ffe04dcc0a22b" } gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "46386475f7e823e807ec984c372ffe04dcc0a22b" } parking_lot = "0.9" raw-window-handle = { version = "0.3", optional = true } diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index 0f0bf913f..71da35285 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -25,6 +25,7 @@ use crate::{ CommandEncoderId, ComputePipelineId, DeviceId, + FastHashMap, Features, LifeGuard, PipelineLayoutId, @@ -48,7 +49,6 @@ use crate::{gfx_select, hub::GLOBAL}; use arrayvec::ArrayVec; use copyless::VecHelper as _; -use gfx_auxil::FastHashMap; use hal::{ self, command::CommandBuffer as _, diff --git a/wgpu-native/src/lib.rs b/wgpu-native/src/lib.rs index 673ddbd62..86fbd1e6e 100644 --- a/wgpu-native/src/lib.rs +++ b/wgpu-native/src/lib.rs @@ -229,3 +229,6 @@ pub(crate) struct Features { pub max_bind_groups: u32, pub supports_texture_d24_s8: bool, } + +/// Fast hash map used internally. +type FastHashMap = std::collections::HashMap>; diff --git a/wgpu-native/src/track/mod.rs b/wgpu-native/src/track/mod.rs index a98ea6152..c3046bd31 100644 --- a/wgpu-native/src/track/mod.rs +++ b/wgpu-native/src/track/mod.rs @@ -11,6 +11,7 @@ use crate::{ Backend, BindGroupId, Epoch, + FastHashMap, Index, RefCount, SamplerId, @@ -18,8 +19,6 @@ use crate::{ TypedId, }; -use gfx_auxil::FastHashMap; - use std::{ borrow::Borrow, collections::hash_map::Entry,