i965/fs: Extend region width calculation to allow arbitrary execution sizes.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 20 May 2016 04:43:48 +0000 (21:43 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:22:10 +0000 (23:22 -0700)
commit0b4cd91071fdf9802559974aa9fd32ac4bbd7439
tree6630793ba4d9cf2a7877f238a45a5826e875b1a8
parentdabaf4fb9664a431014387cece356d5b64caf9b6
i965/fs: Extend region width calculation to allow arbitrary execution sizes.

Instead of just halving the execution size when the instruction is
compressed hoping that it will give a legal source region width, we
can calculate the maximum legal width value in closed form from the
component size and stride.  This makes sure that brw_reg_from_fs_reg()
always returns a valid hardware region even for virtual 32-wide
instructions (e.g. send-like instructions) that would seem to exceed
the hardware region width limit after halving.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp