Commit 0d59cba5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_buffer_SetPrivateData().

parent 5dfb4c12
......@@ -111,10 +111,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_GetPrivateData(ID3D10Buffer *iface
static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateData(ID3D10Buffer *iface,
REFGUID guid, UINT data_size, const void *data)
{
FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(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(&buffer->private_store, guid, data_size, data);
}
static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateDataInterface(ID3D10Buffer *iface,
......@@ -206,6 +208,9 @@ struct d3d10_buffer *unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface)
static void STDMETHODCALLTYPE d3d10_buffer_wined3d_object_released(void *parent)
{
struct d3d10_buffer *buffer = parent;
wined3d_private_store_cleanup(&buffer->private_store);
HeapFree(GetProcessHeap(), 0, parent);
}
......@@ -222,6 +227,7 @@ HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d10_device *devi
buffer->ID3D10Buffer_iface.lpVtbl = &d3d10_buffer_vtbl;
buffer->refcount = 1;
wined3d_private_store_init(&buffer->private_store);
FIXME("Implement DXGI<->wined3d usage conversion\n");
......@@ -237,6 +243,7 @@ HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d10_device *devi
if (FAILED(hr))
{
WARN("Failed to create wined3d buffer, hr %#x.\n", hr);
wined3d_private_store_cleanup(&buffer->private_store);
return hr;
}
......
......@@ -121,6 +121,7 @@ struct d3d10_buffer
ID3D10Buffer ID3D10Buffer_iface;
LONG refcount;
struct wined3d_private_store private_store;
struct wined3d_buffer *wined3d_buffer;
ID3D10Device1 *device;
};
......
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