ac/perfcounter: fix computing number of 16-bit/32-bit SPM counters

Determine them only when both are explicitly 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39199>
This commit is contained in:
Samuel Pitoiset 2026-01-07 17:24:19 +01:00 committed by Marge Bot
parent d1efdc7e76
commit eb37d6ceb7

View file

@ -755,10 +755,11 @@ bool ac_init_perfcounters(const struct radeon_info *info,
const uint32_t rb_per_sa = num_rb_per_se / info->max_sa_per_se;
/* Determine the number of 16-bit/32-bit SPM counters. */
if (!block->b->b->num_16bit_spm_counters)
if (!block->b->b->num_16bit_spm_counters &&
!block->b->b->num_32bit_spm_counters) {
block->b->b->num_16bit_spm_counters = block->b->b->num_spm_counters * 4;
if (!block->b->b->num_32bit_spm_counters)
block->b->b->num_32bit_spm_counters = block->b->b->num_spm_counters * 2;
}
switch (block->b->b->gpu_block) {
case CB: