[Mesa-dev] [PATCH 06/17] u_threaded_context: add support for semaphore wait/signal
Andres Rodriguez
andresx7 at gmail.com
Thu Nov 2 03:57:09 UTC 2017
Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
---
src/gallium/auxiliary/util/u_threaded_context.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index 7e28b87..272d846 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -1636,6 +1636,29 @@ tc_texture_subdata(struct pipe_context *_pipe,
}
}
+/********************************************************************
+ * Semaphores
+ */
+
+static void
+tc_semobj_wait(struct pipe_context *_pipe,
+ struct pipe_semaphore_object *semobj)
+{
+ struct threaded_context *tc = threaded_context(_pipe);
+ struct pipe_context *pipe = tc->pipe;
+
+ pipe->semobj_wait(pipe, semobj);
+}
+
+static void
+tc_semobj_signal(struct pipe_context *_pipe,
+ struct pipe_semaphore_object *semobj)
+{
+ struct threaded_context *tc = threaded_context(_pipe);
+ struct pipe_context *pipe = tc->pipe;
+
+ pipe->semobj_signal(pipe, semobj);
+}
/********************************************************************
* miscellaneous
@@ -2451,6 +2474,8 @@ threaded_context_create(struct pipe_context *pipe,
CTX_INIT(create_image_handle);
CTX_INIT(delete_image_handle);
CTX_INIT(make_image_handle_resident);
+ CTX_INIT(semobj_wait);
+ CTX_INIT(semobj_signal);
#undef CTX_INIT
if (out)
--
2.9.3
More information about the mesa-dev
mailing list