Mesa (master): v3d: 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: ba36312fbd079658edc86015852f519c8290a09a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba36312fbd079658edc86015852f519c8290a09a

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

v3d: 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/v3d/v3d_context.h  | 2 ++
 src/gallium/drivers/v3d/v3d_resource.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h
index 7f03836d9c..9f52342d2d 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -465,6 +465,8 @@ struct v3d_blend_state {
 #define perf_debug(...) do {                            \
         if (unlikely(V3D_DEBUG & V3D_DEBUG_PERF))       \
                 fprintf(stderr, __VA_ARGS__);           \
+        if (unlikely(v3d->debug.debug_message))         \
+                pipe_debug_message(&v3d->debug, PERF_INFO, __VA_ARGS__);    \
 } while (0)
 
 #define foreach_bit(b, mask)                                            \
diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c
index 45214b01b2..fba1661cd3 100644
--- a/src/gallium/drivers/v3d/v3d_resource.c
+++ b/src/gallium/drivers/v3d/v3d_resource.c
@@ -894,6 +894,7 @@ void
 v3d_update_shadow_texture(struct pipe_context *pctx,
                           struct pipe_sampler_view *pview)
 {
+        struct v3d_context *v3d = v3d_context(pctx);
         struct v3d_sampler_view *view = v3d_sampler_view(pview);
         struct v3d_resource *shadow = v3d_resource(view->texture);
         struct v3d_resource *orig = v3d_resource(pview->texture);




More information about the mesa-commit mailing list