Commit a78fa408 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_OMSetDepthStencilState().

parent 37f36b73
......@@ -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;
};
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment