From: Francisco Jerez Date: Thu, 19 May 2016 01:41:28 +0000 (-0700) Subject: i965/fs: Set default access mode to Align1 for all instructions in the generator. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=117a9a0a6431a6c35aa1cf5fc5cb96d948045ce6;p=mesa.git i965/fs: Set default access mode to Align1 for all instructions in the generator. Currently the generator code for most opcodes honours the default access mode (which should typically be Align1 in the scalar back-end), but generate_code() doesn't set it explicitly which means that the access mode from a previous instruction could leak into the following ones if you did something special and weren't careful enough to save and restore the previous access mode. Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 9d1589cca7b..a3cb4c0cc1d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1697,6 +1697,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width) } dst = brw_reg_from_fs_reg(p, inst, &inst->dst, devinfo->gen); + brw_set_default_access_mode(p, BRW_ALIGN_1); brw_set_default_predicate_control(p, inst->predicate); brw_set_default_predicate_inverse(p, inst->predicate_inverse); brw_set_default_flag_reg(p, 0, inst->flag_subreg);