d3d8: Use the private store api for volumes.

This commit is contained in:
Stefan Dösinger 2014-03-21 11:46:21 +01:00 committed by Alexandre Julliard
parent 1db2bdcf8a
commit c9db3c6620

View file

@ -130,52 +130,28 @@ static HRESULT WINAPI d3d8_volume_SetPrivateData(IDirect3DVolume8 *iface, REFGUI
const void *data, DWORD data_size, DWORD flags)
{
struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n",
iface, debugstr_guid(guid), data, data_size, flags);
wined3d_mutex_lock();
resource = wined3d_volume_get_resource(volume->wined3d_volume);
hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags);
wined3d_mutex_unlock();
return hr;
return d3d8_resource_set_private_data(&volume->resource, guid, data, data_size, flags);
}
static HRESULT WINAPI d3d8_volume_GetPrivateData(IDirect3DVolume8 *iface, REFGUID guid,
static HRESULT WINAPI d3d8_volume_GetPrivateData(IDirect3DVolume8 *iface, REFGUID guid,
void *data, DWORD *data_size)
{
struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %p.\n",
iface, debugstr_guid(guid), data, data_size);
wined3d_mutex_lock();
resource = wined3d_volume_get_resource(volume->wined3d_volume);
hr = wined3d_resource_get_private_data(resource, guid, data, data_size);
wined3d_mutex_unlock();
return hr;
return d3d8_resource_get_private_data(&volume->resource, guid, data, data_size);
}
static HRESULT WINAPI d3d8_volume_FreePrivateData(IDirect3DVolume8 *iface, REFGUID guid)
{
struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface);
struct wined3d_resource *resource;
HRESULT hr;
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid));
wined3d_mutex_lock();
resource = wined3d_volume_get_resource(volume->wined3d_volume);
hr = wined3d_resource_free_private_data(resource, guid);
wined3d_mutex_unlock();
return hr;
return d3d8_resource_free_private_data(&volume->resource, guid);
}
static HRESULT WINAPI d3d8_volume_GetContainer(IDirect3DVolume8 *iface, REFIID riid, void **container)