From fc68b5ef5473c983d36749c5d954a54844860fb5 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 24 Apr 2020 21:59:41 -0400 Subject: [PATCH] Use General allocator at all times for now --- wgpu-core/src/device/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 60a965fd3c..edbab473d5 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -281,12 +281,13 @@ impl Device { let (kind, mem_usage) = { use wgt::BufferUsage as Bu; + //TODO: use linear allocation when we can ensure the freeing is linear if !desc.usage.intersects(Bu::MAP_READ | Bu::MAP_WRITE) { (Kind::General, MemoryUsage::Private) } else if (Bu::MAP_WRITE | Bu::COPY_SRC).contains(desc.usage) { - (Kind::Linear, MemoryUsage::Staging { read_back: false }) + (Kind::General, MemoryUsage::Staging { read_back: false }) } else if (Bu::MAP_READ | Bu::COPY_DST).contains(desc.usage) { - (Kind::Linear, MemoryUsage::Staging { read_back: true }) + (Kind::General, MemoryUsage::Staging { read_back: true }) } else { ( Kind::General,