ac/spm: select correct segment type for per-SE blocks
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 14 Sep 2023 11:43:53 +0000 (13:43 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 18 Sep 2023 07:07:31 +0000 (07:07 +0000)
This currently does nothing because only the first instance is used,
but this will be needed for multi-instance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25240>

src/amd/common/ac_spm.c

index 39cc9c8..d15b60e 100644 (file)
@@ -325,7 +325,7 @@ ac_spm_add_counter(const struct radeon_info *info,
 
    /* Determine the counter segment type. */
    if (block->b->b->flags & AC_PC_BLOCK_SE) {
-      counter->segment_type = AC_SPM_SEGMENT_TYPE_SE0; // XXX
+      counter->segment_type = instance_mapping.se_index;
    } else {
       counter->segment_type = AC_SPM_SEGMENT_TYPE_GLOBAL;
    }