mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-07 16:54:14 +01:00
[d3d11] Don't allocate predicate for unsupported predicates
This commit is contained in:
parent
7dc449ac55
commit
364ae7270d
@ -302,6 +302,9 @@ namespace dxvk {
|
|||||||
DxvkBufferSlice D3D11Query::GetPredicate(DxvkContext* ctx) {
|
DxvkBufferSlice D3D11Query::GetPredicate(DxvkContext* ctx) {
|
||||||
std::lock_guard<sync::Spinlock> lock(m_predicateLock);
|
std::lock_guard<sync::Spinlock> lock(m_predicateLock);
|
||||||
|
|
||||||
|
if (unlikely(m_desc.Query != D3D11_QUERY_OCCLUSION_PREDICATE))
|
||||||
|
return DxvkBufferSlice();
|
||||||
|
|
||||||
if (unlikely(!m_predicate.defined())) {
|
if (unlikely(!m_predicate.defined())) {
|
||||||
m_predicate = m_device->AllocPredicateSlice();
|
m_predicate = m_device->AllocPredicateSlice();
|
||||||
ctx->writePredicate(m_predicate, m_query);
|
ctx->writePredicate(m_predicate, m_query);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user