diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index e38bb7112..d9d81b945 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -251,6 +251,9 @@ namespace dxvk { Com query(static_cast(pAsync)); + if (unlikely(!query->IsScoped())) + return; + EmitCs([cQuery = std::move(query)] (DxvkContext* ctx) { cQuery->Begin(ctx); diff --git a/src/d3d11/d3d11_query.h b/src/d3d11/d3d11_query.h index 1c1f7b812..369d40168 100644 --- a/src/d3d11/d3d11_query.h +++ b/src/d3d11/d3d11_query.h @@ -38,7 +38,7 @@ namespace dxvk { void STDMETHODCALLTYPE GetDesc(D3D11_QUERY_DESC* pDesc) final; void STDMETHODCALLTYPE GetDesc1(D3D11_QUERY_DESC1* pDesc) final; - + void Begin(DxvkContext* ctx); void End(DxvkContext* ctx); @@ -49,6 +49,11 @@ namespace dxvk { DxvkBufferSlice GetPredicate(DxvkContext* ctx); + bool IsScoped() const { + return m_desc.Query != D3D11_QUERY_EVENT + && m_desc.Query != D3D11_QUERY_TIMESTAMP; + } + bool IsEvent() const { return m_desc.Query == D3D11_QUERY_EVENT; }