Use General allocator at all times for now

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2020-04-25 00:17:50 -04:00
1 parent 9fa60ab566
commit 2fca1d71f7
1 file changed
+3 -2
+3 -2
View File
@@ -281,12 +281,13 @@ impl<B: GfxBackend> Device<B> {
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,