gallium/u_threaded: implement pipe_context::set_log_context
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 22 Oct 2017 15:38:52 +0000 (17:38 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 9 Nov 2017 13:00:49 +0000 (14:00 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_threaded_context.c

index 090e7642c177b8afa5897f5eb5b087aa1c57bf17..7db9005452f951d7f0308c18589e8781f9576d2f 100644 (file)
@@ -1804,6 +1804,16 @@ tc_set_debug_callback(struct pipe_context *_pipe,
    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)
@@ -2584,6 +2594,7 @@ threaded_context_create(struct pipe_context *pipe,
    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);