diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 9eff8b6f..732af0ab 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -30,35 +30,6 @@ namespace dxvk { } - void STDMETHODCALLTYPE D3D11DeviceContext::SetPredication( - ID3D11Predicate* pPredicate, - BOOL PredicateValue) { - D3D10DeviceLock lock = LockContext(); - - auto predicate = D3D11Query::FromPredicate(pPredicate); - m_state.pr.predicateObject = predicate; - m_state.pr.predicateValue = PredicateValue; - - static bool s_errorShown = false; - - if (pPredicate && !std::exchange(s_errorShown, true)) - Logger::err("D3D11DeviceContext::SetPredication: Stub"); - } - - - void STDMETHODCALLTYPE D3D11DeviceContext::GetPredication( - ID3D11Predicate** ppPredicate, - BOOL* pPredicateValue) { - D3D10DeviceLock lock = LockContext(); - - if (ppPredicate) - *ppPredicate = D3D11Query::AsPredicate(m_state.pr.predicateObject.ref()); - - if (pPredicateValue) - *pPredicateValue = m_state.pr.predicateValue; - } - - void STDMETHODCALLTYPE D3D11DeviceContext::CopySubresourceRegion( ID3D11Resource* pDstResource, UINT DstSubresource, diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 5c53c26e..31c63565 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -34,14 +34,6 @@ namespace dxvk { DxvkCsChunkFlags CsFlags); ~D3D11DeviceContext(); - void STDMETHODCALLTYPE SetPredication( - ID3D11Predicate* pPredicate, - BOOL PredicateValue); - - void STDMETHODCALLTYPE GetPredication( - ID3D11Predicate** ppPredicate, - BOOL* pPredicateValue); - void STDMETHODCALLTYPE CopySubresourceRegion( ID3D11Resource* pDstResource, UINT DstSubresource, diff --git a/src/d3d11/d3d11_context_common.cpp b/src/d3d11/d3d11_context_common.cpp index 6581ee6f..8bcb9643 100644 --- a/src/d3d11/d3d11_context_common.cpp +++ b/src/d3d11/d3d11_context_common.cpp @@ -1804,6 +1804,37 @@ namespace dxvk { } + template + void STDMETHODCALLTYPE D3D11CommonContext::SetPredication( + ID3D11Predicate* pPredicate, + BOOL PredicateValue) { + D3D10DeviceLock lock = LockContext(); + + auto predicate = D3D11Query::FromPredicate(pPredicate); + m_state.pr.predicateObject = predicate; + m_state.pr.predicateValue = PredicateValue; + + static bool s_errorShown = false; + + if (pPredicate && !std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::SetPredication: Stub"); + } + + + template + void STDMETHODCALLTYPE D3D11CommonContext::GetPredication( + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue) { + D3D10DeviceLock lock = LockContext(); + + if (ppPredicate) + *ppPredicate = D3D11Query::AsPredicate(m_state.pr.predicateObject.ref()); + + if (pPredicateValue) + *pPredicateValue = m_state.pr.predicateValue; + } + + template BOOL STDMETHODCALLTYPE D3D11CommonContext::IsAnnotationEnabled() { return m_annotation.GetStatus(); diff --git a/src/d3d11/d3d11_context_common.h b/src/d3d11/d3d11_context_common.h index 934902d7..cb63f86c 100644 --- a/src/d3d11/d3d11_context_common.h +++ b/src/d3d11/d3d11_context_common.h @@ -548,6 +548,14 @@ namespace dxvk { ID3D11Buffer** ppSOTargets, UINT* pOffsets); + void STDMETHODCALLTYPE SetPredication( + ID3D11Predicate* pPredicate, + BOOL PredicateValue); + + void STDMETHODCALLTYPE GetPredication( + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue); + BOOL STDMETHODCALLTYPE IsAnnotationEnabled(); protected: