Fix invalidated segment of the staging memory

This commit is contained in:
Dzmitry Malyshau 2020-09-06 20:37:03 -04:00
parent 5cfdd4a135
commit 68bf10a3a5

View File

@ -3702,13 +3702,14 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let _ = ptr; let _ = ptr;
if needs_flush { if needs_flush {
let segment = hal::memory::Segment::default(); //TODO: gfx-memory needs a helper method for this.
// It needs to align the mapped range to the non-coherent atom size.
unsafe { unsafe {
device device
.raw .raw
.flush_mapped_memory_ranges(iter::once(( .flush_mapped_memory_ranges(iter::once((
stage_memory.memory(), stage_memory.memory(),
segment, stage_memory.segment(),
))) )))
.unwrap() .unwrap()
}; };