[PATCH 5/5] wined3d: Use the texture dimension helpers in surface_is_full_rect().

Henri Verbeet hverbeet at codeweavers.com
Sun Apr 3 08:30:57 CDT 2016


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 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;
 }
-- 
2.1.4




More information about the wine-patches mailing list