mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-01 19:29:16 +01:00
[d3d11] Partially implement SOSetTargets/SOGetTargets
This does not implement any stream output functionality yet, but it allows games to set and query stream output buffers.
This commit is contained in:
parent
360bf3ee4c
commit
95e2c641e0
@ -2035,16 +2035,20 @@ namespace dxvk {
|
|||||||
UINT NumBuffers,
|
UINT NumBuffers,
|
||||||
ID3D11Buffer* const* ppSOTargets,
|
ID3D11Buffer* const* ppSOTargets,
|
||||||
const UINT* pOffsets) {
|
const UINT* pOffsets) {
|
||||||
if (NumBuffers > 0)
|
// TODO implement properly, including pOffsets
|
||||||
Logger::err("D3D11DeviceContext::SOSetTargets: Not implemented");
|
for (uint32_t i = 0; i < D3D11_SO_STREAM_COUNT; i++) {
|
||||||
|
m_state.so.targets[i] = (ppSOTargets != nullptr && i < NumBuffers)
|
||||||
|
? static_cast<D3D11Buffer*>(ppSOTargets[i])
|
||||||
|
: nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void STDMETHODCALLTYPE D3D11DeviceContext::SOGetTargets(
|
void STDMETHODCALLTYPE D3D11DeviceContext::SOGetTargets(
|
||||||
UINT NumBuffers,
|
UINT NumBuffers,
|
||||||
ID3D11Buffer** ppSOTargets) {
|
ID3D11Buffer** ppSOTargets) {
|
||||||
if (NumBuffers > 0)
|
for (uint32_t i = 0; i < NumBuffers; i++)
|
||||||
Logger::err("D3D11DeviceContext::SOGetTargets: Not implemented");
|
ppSOTargets[i] = m_state.so.targets[i].ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,6 +127,11 @@ namespace dxvk {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct D3D11ContextStateSO {
|
||||||
|
std::array<Com<D3D11Buffer>, D3D11_SO_STREAM_COUNT> targets;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Context state
|
* \brief Context state
|
||||||
*/
|
*/
|
||||||
@ -141,6 +146,7 @@ namespace dxvk {
|
|||||||
D3D11ContextStateIA ia;
|
D3D11ContextStateIA ia;
|
||||||
D3D11ContextStateOM om;
|
D3D11ContextStateOM om;
|
||||||
D3D11ContextStateRS rs;
|
D3D11ContextStateRS rs;
|
||||||
|
D3D11ContextStateSO so;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user