From 2a2079114af638ccb1bd2ee8d0bd428efd62f951 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 11 Aug 2018 22:34:33 +0200 Subject: [PATCH] [d3d10] Implement OM(Set|Get)DepthStencilState --- src/d3d10/d3d10_device.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/d3d10/d3d10_device.cpp b/src/d3d10/d3d10_device.cpp index 9b9953976..b83ef3dce 100644 --- a/src/d3d10/d3d10_device.cpp +++ b/src/d3d10/d3d10_device.cpp @@ -1067,7 +1067,10 @@ namespace dxvk { void STDMETHODCALLTYPE D3D10Device::OMSetDepthStencilState( ID3D10DepthStencilState* pDepthStencilState, UINT StencilRef) { - Logger::err("D3D10Device::OMSetDepthStencilState: Not implemented"); + D3D10DepthStencilState* d3d10DepthStencilState = static_cast(pDepthStencilState); + D3D11DepthStencilState* d3d11DepthStencilState = d3d10DepthStencilState ? d3d10DepthStencilState->GetD3D11Iface() : nullptr; + + m_context->OMSetDepthStencilState(d3d11DepthStencilState, StencilRef); } @@ -1097,7 +1100,14 @@ namespace dxvk { void STDMETHODCALLTYPE D3D10Device::OMGetDepthStencilState( ID3D10DepthStencilState** ppDepthStencilState, UINT* pStencilRef) { - Logger::err("D3D10Device::OMGetDepthStencilState: Not implemented"); + ID3D11DepthStencilState* d3d11DepthStencilState = nullptr; + + m_context->OMGetDepthStencilState( + ppDepthStencilState ? &d3d11DepthStencilState : nullptr, + pStencilRef); + + if (ppDepthStencilState != nullptr) + *ppDepthStencilState = static_cast(d3d11DepthStencilState)->GetD3D10Iface(); }