[Mesa-dev] [PATCH v2 12/26] gallium/u_threaded: implement pipe_context::set_log_context

Nicolai Hähnle nhaehnle at gmail.com
Mon Nov 6 10:23:43 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 src/gallium/auxiliary/util/u_threaded_context.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index 4908ea8a7ba..1f8a9d5088b 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -1779,20 +1779,30 @@ tc_set_debug_callback(struct pipe_context *_pipe,
     * the threaded context.
     */
    if (cb && cb->debug_message && !cb->async)
       return;
 
    tc_sync(tc);
    pipe->set_debug_callback(pipe, cb);
 }
 
 static void
+tc_set_log_context(struct pipe_context *_pipe, struct u_log_context *log)
+{
+   struct threaded_context *tc = threaded_context(_pipe);
+   struct pipe_context *pipe = tc->pipe;
+
+   tc_sync(tc);
+   pipe->set_log_context(pipe, log);
+}
+
+static void
 tc_create_fence_fd(struct pipe_context *_pipe,
                    struct pipe_fence_handle **fence, int fd)
 {
    struct threaded_context *tc = threaded_context(_pipe);
    struct pipe_context *pipe = tc->pipe;
 
    tc_sync(tc);
    pipe->create_fence_fd(pipe, fence, fd);
 }
 
@@ -2558,20 +2568,21 @@ threaded_context_create(struct pipe_context *pipe,
    CTX_INIT(resource_commit);
    CTX_INIT(create_video_codec);
    CTX_INIT(create_video_buffer);
    CTX_INIT(set_compute_resources);
    CTX_INIT(set_global_binding);
    CTX_INIT(get_sample_position);
    CTX_INIT(invalidate_resource);
    CTX_INIT(get_device_reset_status);
    CTX_INIT(set_device_reset_callback);
    CTX_INIT(dump_debug_state);
+   CTX_INIT(set_log_context);
    CTX_INIT(emit_string_marker);
    CTX_INIT(set_debug_callback);
    CTX_INIT(create_fence_fd);
    CTX_INIT(fence_server_sync);
    CTX_INIT(get_timestamp);
    CTX_INIT(create_texture_handle);
    CTX_INIT(delete_texture_handle);
    CTX_INIT(make_texture_handle_resident);
    CTX_INIT(create_image_handle);
    CTX_INIT(delete_image_handle);
-- 
2.11.0



More information about the mesa-dev mailing list