Mesa (master): vc4: Hook up perf_debug() output to GL_ARB_debug_output as well.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 20 19:33:56 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Dec 19 21:42:36 2018 -0800

vc4: Hook up perf_debug() output to GL_ARB_debug_output as well.

This is the right channel to report these things, so that end-users don't
need to know each driver's custom debug options.

---

 src/gallium/drivers/vc4/vc4_context.h  | 2 ++
 src/gallium/drivers/vc4/vc4_resource.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index f8f47958d8..1d3179c719 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -452,6 +452,8 @@ struct vc4_depth_stencil_alpha_state {
 #define perf_debug(...) do {                            \
         if (unlikely(vc4_debug & VC4_DEBUG_PERF))       \
                 fprintf(stderr, __VA_ARGS__);           \
+        if (unlikely(vc4->debug.debug_message))         \
+                pipe_debug_message(&vc4->debug, PERF_INFO, __VA_ARGS__);    \
 } while (0)
 
 static inline struct vc4_context *
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index e82fbeaafc..a4d1b903bc 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -1013,6 +1013,7 @@ void
 vc4_update_shadow_baselevel_texture(struct pipe_context *pctx,
                                     struct pipe_sampler_view *pview)
 {
+        struct vc4_context *vc4 = vc4_context(pctx);
         struct vc4_sampler_view *view = vc4_sampler_view(pview);
         struct vc4_resource *shadow = vc4_resource(view->texture);
         struct vc4_resource *orig = vc4_resource(pview->texture);




More information about the mesa-commit mailing list