From 6757b5a2492d7d8acc3a53b90bc69a59093168dc Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 24 Feb 2025 23:59:03 +0100 Subject: [PATCH] [d3d11] Use sfence before finishing or submitting command list --- src/d3d11/d3d11_context_def.cpp | 3 +++ src/d3d11/d3d11_context_imm.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/d3d11/d3d11_context_def.cpp b/src/d3d11/d3d11_context_def.cpp index 3127e054c..27fd6bb66 100644 --- a/src/d3d11/d3d11_context_def.cpp +++ b/src/d3d11/d3d11_context_def.cpp @@ -163,6 +163,9 @@ namespace dxvk { ID3D11CommandList **ppCommandList) { D3D10DeviceLock lock = LockContext(); + // Make writes to mapped buffers available + bit::sfence(); + // End all queries that were left active by the app FinalizeQueries(); diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 15005f40f..22dc8d994 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -1105,6 +1105,9 @@ namespace dxvk { if (!GetPendingCsChunks() && !hEvent) return; + // Make writes to mapped buffers available + bit::sfence(); + // Unbind unused resources ApplyDirtyNullBindings();