mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-23 07:14:01 +00:00
Fix invalidated segment of the staging memory
This commit is contained in:
parent
5cfdd4a135
commit
68bf10a3a5
@ -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()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user