From: Francisco Jerez Date: Sat, 3 Sep 2016 20:04:23 +0000 (-0700) Subject: i965/fs: Take into account copy register offset during compute-to-mrf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd0134072a7e088cf1ebcf1c4250aa13ac8a5c59;p=mesa.git i965/fs: Take into account copy register offset during compute-to-mrf. This was dropping 'inst->dst.offset' on the floor. Nothing in the code above seems to guarantee that it's zero and in that case the offset of the register being coalesced into wouldn't be taken into account while rewriting the generating instruction. Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index a52e5a37950..ee196665fce 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2821,7 +2821,7 @@ fs_visitor::compute_to_mrf() } scan_inst->dst.file = MRF; - scan_inst->dst.offset %= REG_SIZE; + scan_inst->dst.offset = inst->dst.offset + scan_inst->dst.offset % REG_SIZE; scan_inst->saturate |= inst->saturate; if (!regs_left) break;