i965/fs: Take into account misalignment in regs_written() and regs_read().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 7 Sep 2016 21:36:32 +0000 (14:36 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:54 +0000 (14:50 -0700)
commit717d8efd584d8db7fbbdbe7deb51371e28d6c492
treecb86364809aa1e1f09202ac7ab313b0daac5ef46
parente540045df5cf5ae17ce640d6d73138444a4ac0d3
i965/fs: Take into account misalignment in regs_written() and regs_read().

There was a workaround for this in fs_inst::size_read() for the
SHADER_OPCODE_MOV_INDIRECT instruction and FIXED_GRF register file
*only*.  We should take this possibility into account for the sources
and destinations of all instructions on all optimization passes that
need to quantize dataflow in 32B increments by adding the amount of
misalignment to the size read or written from the regs_read() and
regs_written() helpers respectively.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_ir_fs.h