mirror of
https://github.com/reactos/wine.git
synced 2025-01-24 04:45:18 +00:00
d3d9: Implement IDirect3DTexture9 private data handling on top of wined3d_resource.
This commit is contained in:
parent
732338ab35
commit
a989afe364
@ -108,13 +108,15 @@ static HRESULT WINAPI IDirect3DTexture9Impl_SetPrivateData(IDirect3DTexture9 *if
|
||||
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags)
|
||||
{
|
||||
IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(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_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();
|
||||
|
||||
return hr;
|
||||
@ -124,13 +126,15 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetPrivateData(IDirect3DTexture9 *if
|
||||
REFGUID refguid, void *pData, DWORD *pSizeOfData)
|
||||
{
|
||||
IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(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_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();
|
||||
|
||||
return hr;
|
||||
@ -140,12 +144,14 @@ static HRESULT WINAPI IDirect3DTexture9Impl_FreePrivateData(IDirect3DTexture9 *i
|
||||
REFGUID refguid)
|
||||
{
|
||||
IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface);
|
||||
struct wined3d_resource *resource;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
|
||||
|
||||
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();
|
||||
|
||||
return hr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user