ac/spm: fix checking if the counter instance is valid
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 13 Sep 2023 12:49:45 +0000 (14:49 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 14 Sep 2023 14:17:19 +0000 (14:17 +0000)
commit6ae64900e21a270ffda00de481ec0845e21389c1
treea08513a3f4c68da39102f653ceb39a79b52104e4
parent90d9406436fdf27de180078fac4a25347bd84a3b
ac/spm: fix checking if the counter instance is valid

This should be compared against the number of global instances, and
there is also an off-by-one error.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25211>
src/amd/common/ac_spm.c