From cd0134072a7e088cf1ebcf1c4250aa13ac8a5c59 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Sat, 3 Sep 2016 13:04:23 -0700 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2