Henri Verbeet : wined3d: Use the texture dimension helpers in surface_is_full_rect().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 4 10:37:01 CDT 2016
Module: wine
Branch: master
Commit: 29421729ef520ab79d03198ef98a55aa40ed4606
URL: http://source.winehq.org/git/wine.git/?a=commit;h=29421729ef520ab79d03198ef98a55aa40ed4606
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Apr 3 15:30:57 2016 +0200
wined3d: Use the texture dimension helpers in surface_is_full_rect().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/surface.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 922c43a..a7dfbf5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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;
}
More information about the wine-cvs
mailing list