From 448ecc1bb1572df20feff8fd9b37d4be7b6a400c Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 26 Jun 2020 01:12:53 -0400 Subject: [PATCH] gfx-memory update --- Cargo.lock | 4 ++-- wgpu-core/Cargo.toml | 4 ++-- wgpu-core/src/device/mod.rs | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64a1b10d3d..177b6815a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,7 +493,7 @@ dependencies = [ [[package]] name = "gfx-descriptor" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx-extras?rev=0f7dac1b05813948fa0e5999c4fe6473f0c98f9b#0f7dac1b05813948fa0e5999c4fe6473f0c98f9b" +source = "git+https://github.com/gfx-rs/gfx-extras?rev=6387d81773e29be2220cb15186ceb875ed88303b#6387d81773e29be2220cb15186ceb875ed88303b" dependencies = [ "fxhash", "gfx-hal", @@ -513,7 +513,7 @@ dependencies = [ [[package]] name = "gfx-memory" version = "0.1.3" -source = "git+https://github.com/gfx-rs/gfx-extras?rev=0f7dac1b05813948fa0e5999c4fe6473f0c98f9b#0f7dac1b05813948fa0e5999c4fe6473f0c98f9b" +source = "git+https://github.com/gfx-rs/gfx-extras?rev=6387d81773e29be2220cb15186ceb875ed88303b#6387d81773e29be2220cb15186ceb875ed88303b" dependencies = [ "fxhash", "gfx-hal", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index ed5f7f3147..445160c95b 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -47,11 +47,11 @@ rev = "a9228d2aed38c71388489a95817238ff98198fa3" [dependencies.gfx-descriptor] git = "https://github.com/gfx-rs/gfx-extras" -rev = "0f7dac1b05813948fa0e5999c4fe6473f0c98f9b" +rev = "6387d81773e29be2220cb15186ceb875ed88303b" [dependencies.gfx-memory] git = "https://github.com/gfx-rs/gfx-extras" -rev = "0f7dac1b05813948fa0e5999c4fe6473f0c98f9b" +rev = "6387d81773e29be2220cb15186ceb875ed88303b" [dependencies.wgt] path = "../wgpu-types" diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index c5392af4fd..da7d6d0baa 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -232,6 +232,7 @@ impl Device { hal_limits.non_coherent_atom_size as u64, ) }; + let descriptors = unsafe { DescriptorAllocator::new() }; #[cfg(not(feature = "trace"))] match trace_path { Some(_) => log::error!("Feature 'trace' is not enabled"), @@ -243,7 +244,7 @@ impl Device { adapter_id, com_allocator, mem_allocator: Mutex::new(heaps), - desc_allocator: Mutex::new(DescriptorAllocator::new()), + desc_allocator: Mutex::new(descriptors), queue_group, life_guard: LifeGuard::new(), active_submission_index: 0, @@ -1459,7 +1460,7 @@ impl Global { return Err(BindGroupError::BindingsNumMismatch { expected, actual }); } - let mut desc_set = unsafe { + let mut desc_set = { let mut desc_sets = ArrayVec::<[_; 1]>::new(); device .desc_allocator