OSDN Git Service

i965: Prevent coordinate overflow in intel_emit_linear_blit
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 6 Jun 2015 08:33:33 +0000 (09:33 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 6 Sep 2015 17:30:25 +0000 (18:30 +0100)
commitf0180a37d79a881b02d164f4f9ff22143928cbaf
tree64e413d41c20b38de8330d02b60a0c729effb10c
parentfe77d714f28fa876d3c863bd2c019282703eee0d
i965: Prevent coordinate overflow in intel_emit_linear_blit

Fixes regression from
commit 8c17d53823c77ac1c56b0548e4e54f69a33285f1
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Apr 15 03:04:33 2015 -0700

    i965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.

which adjusted the coordinates to be relative to the nearest cacheline.
However, this then offsets the coordinates by up to 63 and this may then
cause them to overflow the BLT limits. For the well aligned large
transfer case, we can use 32bpp pixels and so reduce the coordinates by
4 (versus the current 8bpp pixels). We also have to be more careful
doing the last line just in case it may exceed the coordinate limit.

Reported-and-tested-by: kaillasse91@hotmail.fr
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90734
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Ian Romanick <ian.d.romanick@intel.com>
Cc: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit d38a5601068ae1d923efece8f28757777f4474e4)
src/mesa/drivers/dri/i965/intel_blit.c