Module: Mesa Branch: master Commit: e95a4ed2967346e6ff7efb9897d8c430fcaa90f7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e95a4ed2967346e6ff7efb9897d8c430fcaa90f7
Author: Kenneth Graunke <kenn...@whitecape.org> Date: Mon Feb 10 15:37:09 2014 -0800 i965/fs: Simplify FS_OPCODE_SET_OMASK stride mashing a bit. In the first case, we can simply call stride(mask, 16, 8, 2) rather than creating a new register with a different stride, then immediately changing it a second time. In the second case, the stride was already what we wanted, so we can just use mask without any changes at all. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 26913d2..4820b04 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1130,11 +1130,9 @@ fs_generator::generate_set_omask(fs_inst *inst, brw_set_mask_control(p, BRW_MASK_DISABLE); if (stride_8_8_1) { - brw_MOV(p, dst, stride(retype(brw_vec1_reg(mask.file, mask.nr, 0), - dst.type), 16, 8, 2)); + brw_MOV(p, dst, retype(stride(mask, 16, 8, 2), dst.type)); } else if (stride_0_1_0) { - brw_MOV(p, dst, stride(retype(brw_vec1_reg(mask.file, mask.nr, 0), - dst.type), 0, 1, 0)); + brw_MOV(p, dst, retype(mask, dst.type)); } brw_pop_insn_state(p); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit