glx/drisw: Implement WaitX and WaitGL

My goodness.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9696>
This commit is contained in:
Adam Jackson 2021-03-18 13:50:02 -04:00 committed by Marge Bot
parent 63bed3d55b
commit 9064d801a9
1 changed files with 14 additions and 2 deletions

View File

@ -411,6 +411,18 @@ drisw_unbind_context(struct glx_context *context, struct glx_context *new)
(*psc->core->unbindContext) (pcp->driContext);
}
static void
drisw_wait_gl(struct glx_context *context)
{
glFinish();
}
static void
drisw_wait_x(struct glx_context *context)
{
XSync(context->currentDpy, False);
}
static void
drisw_bind_tex_image(Display * dpy,
GLXDrawable drawable,
@ -474,8 +486,8 @@ static const struct glx_context_vtable drisw_context_vtable = {
.destroy = drisw_destroy_context,
.bind = drisw_bind_context,
.unbind = drisw_unbind_context,
.wait_gl = NULL,
.wait_x = NULL,
.wait_gl = drisw_wait_gl,
.wait_x = drisw_wait_x,
.bind_tex_image = drisw_bind_tex_image,
.release_tex_image = drisw_release_tex_image,
};