mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:11:01 +00:00
d3d8: Implement IDirect3DVolumeTexture8 private data handling on top of wined3d_resource.
This commit is contained in:
parent
5b077584d2
commit
792060d67f
|
@ -107,13 +107,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_SetPrivateData(IDirect3DVolume
|
|||
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags)
|
||||
{
|
||||
IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(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;
|
||||
|
@ -123,13 +125,15 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetPrivateData(IDirect3DVolume
|
|||
REFGUID refguid, void *pData, DWORD *pSizeOfData)
|
||||
{
|
||||
IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(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;
|
||||
|
@ -139,12 +143,14 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_FreePrivateData(IDirect3DVolum
|
|||
REFGUID refguid)
|
||||
{
|
||||
IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(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;
|
||||
|
|
|
@ -457,23 +457,6 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text
|
|||
return &texture->resource;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_set_private_data(struct wined3d_texture *texture,
|
||||
REFGUID guid, const void *data, DWORD data_size, DWORD flags)
|
||||
{
|
||||
return wined3d_resource_set_private_data(&texture->resource, guid, data, data_size, flags);
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_get_private_data(const struct wined3d_texture *texture,
|
||||
REFGUID guid, void *data, DWORD *data_size)
|
||||
{
|
||||
return wined3d_resource_get_private_data(&texture->resource, guid, data, data_size);
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_free_private_data(struct wined3d_texture *texture, REFGUID guid)
|
||||
{
|
||||
return wined3d_resource_free_private_data(&texture->resource, guid);
|
||||
}
|
||||
|
||||
DWORD CDECL wined3d_texture_set_priority(struct wined3d_texture *texture, DWORD priority)
|
||||
{
|
||||
return resource_set_priority(&texture->resource, priority);
|
||||
|
|
|
@ -259,14 +259,12 @@
|
|||
@ cdecl wined3d_texture_create_3d(ptr long long long long long long long ptr ptr ptr)
|
||||
@ cdecl wined3d_texture_create_cube(ptr long long long long long ptr ptr ptr)
|
||||
@ cdecl wined3d_texture_decref(ptr)
|
||||
@ cdecl wined3d_texture_free_private_data(ptr ptr)
|
||||
@ cdecl wined3d_texture_generate_mipmaps(ptr)
|
||||
@ cdecl wined3d_texture_get_autogen_filter_type(ptr)
|
||||
@ cdecl wined3d_texture_get_level_count(ptr)
|
||||
@ cdecl wined3d_texture_get_lod(ptr)
|
||||
@ cdecl wined3d_texture_get_parent(ptr)
|
||||
@ cdecl wined3d_texture_get_priority(ptr)
|
||||
@ cdecl wined3d_texture_get_private_data(ptr ptr ptr ptr)
|
||||
@ cdecl wined3d_texture_get_resource(ptr)
|
||||
@ cdecl wined3d_texture_get_sub_resource(ptr long)
|
||||
@ cdecl wined3d_texture_incref(ptr)
|
||||
|
@ -274,7 +272,6 @@
|
|||
@ cdecl wined3d_texture_set_autogen_filter_type(ptr long)
|
||||
@ cdecl wined3d_texture_set_lod(ptr long)
|
||||
@ cdecl wined3d_texture_set_priority(ptr long)
|
||||
@ cdecl wined3d_texture_set_private_data(ptr ptr ptr long long)
|
||||
|
||||
@ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr)
|
||||
@ cdecl wined3d_vertex_declaration_create_from_fvf(ptr long ptr ptr ptr)
|
||||
|
|
|
@ -2495,15 +2495,12 @@ HRESULT __cdecl wined3d_texture_create_cube(struct wined3d_device *device, UINT
|
|||
UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent,
|
||||
const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture);
|
||||
ULONG __cdecl wined3d_texture_decref(struct wined3d_texture *texture);
|
||||
HRESULT __cdecl wined3d_texture_free_private_data(struct wined3d_texture *texture, REFGUID guid);
|
||||
void __cdecl wined3d_texture_generate_mipmaps(struct wined3d_texture *texture);
|
||||
WINED3DTEXTUREFILTERTYPE __cdecl wined3d_texture_get_autogen_filter_type(const struct wined3d_texture *texture);
|
||||
DWORD __cdecl wined3d_texture_get_level_count(const struct wined3d_texture *texture);
|
||||
DWORD __cdecl wined3d_texture_get_lod(const struct wined3d_texture *texture);
|
||||
void * __cdecl wined3d_texture_get_parent(const struct wined3d_texture *texture);
|
||||
DWORD __cdecl wined3d_texture_get_priority(const struct wined3d_texture *texture);
|
||||
HRESULT __cdecl wined3d_texture_get_private_data(const struct wined3d_texture *texture,
|
||||
REFGUID guid, void *data, DWORD *data_size);
|
||||
struct wined3d_resource * __cdecl wined3d_texture_get_resource(struct wined3d_texture *texture);
|
||||
struct wined3d_resource * __cdecl wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
|
||||
UINT sub_resource_idx);
|
||||
|
@ -2513,8 +2510,6 @@ HRESULT __cdecl wined3d_texture_set_autogen_filter_type(struct wined3d_texture *
|
|||
WINED3DTEXTUREFILTERTYPE filter_type);
|
||||
DWORD __cdecl wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod);
|
||||
DWORD __cdecl wined3d_texture_set_priority(struct wined3d_texture *texture, DWORD priority);
|
||||
HRESULT __cdecl wined3d_texture_set_private_data(struct wined3d_texture *texture,
|
||||
REFGUID guid, const void *data, DWORD data_size, DWORD flags);
|
||||
|
||||
HRESULT __cdecl wined3d_vertex_declaration_create(struct wined3d_device *device,
|
||||
const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent,
|
||||
|
|
Loading…
Reference in a new issue