Module: Mesa Branch: main Commit: 0e8271b27a711b655516e192b74b1aee174913e7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e8271b27a711b655516e192b74b1aee174913e7
Author: Jesse Natalie <[email protected]> Date: Mon Sep 20 09:49:48 2021 -0700 egl/wgl: Support eglWaitClient Acked-by: Daniel Stone <[email protected]> Acked-by: Mike Blumenkrantz <[email protected]> Acked-by: Sidney Just <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Tested-by: Yonggang Luo <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964> --- src/egl/drivers/wgl/egl_wgl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index 3e65308492e..f9164b2c5c9 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -822,6 +822,15 @@ wgl_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw) return ret; } +static EGLBoolean +wgl_wait_client(_EGLDisplay *disp, _EGLContext *ctx) +{ + struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx); + struct pipe_fence_handle *fence = NULL; + wgl_ctx->ctx->st->flush(wgl_ctx->ctx->st, ST_FLUSH_END_OF_FRAME | ST_FLUSH_WAIT, &fence, NULL, NULL); + return EGL_TRUE; +} + struct _egl_driver _eglDriver = { .Initialize = wgl_initialize, .Terminate = wgl_terminate, @@ -837,5 +846,6 @@ struct _egl_driver _eglDriver = { .GetProcAddress = _glapi_get_proc_address, .SwapInterval = wgl_swap_interval, .SwapBuffers = wgl_swap_buffers, + .WaitClient = wgl_wait_client, };
