gallium: add pipe_context::set_log_context
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 4 Aug 2017 13:54:41 +0000 (15:54 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 22 Aug 2017 07:50:42 +0000 (09:50 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/include/pipe/p_context.h

index c2b1ad2..4609d4d 100644 (file)
@@ -75,6 +75,7 @@ struct pipe_viewport_state;
 struct pipe_compute_state;
 union pipe_color_union;
 union pipe_query_result;
+struct u_log_context;
 struct u_upload_mgr;
 
 /**
@@ -749,6 +750,19 @@ struct pipe_context {
                             unsigned flags);
 
    /**
+    * Set the log context to which the driver should write internal debug logs
+    * (internal states, command streams).
+    *
+    * The caller must ensure that the log context is destroyed and reset to
+    * NULL before the pipe context is destroyed, and that log context functions
+    * are only called from the driver thread.
+    *
+    * \param ctx pipe context
+    * \param log logging context
+    */
+   void (*set_log_context)(struct pipe_context *ctx, struct u_log_context *log);
+
+   /**
     * Emit string marker in cmdstream
     */
    void (*emit_string_marker)(struct pipe_context *ctx,