From 4eff83bdee2d1a8f091c2e2929151edf2c7ef9ec Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 25 Apr 2019 11:55:40 +0200 Subject: [PATCH] [d3d11] Disable Predication support Doesn't work at all in the few games that use it. --- src/d3d11/d3d11_context.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 9459caaa3..efe72bb51 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -279,21 +279,27 @@ namespace dxvk { m_state.pr.predicateObject = predicate; m_state.pr.predicateValue = PredicateValue; - if (!m_device->features().extConditionalRendering.conditionalRendering) - return; + static bool s_errorShown = false; - EmitCs([ - cPredicate = Com(predicate), - cValue = PredicateValue - ] (DxvkContext* ctx) { - DxvkBufferSlice predSlice; + if (pPredicate && !std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::SetPredication: Stub"); - if (cPredicate != nullptr) - predSlice = cPredicate->GetPredicate(ctx); + // TODO: Figure out why this breaks Watch Dogs and crashes War Thunder + // if (!m_device->features().extConditionalRendering.conditionalRendering) + // return; + + // EmitCs([ + // cPredicate = Com(predicate), + // cValue = PredicateValue + // ] (DxvkContext* ctx) { + // DxvkBufferSlice predSlice; + + // if (cPredicate != nullptr) + // predSlice = cPredicate->GetPredicate(ctx); - ctx->setPredicate(predSlice, - cValue ? VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT : 0); - }); + // ctx->setPredicate(predSlice, + // cValue ? VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT : 0); + // }); }