diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-18 11:09:13 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:39 +0200 |
commit | c6f81a1df833c2adf1cec735a197fe54d21d435a (patch) | |
tree | d8885771c356ca4dfd1a007176f4171e67014c31 /src/mesa/main/syncobj.c | |
parent | 2a4d5dce74ab7138a8e124a28a9eac69a9d96e5d (diff) |
mesa: add wait_sync() helper
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r-- | src/mesa/main/syncobj.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index cb6f8868bd2..915b7009f78 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -381,6 +381,15 @@ _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) } +static void +wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, + GLbitfield flags, GLuint64 timeout) +{ + ctx->Driver.ServerWaitSync(ctx, syncObj, flags, timeout); + _mesa_unref_sync_object(ctx, syncObj, 1); +} + + void GLAPIENTRY _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { @@ -404,8 +413,7 @@ _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) return; } - ctx->Driver.ServerWaitSync(ctx, syncObj, flags, timeout); - _mesa_unref_sync_object(ctx, syncObj, 1); + wait_sync(ctx, syncObj, flags, timeout); } |