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:
Henri Verbeet 2016-04-03 15:30:57 +02:00 committed by Alexandre Julliard
parent d496fbc1e4
commit 29421729ef
1 changed files with 6 additions and 2 deletions

View File

@ -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)
{
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;
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 TRUE;
}