diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index d0c8d0f399..fb3d908116 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -3702,13 +3702,14 @@ impl Global { let _ = ptr; 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 { device .raw .flush_mapped_memory_ranges(iter::once(( stage_memory.memory(), - segment, + stage_memory.segment(), ))) .unwrap() };