aux/trace: add pipe_context::set_debug_callback hook
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 6 May 2021 20:04:00 +0000 (16:04 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sat, 22 May 2021 12:37:57 +0000 (12:37 +0000)
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10899>

src/gallium/auxiliary/driver_trace/tr_context.c

index 5ef823b..2bdf9a2 100644 (file)
@@ -1787,6 +1787,21 @@ trace_context_set_context_param(struct pipe_context *_context,
 }
 
 static void
+trace_context_set_debug_callback(struct pipe_context *_context, const struct pipe_debug_callback *cb)
+{
+   struct trace_context *tr_context = trace_context(_context);
+   struct pipe_context *context = tr_context->pipe;
+
+   trace_dump_call_begin("pipe_context", "set_debug_callback");
+
+   trace_dump_arg(ptr, context);
+
+   trace_dump_call_end();
+
+   context->set_debug_callback(context, cb);
+}
+
+static void
 trace_context_render_condition(struct pipe_context *_context,
                                struct pipe_query *query,
                                bool condition,
@@ -2173,6 +2188,7 @@ trace_context_create(struct trace_screen *tr_scr,
    TR_CTX_INIT(texture_subdata);
    TR_CTX_INIT(invalidate_resource);
    TR_CTX_INIT(set_context_param);
+   TR_CTX_INIT(set_debug_callback);
 
 #undef TR_CTX_INIT