ac/spm: add an assertion to check the number of global instances
To make sure counters aren't silently discarded. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39013>
This commit is contained in:
@@ -545,6 +545,8 @@ bool ac_init_spm(const struct radeon_info *info,
|
||||
const struct ac_pc_block *block = ac_pc_get_block(pc, create_info[i].b->gpu_block);
|
||||
struct ac_spm_counter_create_info counter = create_info[i];
|
||||
|
||||
assert(block->num_global_instances > 0);
|
||||
|
||||
for (unsigned j = 0; j < block->num_global_instances; j++) {
|
||||
counter.instance = j;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user