ac/spm: fix determing the SPM wire

One SPM wire holds two 16-bit counters.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: e928f475cc ("ac: add initial SPM support")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13758>
This commit is contained in:
Samuel Pitoiset 2021-11-11 16:12:06 +01:00
parent e94a899c0e
commit 11c6a32759

View file

@ -133,8 +133,8 @@ ac_spm_map_counter(struct ac_spm_trace_data *spm_trace,
/* Determine if the counter is even or odd. */
counter->is_even = !(index % 2);
/* Determine the SPM wire (lower 16-bits for even, upper for odd). */
*spm_wire = !counter->is_even + i;
/* Determine the SPM wire (one wire holds two 16-bit counters). */
*spm_wire = !!(index >= 2);
return true;
}