mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 19:24:12 +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,
|
||||
ID3D11Buffer* const* ppSOTargets,
|
||||
const UINT* pOffsets) {
|
||||
if (NumBuffers > 0)
|
||||
Logger::err("D3D11DeviceContext::SOSetTargets: Not implemented");
|
||||
// TODO implement properly, including pOffsets
|
||||
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(
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppSOTargets) {
|
||||
if (NumBuffers > 0)
|
||||
Logger::err("D3D11DeviceContext::SOGetTargets: Not implemented");
|
||||
for (uint32_t i = 0; i < NumBuffers; i++)
|
||||
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
|
||||
*/
|
||||
@ -141,6 +146,7 @@ namespace dxvk {
|
||||
D3D11ContextStateIA ia;
|
||||
D3D11ContextStateOM om;
|
||||
D3D11ContextStateRS rs;
|
||||
D3D11ContextStateSO so;
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user