diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 518227220..9db13bba8 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -140,11 +140,13 @@ namespace dxvk { cQuery->End(ctx); }); - if (unlikely(query->IsEvent())) { + if (unlikely(query->TrackStalls())) { query->NotifyEnd(); - query->IsStalling() - ? Flush() - : FlushImplicit(TRUE); + + if (query->IsStalling()) + Flush(); + else if (query->IsEvent()) + FlushImplicit(TRUE); } } diff --git a/src/d3d11/d3d11_query.h b/src/d3d11/d3d11_query.h index 06ac4a1a4..a1853cfca 100644 --- a/src/d3d11/d3d11_query.h +++ b/src/d3d11/d3d11_query.h @@ -62,6 +62,12 @@ namespace dxvk { return m_desc.Query == D3D11_QUERY_EVENT; } + bool TrackStalls() const { + return m_desc.Query == D3D11_QUERY_EVENT + || m_desc.Query == D3D11_QUERY_TIMESTAMP + || m_desc.Query == D3D11_QUERY_TIMESTAMP_DISJOINT; + } + bool IsStalling() const { return m_stallFlag; }