Henri Verbeet : d3d10core: Implement d3d10_device_OMSetDepthStencilState().

Alexandre Julliard julliard at winehq.org
Wed Oct 3 13:20:35 CDT 2012


Module: wine
Branch: master
Commit: a78fa408165886b2cc7fc9c962b01f91b026d804
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a78fa408165886b2cc7fc9c962b01f91b026d804

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Oct  2 22:15:36 2012 +0200

d3d10core: Implement d3d10_device_OMSetDepthStencilState().

---

 dlls/d3d10core/d3d10core_private.h |    4 ++++
 dlls/d3d10core/device.c            |    7 ++++++-
 dlls/d3d10core/state.c             |    9 +++++++++
 3 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h
index 4f98c93..2dcd89a 100644
--- a/dlls/d3d10core/d3d10core_private.h
+++ b/dlls/d3d10core/d3d10core_private.h
@@ -226,6 +226,8 @@ struct d3d10_depthstencil_state
 };
 
 HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state) DECLSPEC_HIDDEN;
+struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(
+        ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN;
 
 /* ID3D10RasterizerState */
 struct d3d10_rasterizer_state
@@ -267,6 +269,8 @@ struct d3d10_device
     struct wined3d_device_parent device_parent;
     struct wined3d_device *wined3d_device;
 
+    struct d3d10_depthstencil_state *depth_stencil_state;
+    UINT stencil_ref;
     struct d3d10_rasterizer_state *rasterizer_state;
 };
 
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index eaf0793..78d930b 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -325,8 +325,13 @@ static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device *iface,
 static void STDMETHODCALLTYPE d3d10_device_OMSetDepthStencilState(ID3D10Device *iface,
         ID3D10DepthStencilState *depth_stencil_state, UINT stencil_ref)
 {
-    FIXME("iface %p, depth_stencil_state %p, stencil_ref %u stub!\n",
+    struct d3d10_device *device = impl_from_ID3D10Device(iface);
+
+    TRACE("iface %p, depth_stencil_state %p, stencil_ref %u.\n",
             iface, depth_stencil_state, stencil_ref);
+
+    device->depth_stencil_state = unsafe_impl_from_ID3D10DepthStencilState(depth_stencil_state);
+    device->stencil_ref = stencil_ref;
 }
 
 static void STDMETHODCALLTYPE d3d10_device_SOSetTargets(ID3D10Device *iface,
diff --git a/dlls/d3d10core/state.c b/dlls/d3d10core/state.c
index 3b5c45f..1d927ce 100644
--- a/dlls/d3d10core/state.c
+++ b/dlls/d3d10core/state.c
@@ -256,6 +256,15 @@ HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state)
     return S_OK;
 }
 
+struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface)
+{
+    if (!iface)
+        return NULL;
+    assert(iface->lpVtbl == &d3d10_depthstencil_state_vtbl);
+
+    return impl_from_ID3D10DepthStencilState(iface);
+}
+
 static inline struct d3d10_rasterizer_state *impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
 {
     return CONTAINING_RECORD(iface, struct d3d10_rasterizer_state, ID3D10RasterizerState_iface);




More information about the wine-cvs mailing list