i965/fs: Emit a single ADD instruction for SET_SAMPLE_ID on Gen8+.
authorMatt Turner <mattst88@gmail.com>
Wed, 21 Oct 2015 01:31:02 +0000 (18:31 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 22 Oct 2015 19:27:00 +0000 (12:27 -0700)
Gen8+ lifted the register region restriction that an instruction whose
destination spans two registers must have sources that also span two
registers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index cee7c68bba7726c4177ded226313488aef9e185d..139d1dd17ec83b43e1885c7b9ae05ac6d89e3fe7 100644 (file)
@@ -1505,7 +1505,7 @@ fs_generator::generate_set_sample_id(fs_inst *inst,
           src0.type == BRW_REGISTER_TYPE_UD);
 
    struct brw_reg reg = stride(src1, 1, 4, 0);
-   if (dispatch_width == 8) {
+   if (devinfo->gen >= 8 || dispatch_width == 8) {
       brw_ADD(p, dst, src0, reg);
    } else if (dispatch_width == 16) {
       brw_push_insn_state(p);