diff --git a/Cargo.lock b/Cargo.lock index 14dd4bd1d0..bb1658d965 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -617,9 +617,8 @@ dependencies = [ [[package]] name = "gpu-alloc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7724b9aef57ea36d70faf54e0ee6265f86e41de16bed8333efdeab5b00e16b" +version = "0.4.0" +source = "git+https://github.com/zakarumych/gpu-alloc.git?rev=560ad651aa8f7aefcee8f5bcf41e67a84561bcda#560ad651aa8f7aefcee8f5bcf41e67a84561bcda" dependencies = [ "bitflags", "gpu-alloc-types", @@ -627,9 +626,8 @@ dependencies = [ [[package]] name = "gpu-alloc-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" +version = "0.2.1" +source = "git+https://github.com/zakarumych/gpu-alloc.git?rev=560ad651aa8f7aefcee8f5bcf41e67a84561bcda#560ad651aa8f7aefcee8f5bcf41e67a84561bcda" dependencies = [ "bitflags", ] diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 1a2880aad0..36af27ab9a 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -36,7 +36,8 @@ serde = { version = "1.0", features = ["serde_derive"], optional = true } smallvec = "1" thiserror = "1" -gpu-alloc = { version = "0.3" } +# Update to 0.4 when it will be available +gpu-alloc = { git = "https://github.com/zakarumych/gpu-alloc.git", rev = "560ad651aa8f7aefcee8f5bcf41e67a84561bcda" } gpu-descriptor = { version = "0.1" } hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "2ac006f7fe86f32dd5b5e07f9daf44cd876a66f0" } diff --git a/wgpu-core/src/device/alloc.rs b/wgpu-core/src/device/alloc.rs index 03610c6ae8..5779feeebb 100644 --- a/wgpu-core/src/device/alloc.rs +++ b/wgpu-core/src/device/alloc.rs @@ -15,9 +15,9 @@ struct MemoryDevice<'a, B: hal::Backend>(&'a B::Device); impl MemoryAllocator { pub fn new(mem_props: hal::adapter::MemoryProperties, limits: hal::Limits) -> Self { let mem_config = gpu_alloc::Config { - dedicated_treshold: 32 << 20, - preferred_dedicated_treshold: 8 << 20, - transient_dedicated_treshold: 128 << 20, + dedicated_threshold: 32 << 20, + preferred_dedicated_threshold: 8 << 20, + transient_dedicated_threshold: 128 << 20, linear_chunk: 128 << 20, minimal_buddy_size: 1 << 10, initial_buddy_dedicated_size: 8 << 20,