i965/fs: Fix bogus sub-MRF offset calculation in compute-to-mrf.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 3 Sep 2016 20:14:28 +0000 (13:14 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:56 +0000 (14:50 -0700)
commit401fc228fd7214086ced0a887bbbefd2e60948fa
treea267d2e556f757bb4528da5f4aa43e0d92be36c7
parentcd0134072a7e088cf1ebcf1c4250aa13ac8a5c59
i965/fs: Fix bogus sub-MRF offset calculation in compute-to-mrf.

The 'scan_inst->dst.offset % REG_SIZE' term in the final
'scan_inst->dst.offset' calculation is obviously bogus.  The offset
from the start of the copy destination register 'inst->dst' where the
destination of the generating instruction 'scan_inst' would be written
to (before compute-to-mrf runs) is just the offset of 'scan_inst->dst'
relative to the source of the copy instruction (AKA rel_offset in the
code below).

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