Commit 341db6d8 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Remove wined3d_texture_set/get_priority.

parent cf119337
...@@ -140,12 +140,14 @@ static HRESULT WINAPI d3d8_texture_2d_FreePrivateData(IDirect3DTexture8 *iface, ...@@ -140,12 +140,14 @@ static HRESULT WINAPI d3d8_texture_2d_FreePrivateData(IDirect3DTexture8 *iface,
static DWORD WINAPI d3d8_texture_2d_SetPriority(IDirect3DTexture8 *iface, DWORD priority) static DWORD WINAPI d3d8_texture_2d_SetPriority(IDirect3DTexture8 *iface, DWORD priority)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -154,12 +156,14 @@ static DWORD WINAPI d3d8_texture_2d_SetPriority(IDirect3DTexture8 *iface, DWORD ...@@ -154,12 +156,14 @@ static DWORD WINAPI d3d8_texture_2d_SetPriority(IDirect3DTexture8 *iface, DWORD
static DWORD WINAPI d3d8_texture_2d_GetPriority(IDirect3DTexture8 *iface) static DWORD WINAPI d3d8_texture_2d_GetPriority(IDirect3DTexture8 *iface)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -486,12 +490,14 @@ static HRESULT WINAPI d3d8_texture_cube_FreePrivateData(IDirect3DCubeTexture8 *i ...@@ -486,12 +490,14 @@ static HRESULT WINAPI d3d8_texture_cube_FreePrivateData(IDirect3DCubeTexture8 *i
static DWORD WINAPI d3d8_texture_cube_SetPriority(IDirect3DCubeTexture8 *iface, DWORD priority) static DWORD WINAPI d3d8_texture_cube_SetPriority(IDirect3DCubeTexture8 *iface, DWORD priority)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -500,12 +506,14 @@ static DWORD WINAPI d3d8_texture_cube_SetPriority(IDirect3DCubeTexture8 *iface, ...@@ -500,12 +506,14 @@ static DWORD WINAPI d3d8_texture_cube_SetPriority(IDirect3DCubeTexture8 *iface,
static DWORD WINAPI d3d8_texture_cube_GetPriority(IDirect3DCubeTexture8 *iface) static DWORD WINAPI d3d8_texture_cube_GetPriority(IDirect3DCubeTexture8 *iface)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -853,12 +861,14 @@ static HRESULT WINAPI d3d8_texture_3d_FreePrivateData(IDirect3DVolumeTexture8 *i ...@@ -853,12 +861,14 @@ static HRESULT WINAPI d3d8_texture_3d_FreePrivateData(IDirect3DVolumeTexture8 *i
static DWORD WINAPI d3d8_texture_3d_SetPriority(IDirect3DVolumeTexture8 *iface, DWORD priority) static DWORD WINAPI d3d8_texture_3d_SetPriority(IDirect3DVolumeTexture8 *iface, DWORD priority)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -867,12 +877,14 @@ static DWORD WINAPI d3d8_texture_3d_SetPriority(IDirect3DVolumeTexture8 *iface, ...@@ -867,12 +877,14 @@ static DWORD WINAPI d3d8_texture_3d_SetPriority(IDirect3DVolumeTexture8 *iface,
static DWORD WINAPI d3d8_texture_3d_GetPriority(IDirect3DVolumeTexture8 *iface) static DWORD WINAPI d3d8_texture_3d_GetPriority(IDirect3DVolumeTexture8 *iface)
{ {
struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface); struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
......
...@@ -142,12 +142,14 @@ static HRESULT WINAPI d3d9_texture_2d_FreePrivateData(IDirect3DTexture9 *iface, ...@@ -142,12 +142,14 @@ static HRESULT WINAPI d3d9_texture_2d_FreePrivateData(IDirect3DTexture9 *iface,
static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD priority) static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD priority)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -156,12 +158,14 @@ static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD ...@@ -156,12 +158,14 @@ static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD
static DWORD WINAPI d3d9_texture_2d_GetPriority(IDirect3DTexture9 *iface) static DWORD WINAPI d3d9_texture_2d_GetPriority(IDirect3DTexture9 *iface)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -531,12 +535,14 @@ static HRESULT WINAPI d3d9_texture_cube_FreePrivateData(IDirect3DCubeTexture9 *i ...@@ -531,12 +535,14 @@ static HRESULT WINAPI d3d9_texture_cube_FreePrivateData(IDirect3DCubeTexture9 *i
static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface, DWORD priority) static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface, DWORD priority)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -545,12 +551,14 @@ static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface, ...@@ -545,12 +551,14 @@ static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface,
static DWORD WINAPI d3d9_texture_cube_GetPriority(IDirect3DCubeTexture9 *iface) static DWORD WINAPI d3d9_texture_cube_GetPriority(IDirect3DCubeTexture9 *iface)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -944,12 +952,14 @@ static HRESULT WINAPI d3d9_texture_3d_FreePrivateData(IDirect3DVolumeTexture9 *i ...@@ -944,12 +952,14 @@ static HRESULT WINAPI d3d9_texture_3d_FreePrivateData(IDirect3DVolumeTexture9 *i
static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface, DWORD priority) static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface, DWORD priority)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);
struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_set_priority(texture->wined3d_texture, priority); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
...@@ -958,12 +968,14 @@ static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface, ...@@ -958,12 +968,14 @@ static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface,
static DWORD WINAPI d3d9_texture_3d_GetPriority(IDirect3DVolumeTexture9 *iface) static DWORD WINAPI d3d9_texture_3d_GetPriority(IDirect3DVolumeTexture9 *iface)
{ {
struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);
const struct wined3d_resource *resource;
DWORD ret; DWORD ret;
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); wined3d_mutex_lock();
ret = wined3d_texture_get_priority(texture->wined3d_texture); resource = wined3d_texture_get_resource(texture->wined3d_texture);
ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return ret; return ret;
......
...@@ -2234,6 +2234,7 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO ...@@ -2234,6 +2234,7 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface); struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE; DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE;
HRESULT hr; HRESULT hr;
struct wined3d_resource *resource;
TRACE("iface %p, priority %u.\n", iface, priority); TRACE("iface %p, priority %u.\n", iface, priority);
...@@ -2247,7 +2248,8 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO ...@@ -2247,7 +2248,8 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO
} }
else else
{ {
wined3d_texture_set_priority(surface->wined3d_texture, priority); resource = wined3d_texture_get_resource(surface->wined3d_texture);
wined3d_resource_set_priority(resource, priority);
hr = DD_OK; hr = DD_OK;
} }
wined3d_mutex_unlock(); wined3d_mutex_unlock();
...@@ -2258,6 +2260,7 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO ...@@ -2258,6 +2260,7 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO
static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWORD *priority) static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWORD *priority)
{ {
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface); struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
const struct wined3d_resource *resource;
DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE; DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE;
HRESULT hr; HRESULT hr;
...@@ -2276,7 +2279,8 @@ static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWO ...@@ -2276,7 +2279,8 @@ static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWO
} }
else else
{ {
*priority = wined3d_texture_get_priority(surface->wined3d_texture); resource = wined3d_texture_get_resource(surface->wined3d_texture);
*priority = wined3d_resource_get_priority(resource);
hr = DD_OK; hr = DD_OK;
} }
wined3d_mutex_unlock(); wined3d_mutex_unlock();
......
...@@ -506,16 +506,6 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text ...@@ -506,16 +506,6 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text
return &texture->resource; return &texture->resource;
} }
DWORD CDECL wined3d_texture_set_priority(struct wined3d_texture *texture, DWORD priority)
{
return wined3d_resource_set_priority(&texture->resource, priority);
}
DWORD CDECL wined3d_texture_get_priority(const struct wined3d_texture *texture)
{
return wined3d_resource_get_priority(&texture->resource);
}
/* Context activation is done by the caller */ /* Context activation is done by the caller */
void wined3d_texture_load(struct wined3d_texture *texture, void wined3d_texture_load(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) struct wined3d_context *context, BOOL srgb)
......
...@@ -249,7 +249,6 @@ ...@@ -249,7 +249,6 @@
@ cdecl wined3d_texture_get_level_count(ptr) @ cdecl wined3d_texture_get_level_count(ptr)
@ cdecl wined3d_texture_get_lod(ptr) @ cdecl wined3d_texture_get_lod(ptr)
@ cdecl wined3d_texture_get_parent(ptr) @ cdecl wined3d_texture_get_parent(ptr)
@ cdecl wined3d_texture_get_priority(ptr)
@ cdecl wined3d_texture_get_resource(ptr) @ cdecl wined3d_texture_get_resource(ptr)
@ cdecl wined3d_texture_get_sub_resource(ptr long) @ cdecl wined3d_texture_get_sub_resource(ptr long)
@ cdecl wined3d_texture_incref(ptr) @ cdecl wined3d_texture_incref(ptr)
...@@ -257,7 +256,6 @@ ...@@ -257,7 +256,6 @@
@ cdecl wined3d_texture_set_autogen_filter_type(ptr long) @ cdecl wined3d_texture_set_autogen_filter_type(ptr long)
@ cdecl wined3d_texture_set_color_key(ptr long ptr) @ cdecl wined3d_texture_set_color_key(ptr long ptr)
@ cdecl wined3d_texture_set_lod(ptr long) @ cdecl wined3d_texture_set_lod(ptr long)
@ cdecl wined3d_texture_set_priority(ptr long)
@ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr) @ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr)
@ cdecl wined3d_vertex_declaration_create_from_fvf(ptr long ptr ptr ptr) @ cdecl wined3d_vertex_declaration_create_from_fvf(ptr long ptr ptr ptr)
......
...@@ -2460,7 +2460,6 @@ enum wined3d_texture_filter_type __cdecl wined3d_texture_get_autogen_filter_type ...@@ -2460,7 +2460,6 @@ enum wined3d_texture_filter_type __cdecl wined3d_texture_get_autogen_filter_type
DWORD __cdecl wined3d_texture_get_level_count(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); DWORD __cdecl wined3d_texture_get_lod(const struct wined3d_texture *texture);
void * __cdecl wined3d_texture_get_parent(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);
struct wined3d_resource * __cdecl wined3d_texture_get_resource(struct wined3d_texture *texture); 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, struct wined3d_resource * __cdecl wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
UINT sub_resource_idx); UINT sub_resource_idx);
...@@ -2471,7 +2470,6 @@ HRESULT __cdecl wined3d_texture_set_autogen_filter_type(struct wined3d_texture * ...@@ -2471,7 +2470,6 @@ HRESULT __cdecl wined3d_texture_set_autogen_filter_type(struct wined3d_texture *
HRESULT __cdecl wined3d_texture_set_color_key(struct wined3d_texture *texture, HRESULT __cdecl wined3d_texture_set_color_key(struct wined3d_texture *texture,
DWORD flags, const struct wined3d_color_key *color_key); DWORD flags, const struct wined3d_color_key *color_key);
DWORD __cdecl wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod); 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_vertex_declaration_create(struct wined3d_device *device, HRESULT __cdecl wined3d_vertex_declaration_create(struct wined3d_device *device,
const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_vertex_element *elements, UINT element_count, void *parent,
......
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