Commit 742d6cdb authored by Marek Olšák's avatar Marek Olšák
Browse files

radeonsi: fix crashing performance counters (division by zero)

Fixes: e2b9329f "radeonsi: move remaining perfcounter code into si_perfcounter.c"
parent a03ecbae
......@@ -1333,7 +1333,7 @@ void si_init_perfcounters(struct si_screen *screen)
for (i = 0; i < num_blocks; ++i) {
struct si_pc_block *block = &pc->blocks[i];
block->b = &blocks[i];
block->num_instances = block->b->instances;
block->num_instances = MAX2(1, block->b->instances);
if (!strcmp(block->b->b->name, "CB") ||
!strcmp(block->b->b->name, "DB"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment