i965/fs: emit MOV_INDIRECT with the source with the right register type
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 13 Feb 2017 11:09:53 +0000 (12:09 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 1 Mar 2017 05:50:35 +0000 (06:50 +0100)
This was hiding bugs as it retyped the source to destination's type.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 26ffbb169d22ee38a06ba50c92ab663d0199bf11..65c75e63d27df9b3612728d56bc07a83a5effe12 100644 (file)
@@ -428,7 +428,7 @@ fs_generator::generate_mov_indirect(fs_inst *inst,
       brw_ADD(p, addr, indirect_byte_offset, brw_imm_uw(imm_byte_offset));
       struct brw_reg ind_src = brw_VxH_indirect(0, 0);
 
-      brw_inst *mov = brw_MOV(p, dst, retype(ind_src, dst.type));
+      brw_inst *mov = brw_MOV(p, dst, retype(ind_src, reg.type));
 
       if (devinfo->gen == 6 && dst.file == BRW_MESSAGE_REGISTER_FILE &&
           !inst->get_next()->is_tail_sentinel() &&