diff options
author | Marek Olšák <[email protected]> | 2019-01-25 20:39:40 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-02-04 18:46:25 -0500 |
commit | 742d6cdb42e5570a3a74005f18bb89208069d01f (patch) | |
tree | 34c982f32ebfc98cb93321448a3956a53317e77a /src/gallium | |
parent | a03ecbaeec91554988299e113d2f718e4c94ccd3 (diff) |
radeonsi: fix crashing performance counters (division by zero)
Fixes: e2b9329f17 "radeonsi: move remaining perfcounter code into si_perfcounter.c"
Diffstat (limited to 'src/gallium')
-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")) |