i965: Compact acc_wr_control only on Gen6+.
authorMatt Turner <mattst88@gmail.com>
Mon, 19 Oct 2015 22:01:20 +0000 (15:01 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 21 Oct 2015 17:17:37 +0000 (10:17 -0700)
It only exists on Gen6+, and the next patches will add compaction
support for the (unused) field in the same location on earlier
platforms.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_eu_compact.c

index facf3cd1b8863481020696dd125fcf81033b942b..b122deca7275ddf2288967465d0b28f57f608e90 100644 (file)
@@ -1016,7 +1016,10 @@ brw_try_compact_instruction(const struct brw_device_info *devinfo,
    if (!set_subreg_index(devinfo, &temp, src, is_immediate))
       return false;
 
-   compact(acc_wr_control);
+   if (devinfo->gen >= 6) {
+      compact(acc_wr_control);
+   }
+
    compact(cond_modifier);
 
    if (devinfo->gen <= 6)
@@ -1224,7 +1227,10 @@ brw_uncompact_instruction(const struct brw_device_info *devinfo, brw_inst *dst,
 
    set_uncompacted_subreg(devinfo, dst, src);
 
-   uncompact(acc_wr_control);
+   if (devinfo->gen >= 6) {
+      uncompact(acc_wr_control);
+   }
+
    uncompact(cond_modifier);
 
    if (devinfo->gen <= 6)