mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
glamor: Put in a pluggable context switcher for GLX versus EGL.
The GLX side just gets the context from the current state. That's also something I want to do for EGL, so that the making a context is separate from initializing glamor, but I think I need the modesetting driver in the server before I think about hacking on that more. The previous code was rather incestuous, along with pulling in xf86 dependencies to our dix code. The new code just initializes itself from the current state. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
781c692cf9
commit
4afe15d8bf
9 changed files with 189 additions and 60 deletions
|
|
@ -340,8 +340,12 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
|||
#endif
|
||||
/* If we are using egl screen, call egl screen init to
|
||||
* register correct close screen function. */
|
||||
if (flags & GLAMOR_USE_EGL_SCREEN)
|
||||
glamor_egl_screen_init(screen);
|
||||
if (flags & GLAMOR_USE_EGL_SCREEN) {
|
||||
glamor_egl_screen_init(screen, &glamor_priv->ctx);
|
||||
} else {
|
||||
if (!glamor_glx_screen_init(&glamor_priv->ctx))
|
||||
goto fail;
|
||||
}
|
||||
|
||||
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
|
||||
screen->CloseScreen = glamor_close_screen;
|
||||
|
|
|
|||
Loading…
Reference in a new issue