mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 14:31:08 +01:00
Fix invalidated segment of the staging memory
This commit is contained in:
1 parent
5cfdd4a135
commit
68bf10a3a5
1 file changed
+3
-2
@@ -3702,13 +3702,14 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
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()
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user