i965/vec4: Replace vec4_instruction::regs_read with ::size_read using byte units.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 8 Sep 2016 00:00:30 +0000 (17:00 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:54 +0000 (14:50 -0700)
commit728dd30c0ac0078653974de36087456065d2e3ae
treeb5b40c67bc0fb1f79177dc4c4c7a007fe16193f4
parente1a918ba7be6b21303caa2d81671f2d3f17dd692
i965/vec4: Replace vec4_instruction::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_ir_vec4.h
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp