i965/fs: Simplify FS_OPCODE_SET_SAMPLE_ID stride mashing a bit.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Feb 2014 22:46:49 +0000 (14:46 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Feb 2014 10:21:26 +0000 (02:21 -0800)
stride(brw_vec1_reg(...) ...) takes some register, changes the strides,
then changes the strides again.  Let's do it once.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 6d211e1141206f9899f6883024e21d8d9e44e4f1..26913d292e3534336d41c0e10f99b12bceb7702c 100644 (file)
@@ -1156,8 +1156,7 @@ fs_generator::generate_set_sample_id(fs_inst *inst,
    brw_push_insn_state(p);
    brw_set_compression_control(p, BRW_COMPRESSION_NONE);
    brw_set_mask_control(p, BRW_MASK_DISABLE);
-   struct brw_reg reg = stride(retype(brw_vec1_reg(src1.file, src1.nr, 0),
-                                      BRW_REGISTER_TYPE_UW), 1, 4, 0);
+   struct brw_reg reg = retype(stride(src1, 1, 4, 0), BRW_REGISTER_TYPE_UW);
    brw_ADD(p, dst, src0, reg);
    if (dispatch_width == 16)
       brw_ADD(p, offset(dst, 1), offset(src0, 1), suboffset(reg, 2));