i965: Reverse condition ordering to let us support other gens.
authorMatt Turner <mattst88@gmail.com>
Sat, 14 Jun 2014 02:38:51 +0000 (19:38 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 19 Aug 2014 01:18:50 +0000 (18:18 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_eu_compact.c

index 625cfbba6e7b70587a187f201282d6fe59cedd02..25a96e7641c5e9a8a99c5d5c8c10f16773456d58 100644 (file)
@@ -789,14 +789,14 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
       case BRW_OPCODE_ELSE:
       case BRW_OPCODE_ENDIF:
       case BRW_OPCODE_WHILE:
-         if (brw->gen == 6) {
+         if (brw->gen >= 7) {
+            update_uip_jip(brw, insn, this_old_ip, compacted_counts);
+         } else if (brw->gen == 6) {
             int gen6_jump_count = brw_inst_gen6_jump_count(brw, insn);
             target_old_ip = this_old_ip + gen6_jump_count;
             target_compacted_count = compacted_counts[target_old_ip];
             gen6_jump_count -= (target_compacted_count - this_compacted_count);
             brw_inst_set_gen6_jump_count(brw, insn, gen6_jump_count);
-         } else {
-            update_uip_jip(brw, insn, this_old_ip, compacted_counts);
          }
          break;
       }