glx: Store the context vtable on the glx screen

Again this is rewriting part of driX_create_context_attribs to be
caller-agnostic, so that we can eventually unify it among the DRI
backends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456>
This commit is contained in:
Adam Jackson
2021-08-06 17:53:38 -04:00
committed by Marge Bot
parent 145992890c
commit bfad9e75c0
4 changed files with 7 additions and 3 deletions

View File

@@ -287,7 +287,7 @@ dri2_create_context_attribs(struct glx_screen *base,
if (pcp->driContext == NULL)
goto error_exit;
pcp->base.vtable = &dri2_context_vtable;
pcp->base.vtable = base->context_vtable;
return &pcp->base;
@@ -1275,6 +1275,7 @@ dri2CreateScreen(int screen, struct glx_display * priv)
psc->driver_configs = driver_configs;
psc->base.vtable = &dri2_screen_vtable;
psc->base.context_vtable = &dri2_context_vtable;
psp = &psc->vtable;
psc->base.driScreen = psp;
psp->destroyScreen = dri2DestroyScreen;