diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index bb4c1512..5e8fbaf5 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -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(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(); } diff --git a/src/d3d11/d3d11_context_state.h b/src/d3d11/d3d11_context_state.h index 2d1327cc..cf570cce 100644 --- a/src/d3d11/d3d11_context_state.h +++ b/src/d3d11/d3d11_context_state.h @@ -28,7 +28,7 @@ namespace dxvk { using D3D11UnorderedAccessBindings = std::array< Com, D3D11_1_UAV_SLOT_COUNT>; - + struct D3D11ContextStateVS { Com shader; @@ -127,6 +127,11 @@ namespace dxvk { }; + struct D3D11ContextStateSO { + std::array, D3D11_SO_STREAM_COUNT> targets; + }; + + /** * \brief Context state */ @@ -141,6 +146,7 @@ namespace dxvk { D3D11ContextStateIA ia; D3D11ContextStateOM om; D3D11ContextStateRS rs; + D3D11ContextStateSO so; }; } \ No newline at end of file