mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
Limit when buffer FAST_DEVICE_ACCESS is requested
This commit is contained in:
parent
e9232127f0
commit
0e84c29691
@ -448,7 +448,8 @@ impl<B: GfxBackend> Device<B> {
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user