Commit 29421729 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use the texture dimension helpers in surface_is_full_rect().

parent d496fbc1
...@@ -487,9 +487,13 @@ static void surface_evict_sysmem(struct wined3d_surface *surface) ...@@ -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;
} }
......
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