diff options
author | Marek Olšák <[email protected]> | 2019-01-25 20:39:40 -0500 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-02-05 09:05:51 -0800 |
commit | 3f5099180d0f76ebc875719b48a9d590f7aa653f (patch) | |
tree | d4ea1feeb42127091059901c4ea1e86bf4f45663 | |
parent | 9667d89fe64426f0b1051cefd1af981afe1888f9 (diff) |
radeonsi: fix crashing performance counters (division by zero)
Fixes: e2b9329f17 "radeonsi: move remaining perfcounter code into si_perfcounter.c"
(cherry picked from commit 742d6cdb42e5570a3a74005f18bb89208069d01f)
-rw-r--r-- | src/gallium/drivers/radeonsi/si_perfcounter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c index 2da14f8868f..d55394f2cba 100644 --- a/src/gallium/drivers/radeonsi/si_perfcounter.c +++ b/src/gallium/drivers/radeonsi/si_perfcounter.c @@ -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")) |