From 0e84c2969198419a404adc8df1d254a17b11abd9 Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Sat, 2 Jan 2021 13:27:42 -0500 Subject: [PATCH] Limit when buffer FAST_DEVICE_ACCESS is requested --- wgpu-core/src/device/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 80d7ea350..39b726429 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -448,7 +448,8 @@ impl Device { let mut flags = Uf::empty(); let map_flags = desc.usage & (Bu::MAP_READ | Bu::MAP_WRITE); - if !(desc.usage - map_flags).is_empty() { + let map_copy_flags = desc.usage & (Bu::MAP_READ | Bu::MAP_WRITE | Bu::COPY_SRC | Bu::COPY_DST); + if map_flags.is_empty() || !(desc.usage - map_copy_flags).is_empty() { flags |= Uf::FAST_DEVICE_ACCESS; } if transient {