Commit ffb58ed4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Implement IDirect3DVolumeTexture9 private data handling on top of wined3d_resource.

parent a989afe3
...@@ -107,13 +107,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(IDirect3DVolume ...@@ -107,13 +107,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(IDirect3DVolume
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags)
{ {
IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface);
struct wined3d_resource *resource;
HRESULT hr; HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n",
iface, debugstr_guid(refguid), pData, SizeOfData, Flags); iface, debugstr_guid(refguid), pData, SizeOfData, Flags);
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); resource = wined3d_texture_get_resource(This->wined3d_texture);
hr = wined3d_resource_set_private_data(resource, refguid, pData, SizeOfData, Flags);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
...@@ -123,13 +125,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(IDirect3DVolume ...@@ -123,13 +125,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(IDirect3DVolume
REFGUID refguid, void *pData, DWORD *pSizeOfData) REFGUID refguid, void *pData, DWORD *pSizeOfData)
{ {
IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface);
struct wined3d_resource *resource;
HRESULT hr; HRESULT hr;
TRACE("iface %p, guid %s, data %p, data_size %p.\n", TRACE("iface %p, guid %s, data %p, data_size %p.\n",
iface, debugstr_guid(refguid), pData, pSizeOfData); iface, debugstr_guid(refguid), pData, pSizeOfData);
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); resource = wined3d_texture_get_resource(This->wined3d_texture);
hr = wined3d_resource_get_private_data(resource, refguid, pData, pSizeOfData);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
...@@ -139,12 +143,14 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(IDirect3DVolum ...@@ -139,12 +143,14 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(IDirect3DVolum
REFGUID refguid) REFGUID refguid)
{ {
IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface);
struct wined3d_resource *resource;
HRESULT hr; HRESULT hr;
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); resource = wined3d_texture_get_resource(This->wined3d_texture);
hr = wined3d_resource_free_private_data(resource, refguid);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
......
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