radeonsi: fix perfcounter selection for SI_PC_MULTI_BLOCK layouts
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 13 Dec 2015 21:46:21 +0000 (16:46 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 15 Dec 2015 16:23:40 +0000 (11:23 -0500)
The incorrectly computed register count caused lockups.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/gallium/drivers/radeonsi/si_perfcounter.c

index a0ddff6c4e3239f555c19311e4cc8d0620a54f22..7ee1daee7bfff541b017afe55363c53ea25dac91 100644 (file)
@@ -436,7 +436,7 @@ static void si_pc_emit_select(struct r600_common_context *ctx,
 
                dw = count + regs->num_prelude;
                if (count >= regs->num_multi)
-                       count += regs->num_multi;
+                       dw += regs->num_multi;
                radeon_set_uconfig_reg_seq(cs, regs->select0, dw);
                for (idx = 0; idx < regs->num_prelude; ++idx)
                        radeon_emit(cs, 0);