diff options
author | Andres Rodriguez <[email protected]> | 2017-10-26 19:16:51 -0400 |
---|---|---|
committer | Andres Rodriguez <[email protected]> | 2018-01-30 15:13:49 -0500 |
commit | fde1afc4956d273f8684de5f1d4b8a28aabeb14c (patch) | |
tree | 75e2b750512abea457f65374db1105c46056bc5e /src/gallium | |
parent | d34c2cf3e6498d3b337117180f3151c719fda5b6 (diff) |
u_threaded_context: add support for fence_server_signal v2
v2: s/semaphore/fence
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context_calls.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 3ea1797a9ef..1c647a3efd0 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -1864,6 +1864,25 @@ tc_fence_server_sync(struct pipe_context *_pipe, screen->fence_reference(screen, &payload->fence, fence); } +static void +tc_call_fence_server_signal(struct pipe_context *pipe, union tc_payload *payload) +{ + pipe->fence_server_signal(pipe, payload->fence); + pipe->screen->fence_reference(pipe->screen, &payload->fence, NULL); +} + +static void +tc_fence_server_signal(struct pipe_context *_pipe, + struct pipe_fence_handle *fence) +{ + struct threaded_context *tc = threaded_context(_pipe); + struct pipe_screen *screen = tc->pipe->screen; + union tc_payload *payload = tc_add_small_call(tc, TC_CALL_fence_server_signal); + + payload->fence = NULL; + screen->fence_reference(screen, &payload->fence, fence); +} + static struct pipe_video_codec * tc_create_video_codec(UNUSED struct pipe_context *_pipe, UNUSED const struct pipe_video_codec *templ) @@ -2662,6 +2681,7 @@ threaded_context_create(struct pipe_context *pipe, CTX_INIT(set_debug_callback); CTX_INIT(create_fence_fd); CTX_INIT(fence_server_sync); + CTX_INIT(fence_server_signal); CTX_INIT(get_timestamp); CTX_INIT(create_texture_handle); CTX_INIT(delete_texture_handle); diff --git a/src/gallium/auxiliary/util/u_threaded_context_calls.h b/src/gallium/auxiliary/util/u_threaded_context_calls.h index 675deaabd92..921b86a67f0 100644 --- a/src/gallium/auxiliary/util/u_threaded_context_calls.h +++ b/src/gallium/auxiliary/util/u_threaded_context_calls.h @@ -1,6 +1,7 @@ CALL(flush) CALL(callback) CALL(fence_server_sync) +CALL(fence_server_signal) CALL(destroy_query) CALL(begin_query) CALL(end_query) |