i965/fs: Clamp image array indices to the array bounds on IVB.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 27 Jul 2015 11:33:06 +0000 (14:33 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 11 Aug 2015 12:07:40 +0000 (15:07 +0300)
commit13a04abc277089275217dce119e18acf4d4ce52d
treec23d449ee6176c7bae470fe3cb3e64b8490386f7
parenta47ae8de2cf30fbe45318a18a2ea032f30ab7d10
i965/fs: Clamp image array indices to the array bounds on IVB.

This fixes the spec@arb_shader_image_load_store@invalid index bounds
piglit tests on IVB, which were causing a GPU hang and then a crash
due to the invalid binding table index result of the array index
calculation.  Other generations seem to behave sensibly when an
invalid surface is provided so it doesn't look like we need to care.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp