intel/blorp: Fix a couple asserts around image copy rectangles
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 26 Oct 2016 05:47:21 +0000 (22:47 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 27 Oct 2016 20:45:39 +0000 (13:45 -0700)
commit4964a5149b7776ce27aaeab2be0c2ebf41ded740
treee8fe79103b35e01d99f6b1fe88696096759a6586
parentcaf67bb12fce94e00cf2c158c88cefab26b07af9
intel/blorp: Fix a couple asserts around image copy rectangles

With dealing with rectangles in compressed images, you can have a width or
height that isn't a multiple of the corresponding compression block
dimension but only if that edge of your rectangle is on the edge of the
image.  When we call convert_to_single_slice, it creates an 2-D image and a
set of tile offsets into that image.  When detecting the right-edge and
bottom-edge cases, we weren't including the tile offsets so the assert
would misfire.  This caused crashes in a few UE4 demos

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reported-by: "Eero Tamminen" <eero.t.tamminen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98431
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Tested-by: "Eero Tamminen" <eero.t.tamminen@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/intel/blorp/blorp_blit.c