i965/fs: Replace fs_inst::regs_read with ::size_read using byte units.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 8 Sep 2016 00:00:07 +0000 (17:00 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:53 +0000 (14:50 -0700)
commite1a918ba7be6b21303caa2d81671f2d3f17dd692
tree19e1a7927355fb25ca96ce7adec637a767ce8c9d
parent27cb6b081eaffcf786686136f7961c4d78cc5586
i965/fs: Replace fs_inst::regs_read with ::size_read using byte units.

The previous regs_read value can be recovered by rewriting each
reference of regs_read() like 'x = i.regs_read(j)' to 'x =
DIV_ROUND_UP(i.size_read(j), reg_unit)'.

For the same reason as in the previous patches, this doesn't attempt
to be particularly clever about simplifying the result in the interest
of keeping the rather lengthy patch as obvious as possible.  I'll come
back later to clean up any ugliness introduced here.

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