mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
Fix host mapping buffer barriers
This commit is contained in:
parent
f4550cc4e3
commit
df2c97ff0c
@ -486,6 +486,12 @@ pub fn map_buffer_state(usage: wgt::BufferUsage) -> hal::buffer::State {
|
||||
use wgt::BufferUsage as W;
|
||||
|
||||
let mut access = A::empty();
|
||||
if usage.contains(W::MAP_READ) {
|
||||
access |= A::HOST_READ;
|
||||
}
|
||||
if usage.contains(W::MAP_WRITE) {
|
||||
access |= A::HOST_WRITE;
|
||||
}
|
||||
if usage.contains(W::COPY_SRC) {
|
||||
access |= A::TRANSFER_READ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user