summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri2.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-04-01 15:47:44 -0400
committerRob Clark <[email protected]>2016-12-01 20:16:31 -0500
commit72cc1ca58d12495cc5a72fb9b9c316db94eb66cd (patch)
tree28779c57409ca615c537853c14a4d2851d8d011f /src/gallium/state_trackers/dri/dri2.c
parent0201f01dc4e903d9b60cbbf87fde3ffa7c76f248 (diff)
gallium: wire up server_wait_sync
This will be needed for explicit synchronization with devices outside the gpu, ie. EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri2.c')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 9ec069b3063..1a44bcb771e 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1548,7 +1548,11 @@ dri2_client_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags,
static void
dri2_server_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags)
{
- /* AFAIK, no driver currently supports parallel context execution. */
+ struct pipe_context *ctx = dri_context(_ctx)->st->pipe;
+ struct dri2_fence *fence = (struct dri2_fence*)_fence;
+
+ if (ctx->fence_server_sync)
+ ctx->fence_server_sync(ctx, fence->pipe_fence);
}
static __DRI2fenceExtension dri2FenceExtension = {