1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Only execute Begin for scoped queries

This commit is contained in:
Philip Rebohle 2019-11-02 12:40:21 +01:00
parent 1459f0e852
commit 0671007437
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 9 additions and 1 deletions

View File

@ -251,6 +251,9 @@ namespace dxvk {
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
if (unlikely(!query->IsScoped()))
return;
EmitCs([cQuery = std::move(query)]
(DxvkContext* ctx) {
cQuery->Begin(ctx);

View File

@ -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;
}