projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90d9406
)
ac/spm: fix checking if the counter instance is valid
author
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Wed, 13 Sep 2023 12:49:45 +0000
(14:49 +0200)
committer
Marge Bot
<emma+marge@anholt.net>
Thu, 14 Sep 2023 14:17:19 +0000
(14:17 +0000)
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
patch
|
blob
|
history
diff --git
a/src/amd/common/ac_spm.c
b/src/amd/common/ac_spm.c
index
f940a1f
..
2d632fe
100644
(file)
--- a/
src/amd/common/ac_spm.c
+++ b/
src/amd/common/ac_spm.c
@@
-240,7
+240,7
@@
ac_spm_add_counter(const struct ac_perfcounters *pc,
}
/* Check if the number of instances is valid. */
- if (info->b->instance > block->num_
instances
) {
+ if (info->b->instance > block->num_
global_instances - 1
) {
fprintf(stderr, "ac/spm: Invalid instance ID.\n");
return false;
}