d3d10core: Implement d3d10_device_OMSetDepthStencilState().

This commit is contained in:
Henri Verbeet 2012-10-02 22:15:36 +02:00 committed by Alexandre Julliard
parent 37f36b7326
commit a78fa40816
3 changed files with 19 additions and 1 deletions

View File

@ -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;
};

View File

@ -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,

View File

@ -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);