Mesa (main): freedreno: Get shader variant msgs in perf debug output
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 15:29:13 UTC 2021
Module: Mesa
Branch: main
Commit: 383df5998711abb29149bfd04b26f8917c90926a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=383df5998711abb29149bfd04b26f8917c90926a
Author: Rob Clark <robdclark at chromium.org>
Date: Sat Oct 2 11:55:10 2021 -0700
freedreno: Get shader variant msgs in perf debug output
We want FD_MESA_DEBUG=perf to also tell us about variants.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
---
src/gallium/drivers/freedreno/freedreno_util.h | 12 +++++++++---
src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index c989262cc74..5e0065717e4 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -114,13 +114,19 @@ extern bool fd_binning_enabled;
##__VA_ARGS__); \
} while (0)
-#define perf_debug_ctx(ctx, ...) \
+#define perf_debug_message(debug, type, ...) \
do { \
if (FD_DBG(PERF)) \
mesa_logw(__VA_ARGS__); \
+ struct pipe_debug_callback *__d = (debug); \
+ if (__d) \
+ pipe_debug_message(__d, type, __VA_ARGS__); \
+ } while (0)
+
+#define perf_debug_ctx(ctx, ...) \
+ do { \
struct fd_context *__c = (ctx); \
- if (__c) \
- pipe_debug_message(&__c->debug, PERF_INFO, __VA_ARGS__); \
+ perf_debug_message(__c ? &__c->debug : NULL, PERF_INFO, __VA_ARGS__); \
} while (0)
#define perf_debug(...) perf_debug_ctx(NULL, __VA_ARGS__)
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
index 947bef3a505..701fc474fbf 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
@@ -133,7 +133,7 @@ ir3_shader_variant(struct ir3_shader *shader, struct ir3_shader_key key,
if (created) {
if (shader->initial_variants_done) {
- pipe_debug_message(debug, SHADER_INFO,
+ perf_debug_message(debug, SHADER_INFO,
"%s shader: recompiling at draw time: global "
"0x%08x, vfsamples %x/%x, astc %x/%x\n",
ir3_shader_stage(v), key.global, key.vsamples,
More information about the mesa-commit
mailing list