From 2b5272134c6cfb8bf674132b652927a8e70a5088 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 11 Aug 2018 22:23:04 +0200 Subject: [PATCH] [d3d10] Implement OM(Set|Get)BlendState --- 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 dc2192ba..d3637b4e 100644 --- a/src/d3d10/d3d10_device.cpp +++ b/src/d3d10/d3d10_device.cpp @@ -1045,7 +1045,10 @@ namespace dxvk { ID3D10BlendState* pBlendState, const FLOAT BlendFactor[4], UINT SampleMask) { - Logger::err("D3D10Device::OMSetBlendState: Not implemented"); + D3D10BlendState* d3d10BlendState = static_cast(pBlendState); + D3D11BlendState* d3d11BlendState = d3d10BlendState ? d3d10BlendState->GetD3D11Iface() : nullptr; + + m_context->OMSetBlendState(d3d11BlendState, BlendFactor, SampleMask); } @@ -1068,7 +1071,14 @@ namespace dxvk { ID3D10BlendState** ppBlendState, FLOAT BlendFactor[4], UINT* pSampleMask) { - Logger::err("D3D10Device::OMGetBlendState: Not implemented"); + ID3D11BlendState* d3d11BlendState = nullptr; + + m_context->OMGetBlendState( + ppBlendState ? &d3d11BlendState : nullptr, + BlendFactor, pSampleMask); + + if (ppBlendState != nullptr) + *ppBlendState = static_cast(d3d11BlendState)->GetD3D10Iface(); }