From 117a9a0a6431a6c35aa1cf5fc5cb96d948045ce6 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 18 May 2016 18:41:28 -0700 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.30.2