mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 22:08:59 +01:00
[d3d11] Move SetPredication to D3D11CommonContext
This commit is contained in:
parent
b8b5662461
commit
163af1309d
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -1804,6 +1804,37 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::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<typename ContextType>
|
||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::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<typename ContextType>
|
||||
BOOL STDMETHODCALLTYPE D3D11CommonContext<ContextType>::IsAnnotationEnabled() {
|
||||
return m_annotation.GetStatus();
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user