mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-21 13:29:26 +01:00
[d3d11] Properly implement SetPredication
This commit is contained in:
parent
d81146e3d2
commit
3a3d7fb378
@ -273,15 +273,24 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11DeviceContext::SetPredication(
|
void STDMETHODCALLTYPE D3D11DeviceContext::SetPredication(
|
||||||
ID3D11Predicate* pPredicate,
|
ID3D11Predicate* pPredicate,
|
||||||
BOOL PredicateValue) {
|
BOOL PredicateValue) {
|
||||||
static bool s_errorShown = false;
|
|
||||||
|
|
||||||
if (pPredicate && !std::exchange(s_errorShown, true))
|
|
||||||
Logger::err("D3D11DeviceContext::SetPredication: Stub");
|
|
||||||
|
|
||||||
D3D10DeviceLock lock = LockContext();
|
D3D10DeviceLock lock = LockContext();
|
||||||
|
|
||||||
m_state.pr.predicateObject = static_cast<D3D11Query*>(pPredicate);
|
auto predicate = static_cast<D3D11Query*>(pPredicate);
|
||||||
|
m_state.pr.predicateObject = predicate;
|
||||||
m_state.pr.predicateValue = PredicateValue;
|
m_state.pr.predicateValue = PredicateValue;
|
||||||
|
|
||||||
|
if (!m_device->features().extConditionalRendering.conditionalRendering)
|
||||||
|
return;
|
||||||
|
|
||||||
|
EmitCs([
|
||||||
|
cPredicate = predicate
|
||||||
|
? predicate->GetPredicate()
|
||||||
|
: DxvkBufferSlice(),
|
||||||
|
cValue = PredicateValue
|
||||||
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->setPredicate(cPredicate,
|
||||||
|
cValue ? VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT : 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +44,10 @@ namespace dxvk {
|
|||||||
void* pData,
|
void* pData,
|
||||||
UINT GetDataFlags);
|
UINT GetDataFlags);
|
||||||
|
|
||||||
|
DxvkBufferSlice GetPredicate() const {
|
||||||
|
return m_predicate;
|
||||||
|
}
|
||||||
|
|
||||||
D3D10Query* GetD3D10Iface() {
|
D3D10Query* GetD3D10Iface() {
|
||||||
return &m_d3d10;
|
return &m_d3d10;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user