mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
d3d10core: Implement d3d10_depthstencil_state_GetDesc().
This commit is contained in:
parent
ecdddd6067
commit
d158289020
@ -231,9 +231,12 @@ struct d3d10_depthstencil_state
|
||||
{
|
||||
ID3D10DepthStencilState ID3D10DepthStencilState_iface;
|
||||
LONG refcount;
|
||||
|
||||
D3D10_DEPTH_STENCIL_DESC desc;
|
||||
};
|
||||
|
||||
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state) DECLSPEC_HIDDEN;
|
||||
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state,
|
||||
const D3D10_DEPTH_STENCIL_DESC *desc) DECLSPEC_HIDDEN;
|
||||
struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(
|
||||
ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -1435,6 +1435,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi
|
||||
|
||||
TRACE("iface %p, desc %p, depth_stencil_state %p.\n", iface, desc, depth_stencil_state);
|
||||
|
||||
if (!desc)
|
||||
return E_INVALIDARG;
|
||||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
if (!object)
|
||||
{
|
||||
@ -1442,8 +1445,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
hr = d3d10_depthstencil_state_init(object);
|
||||
if (FAILED(hr))
|
||||
if (FAILED(hr = d3d10_depthstencil_state_init(object, desc)))
|
||||
{
|
||||
WARN("Failed to initialize depthstencil state, hr %#x.\n", hr);
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
|
@ -253,7 +253,11 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterfac
|
||||
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc(ID3D10DepthStencilState *iface,
|
||||
D3D10_DEPTH_STENCIL_DESC *desc)
|
||||
{
|
||||
FIXME("iface %p, desc %p stub!\n", iface, desc);
|
||||
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface);
|
||||
|
||||
TRACE("iface %p, desc %p.\n", iface, desc);
|
||||
|
||||
*desc = state->desc;
|
||||
}
|
||||
|
||||
static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl =
|
||||
@ -271,10 +275,11 @@ static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl =
|
||||
d3d10_depthstencil_state_GetDesc,
|
||||
};
|
||||
|
||||
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state)
|
||||
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, const D3D10_DEPTH_STENCIL_DESC *desc)
|
||||
{
|
||||
state->ID3D10DepthStencilState_iface.lpVtbl = &d3d10_depthstencil_state_vtbl;
|
||||
state->refcount = 1;
|
||||
state->desc = *desc;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user