From 5cb14ba4549b28739a5cc99438b4cc64cd89debd Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 9 Mar 2015 11:47:05 +0100 Subject: [PATCH] d3d10core: Implement d3d10_depthstencil_state_SetPrivateData(). --- dlls/d3d10core/d3d10core_private.h | 1 + dlls/d3d10core/state.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 791f302422a..2d2bf03b531 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -263,6 +263,7 @@ struct d3d10_depthstencil_state ID3D10DepthStencilState ID3D10DepthStencilState_iface; LONG refcount; + struct wined3d_private_store private_store; D3D10_DEPTH_STENCIL_DESC desc; struct wine_rb_entry entry; ID3D10Device1 *device; diff --git a/dlls/d3d10core/state.c b/dlls/d3d10core/state.c index 765b774eac5..feecfb642ab 100644 --- a/dlls/d3d10core/state.c +++ b/dlls/d3d10core/state.c @@ -236,6 +236,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStenc struct d3d10_device *device = impl_from_ID3D10Device(state->device); wine_rb_remove(&device->depthstencil_states, &state->desc); ID3D10Device1_Release(state->device); + wined3d_private_store_cleanup(&state->private_store); HeapFree(GetProcessHeap(), 0, state); } @@ -266,10 +267,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10D static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10DepthStencilState *iface, REFGUID guid, UINT data_size, const void *data) { - FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", + struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); + + TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data); - return E_NOTIMPL; + return d3d10_set_private_data(&state->private_store, guid, data_size, data); } static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface(ID3D10DepthStencilState *iface, @@ -312,11 +315,13 @@ HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, st { state->ID3D10DepthStencilState_iface.lpVtbl = &d3d10_depthstencil_state_vtbl; state->refcount = 1; + wined3d_private_store_init(&state->private_store); state->desc = *desc; if (wine_rb_put(&device->depthstencil_states, desc, &state->entry) == -1) { ERR("Failed to insert depthstencil state entry.\n"); + wined3d_private_store_cleanup(&state->private_store); return E_FAIL; }