diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 80b391899..754010496 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -6008,6 +6008,10 @@ namespace dxvk { void D3D9DeviceEx::End(D3D9Query* pQuery) { D3D9DeviceLock lock = LockDevice(); + EmitCs([cQuery = Com(pQuery)](DxvkContext* ctx) { + cQuery->End(ctx); + }); + pQuery->NotifyEnd(); if (unlikely(pQuery->IsEvent())) { pQuery->IsStalling() @@ -6016,10 +6020,6 @@ namespace dxvk { } else if (pQuery->IsStalling()) { FlushImplicit(FALSE); } - - EmitCs([cQuery = Com(pQuery)](DxvkContext* ctx) { - cQuery->End(ctx); - }); }