From 0f94971193d8320cdc74d6e5204e76cb2c4304f2 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 5 Aug 2022 12:10:03 +0200 Subject: [PATCH] [d3d11,d3d9] Lock context/device in EndFrame Fixes #2787. --- src/d3d11/d3d11_context_imm.cpp | 2 ++ src/d3d9/d3d9_device.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 8edff0d1..a885291e 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -652,6 +652,8 @@ namespace dxvk { void D3D11ImmediateContext::EndFrame() { + D3D10DeviceLock lock = LockContext(); + EmitCs([] (DxvkContext* ctx) { ctx->endFrame(); }); diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 716100c3..f3e490c7 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5112,6 +5112,8 @@ namespace dxvk { void D3D9DeviceEx::EndFrame() { + D3D9DeviceLock lock = LockDevice(); + EmitCs([] (DxvkContext* ctx) { ctx->endFrame(); });