diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 2726880aa83..f3d1132e7f0 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -126,13 +126,15 @@ static HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(IDirect3DVolume8 *ifac const void *pData, DWORD SizeOfData, DWORD Flags) { IDirect3DVolume8Impl *This = 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(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 IDirect3DVolume8Impl_GetPrivateData(IDirect3DVolume8 *ifac void *pData, DWORD *pSizeOfData) { IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(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 IDirect3DVolume8Impl_GetPrivateData(IDirect3DVolume8 *ifac static HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(IDirect3DVolume8 *iface, REFGUID refguid) { IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(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; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index ec10d43d175..e176edc2173 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -173,23 +173,6 @@ void * CDECL wined3d_volume_get_parent(const struct wined3d_volume *volume) return volume->resource.parent; } -HRESULT CDECL wined3d_volume_set_private_data(struct wined3d_volume *volume, - REFGUID guid, const void *data, DWORD data_size, DWORD flags) -{ - return wined3d_resource_set_private_data(&volume->resource, guid, data, data_size, flags); -} - -HRESULT CDECL wined3d_volume_get_private_data(const struct wined3d_volume *volume, - REFGUID guid, void *data, DWORD *data_size) -{ - return wined3d_resource_get_private_data(&volume->resource, guid, data, data_size); -} - -HRESULT CDECL wined3d_volume_free_private_data(struct wined3d_volume *volume, REFGUID guid) -{ - return wined3d_resource_free_private_data(&volume->resource, guid); -} - DWORD CDECL wined3d_volume_set_priority(struct wined3d_volume *volume, DWORD priority) { return resource_set_priority(&volume->resource, priority); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 7131b03e6c9..4483ba85d6d 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -278,15 +278,12 @@ @ cdecl wined3d_volume_create(ptr long long long long long long ptr ptr ptr) @ cdecl wined3d_volume_decref(ptr) -@ cdecl wined3d_volume_free_private_data(ptr ptr) @ cdecl wined3d_volume_from_resource(ptr) @ cdecl wined3d_volume_get_parent(ptr) @ cdecl wined3d_volume_get_priority(ptr) -@ cdecl wined3d_volume_get_private_data(ptr ptr ptr ptr) @ cdecl wined3d_volume_get_resource(ptr) @ cdecl wined3d_volume_incref(ptr) @ cdecl wined3d_volume_map(ptr ptr ptr long) @ cdecl wined3d_volume_preload(ptr) @ cdecl wined3d_volume_set_priority(ptr long) -@ cdecl wined3d_volume_set_private_data(ptr ptr ptr long long) @ cdecl wined3d_volume_unmap(ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 40879ff6b84..99dcc370c10 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2520,20 +2520,15 @@ HRESULT __cdecl wined3d_volume_create(struct wined3d_device *device, UINT width, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume); ULONG __cdecl wined3d_volume_decref(struct wined3d_volume *volume); -HRESULT __cdecl wined3d_volume_free_private_data(struct wined3d_volume *volume, REFGUID guid); struct wined3d_volume * __cdecl wined3d_volume_from_resource(struct wined3d_resource *resource); void * __cdecl wined3d_volume_get_parent(const struct wined3d_volume *volume); DWORD __cdecl wined3d_volume_get_priority(const struct wined3d_volume *volume); -HRESULT __cdecl wined3d_volume_get_private_data(const struct wined3d_volume *volume, - REFGUID guid, void *data, DWORD *data_size); struct wined3d_resource * __cdecl wined3d_volume_get_resource(struct wined3d_volume *volume); ULONG __cdecl wined3d_volume_incref(struct wined3d_volume *volume); HRESULT __cdecl wined3d_volume_map(struct wined3d_volume *volume, WINED3DLOCKED_BOX *locked_box, const WINED3DBOX *box, DWORD flags); void __cdecl wined3d_volume_preload(struct wined3d_volume *volume); DWORD __cdecl wined3d_volume_set_priority(struct wined3d_volume *volume, DWORD new_priority); -HRESULT __cdecl wined3d_volume_set_private_data(struct wined3d_volume *volume, - REFGUID guid, const void *data, DWORD data_size, DWORD flags); HRESULT __cdecl wined3d_volume_unmap(struct wined3d_volume *volume); #endif /* __WINE_WINED3D_H */