Mesa (master): iris: Make shader_perf_log print to stderr if INTEL_DEBUG=perf is set
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 16 06:33:24 UTC 2019
Module: Mesa
Branch: master
Commit: 024a57d23c87b6c55f71e092f60c83a58fcce2e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=024a57d23c87b6c55f71e092f60c83a58fcce2e5
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Apr 15 22:34:15 2019 -0700
iris: Make shader_perf_log print to stderr if INTEL_DEBUG=perf is set
This matches i965's behavior, and makes sure that shader compiler
messages are visible when setting INTEL_DEBUG=perf.
---
src/gallium/drivers/iris/iris_screen.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 5333a2a303c..02322436773 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -532,12 +532,19 @@ iris_shader_perf_log(void *data, const char *fmt, ...)
struct pipe_debug_callback *dbg = data;
unsigned id = 0;
va_list args;
+ va_start(args, fmt);
- if (!dbg->debug_message)
- return;
+ if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
+ va_list args_copy;
+ va_copy(args_copy, args);
+ vfprintf(stderr, fmt, args_copy);
+ va_end(args_copy);
+ }
+
+ if (dbg->debug_message) {
+ dbg->debug_message(dbg->data, &id, PIPE_DEBUG_TYPE_PERF_INFO, fmt, args);
+ }
- va_start(args, fmt);
- dbg->debug_message(dbg->data, &id, PIPE_DEBUG_TYPE_PERF_INFO, fmt, args);
va_end(args);
}
More information about the mesa-commit
mailing list