vc4: Hook up perf_debug() output to GL_ARB_debug_output as well.
authorEric Anholt <eric@anholt.net>
Thu, 20 Dec 2018 05:42:36 +0000 (21:42 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 20 Dec 2018 19:31:25 +0000 (11:31 -0800)
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
src/gallium/drivers/vc4/vc4_resource.c

index f8f4795..1d3179c 100644 (file)
@@ -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 *
index e82fbea..a4d1b90 100644 (file)
@@ -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);