i965: Fix check for negative pitch in can_do_fast_copy_blit().
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 26 Jan 2017 09:27:42 +0000 (01:27 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Jan 2017 02:20:35 +0000 (18:20 -0800)
commit02216a1ddf2bcafb86fda352e514f27ab6f7a4fa
treeefec09a61177701caddd2b1abd074356adf9a341
parentc4d7b9cd290bdedb0e58fa52bf32d39d2411a789
i965: Fix check for negative pitch in can_do_fast_copy_blit().

At this point, the pitch is in bytes.  We haven't yet divided the pitch
by 4 for tiled surfaces, so abs(pitch) may be larger than 32K.  This
means the bit 15 trick won't work.

The caller now has signed integers anyway, so just pass those through
and do the obvious check.

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_blit.c