[PATCH 4/9] d3d11: Implement d3d11_immediate_context_OMGetDepthStencilState().
Józef Kucia
jkucia at codeweavers.com
Fri Jun 24 04:46:00 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/d3d11/device.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index b8f364c..224e3ca 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1671,7 +1671,15 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi
static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext *iface,
ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref)
{
- FIXME("iface %p, depth_stencil_state %p, stencil_ref %p stub!\n", iface, depth_stencil_state, stencil_ref);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
+
+ TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
+ iface, depth_stencil_state, stencil_ref);
+
+ if ((*depth_stencil_state = device->depth_stencil_state
+ ? &device->depth_stencil_state->ID3D11DepthStencilState_iface : NULL))
+ ID3D11DepthStencilState_AddRef(*depth_stencil_state);
+ *stencil_ref = device->stencil_ref;
}
static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceContext *iface,
@@ -4070,14 +4078,17 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device1
ID3D10DepthStencilState **depth_stencil_state, UINT *stencil_ref)
{
struct d3d_device *device = impl_from_ID3D10Device(iface);
+ ID3D11DepthStencilState *d3d11_depth_stencil_state;
+ struct d3d_depthstencil_state *object;
TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
iface, depth_stencil_state, stencil_ref);
- if ((*depth_stencil_state = device->depth_stencil_state
- ? &device->depth_stencil_state->ID3D10DepthStencilState_iface : NULL))
- ID3D10DepthStencilState_AddRef(*depth_stencil_state);
- *stencil_ref = device->stencil_ref;
+ d3d11_immediate_context_OMGetDepthStencilState(&device->immediate_context.ID3D11DeviceContext_iface,
+ &d3d11_depth_stencil_state, stencil_ref);
+
+ object = unsafe_impl_from_ID3D11DepthStencilState(d3d11_depth_stencil_state);
+ *depth_stencil_state = object ? &object->ID3D10DepthStencilState_iface : NULL;
}
static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device1 *iface,
--
2.7.3
More information about the wine-patches
mailing list