[Mesa-dev] [PATCH 1/2] i965/blit: Fix the src dimension sanity check in miptree_copy

Jason Ekstrand jason at jlekstrand.net
Tue Dec 6 20:37:45 UTC 2016


Cc: "13.0" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/drivers/dri/i965/intel_blit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 03a35ee..5f0cf74 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -421,8 +421,10 @@ intel_miptree_copy(struct brw_context *brw,
 
       assert(src_x % bw == 0);
       assert(src_y % bh == 0);
-      assert(src_width % bw == 0);
-      assert(src_height % bh == 0);
+      assert(src_width % bw == 0 ||
+             src_x + src_width == minify(src_mt->logical_width0, src_level));
+      assert(src_height % bh == 0 ||
+             src_y + src_height == minify(src_mt->logical_height0, src_level));
 
       src_x /= (int)bw;
       src_y /= (int)bh;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list