From ad6b91d84a67ed9e8657b5b82c92b20ff6e145e0 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 6 Aug 2020 10:05:20 +0100 Subject: [PATCH] [d3d9] Flush and synchronize to cs before format conversion Fixes a race when DISCARD is used --- src/d3d9/d3d9_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 53a6c3fd8..ff8da0ccf 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -4223,6 +4223,9 @@ namespace dxvk { }); } else { + Flush(); + SynchronizeCsThread(); + m_converter->ConvertFormat( convertFormat, image, subresourceLayers,