From 52fd36b68b3f115d2e5fe3040b6abc51bad862e0 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 23 Jun 2011 00:02:33 +0200 Subject: [PATCH] d3d9: Implement IDirect3DVolume9 private data handling on top of wined3d_resource. --- dlls/d3d9/volume.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index ba495b644d0..5e430b92df5 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -126,13 +126,15 @@ static HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(IDirect3DVolume9 *ifac const void *pData, DWORD SizeOfData, DWORD Flags) { IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); + struct wined3d_resource *resource; HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = wined3d_volume_set_private_data(This->wined3d_volume, refguid, pData, SizeOfData, Flags); + resource = wined3d_volume_get_resource(This->wined3d_volume); + hr = wined3d_resource_set_private_data(resource, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; @@ -142,13 +144,15 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(IDirect3DVolume9 *ifac void *pData, DWORD *pSizeOfData) { IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); + struct wined3d_resource *resource; HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = wined3d_volume_get_private_data(This->wined3d_volume, refguid, pData, pSizeOfData); + resource = wined3d_volume_get_resource(This->wined3d_volume); + hr = wined3d_resource_get_private_data(resource, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; @@ -157,12 +161,14 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(IDirect3DVolume9 *ifac static HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(IDirect3DVolume9 *iface, REFGUID refguid) { IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); + struct wined3d_resource *resource; HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = wined3d_volume_free_private_data(This->wined3d_volume, refguid); + resource = wined3d_volume_get_resource(This->wined3d_volume); + hr = wined3d_resource_free_private_data(resource, refguid); wined3d_mutex_unlock(); return hr;