From ee87d7fae7fcdd1c2a0301cae7063ae4e3dbfba5 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 28 Nov 2020 12:12:51 -0500 Subject: [PATCH] Flush write_texture staging memory --- wgpu-core/src/device/queue.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wgpu-core/src/device/queue.rs b/wgpu-core/src/device/queue.rs index 6a43320b48..ccd55b185e 100644 --- a/wgpu-core/src/device/queue.rs +++ b/wgpu-core/src/device/queue.rs @@ -401,6 +401,9 @@ impl Global { } } stage.memory.unmap(&device.raw); + if !stage.memory.is_coherent() { + stage.memory.flush_range(&device.raw, 0, None)?; + } let region = hal::command::BufferImageCopy { buffer_offset: 0,