wined3d: Use the texture dimension helpers in surface_is_full_rect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d496fbc1e4
commit
29421729ef
|
@ -487,9 +487,13 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||||
|
|
||||||
static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RECT *r)
|
static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RECT *r)
|
||||||
{
|
{
|
||||||
if ((r->left && r->right) || abs(r->right - r->left) != surface->resource.width)
|
unsigned int t;
|
||||||
|
|
||||||
|
t = wined3d_texture_get_level_width(surface->container, surface->texture_level);
|
||||||
|
if ((r->left && r->right) || abs(r->right - r->left) != t)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if ((r->top && r->bottom) || abs(r->bottom - r->top) != surface->resource.height)
|
t = wined3d_texture_get_level_height(surface->container, surface->texture_level);
|
||||||
|
if ((r->top && r->bottom) || abs(r->bottom - r->top) != t)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue