[Mesa-dev] [PATCH] radeonsi: bugfix in performance counters
Mauro Rossi
issor.oruam at gmail.com
Fri May 12 22:07:16 UTC 2017
'if (regs->counters)' expression at line 623 is always true,
spotted because of an error when building android-x86.
'if (regs->counters[idx])' is used instead.
Fixes the following building error in Android:
external/mesa/src/gallium/drivers/radeonsi/si_perfcounter.c:617:14:
error: address of array 'regs->counters' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (regs->counters)
~~ ~~~~~~^~~~~~~~
Fixes: ad22006 "radeonsi: implement AMD_performance_monitor for CIK+"
---
src/gallium/drivers/radeonsi/si_perfcounter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c
index 41dd52edb1..85b6e5c55a 100644
--- a/src/gallium/drivers/radeonsi/si_perfcounter.c
+++ b/src/gallium/drivers/radeonsi/si_perfcounter.c
@@ -620,7 +620,7 @@ static void si_pc_emit_read(struct r600_common_context *ctx,
reg_delta = -reg_delta;
for (idx = 0; idx < count; ++idx) {
- if (regs->counters)
+ if (regs->counters[idx])
reg = regs->counters[idx];
radeon_emit(cs, PKT3(PKT3_COPY_DATA, 4, 0));
--
2.11.0
More information about the mesa-dev
mailing list