From 364ae7270d5a832795d0b37819b892b9e9705f6b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 14 Apr 2019 14:26:56 +0200 Subject: [PATCH] [d3d11] Don't allocate predicate for unsupported predicates --- src/d3d11/d3d11_query.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d11/d3d11_query.cpp b/src/d3d11/d3d11_query.cpp index 1a027887c..ccafb6207 100644 --- a/src/d3d11/d3d11_query.cpp +++ b/src/d3d11/d3d11_query.cpp @@ -302,6 +302,9 @@ namespace dxvk { DxvkBufferSlice D3D11Query::GetPredicate(DxvkContext* ctx) { std::lock_guard lock(m_predicateLock); + if (unlikely(m_desc.Query != D3D11_QUERY_OCCLUSION_PREDICATE)) + return DxvkBufferSlice(); + if (unlikely(!m_predicate.defined())) { m_predicate = m_device->AllocPredicateSlice(); ctx->writePredicate(m_predicate, m_query);