Mesa (master): gallium/u_threaded: use mesa_log for debug msgs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 11 05:04:26 UTC 2021


Module: Mesa
Branch: master
Commit: 9425b1343ebb03431dd0aecf1e4f19ab5126b7f8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9425b1343ebb03431dd0aecf1e4f19ab5126b7f8

Author: Rob Clark <robdclark at chromium.org>
Date:   Fri Feb 19 11:31:54 2021 -0800

gallium/u_threaded: use mesa_log for debug msgs

On android, this will show up in logcat, rather than being lost into the
ether.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323>

---

 src/gallium/auxiliary/util/u_threaded_context.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index 02a35e07dc7..148f3a16ae2 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -30,6 +30,7 @@
 #include "util/u_inlines.h"
 #include "util/u_memory.h"
 #include "util/u_upload_mgr.h"
+#include "util/log.h"
 #include "compiler/shader_info.h"
 
 /* 0 = disabled, 1 = assertions, 2 = printfs */
@@ -42,7 +43,7 @@
 #endif
 
 #if TC_DEBUG >= 2
-#define tc_printf printf
+#define tc_printf mesa_logi
 #define tc_asprintf asprintf
 #define tc_strcmp strcmp
 #else
@@ -348,7 +349,7 @@ _tc_sync(struct threaded_context *tc, UNUSED const char *info, UNUSED const char
       p_atomic_inc(&tc->num_syncs);
 
       if (tc_strcmp(func, "tc_destroy") != 0) {
-         tc_printf("sync %s %s\n", func, info);
+         tc_printf("sync %s %s", func, info);
 	  }
    }
 



More information about the mesa-commit mailing list