mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
egl: specify client API by bit flag, not string
This commit is contained in:
parent
d5078b9432
commit
ba7aeb8b34
1 changed files with 8 additions and 2 deletions
|
|
@ -302,6 +302,12 @@ xlib_eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
|
|||
return EGL_NO_CONTEXT;
|
||||
}
|
||||
|
||||
if (ctx->Base.ClientAPI != EGL_OPENGL_API) {
|
||||
_eglError(EGL_BAD_MATCH, "eglCreateContext(only OpenGL API supported)");
|
||||
free(ctx);
|
||||
return EGL_NO_CONTEXT;
|
||||
}
|
||||
|
||||
/* create a softpipe context */
|
||||
ctx->pipe = softpipe_create(xdrv->screen, xdrv->winsys, NULL);
|
||||
|
||||
|
|
@ -309,6 +315,7 @@ xlib_eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
|
|||
_eglConfigToContextModesRec(conf, &visual);
|
||||
ctx->Context = st_create_context(ctx->pipe, &visual, share_ctx);
|
||||
|
||||
_eglSaveContext(&ctx->Base);
|
||||
|
||||
return _eglGetContextHandle(&ctx->Base);
|
||||
}
|
||||
|
|
@ -525,8 +532,8 @@ _eglMain(_EGLDisplay *dpy, const char *args)
|
|||
xdrv->Base.API.MakeCurrent = xlib_eglMakeCurrent;
|
||||
xdrv->Base.API.SwapBuffers = xlib_eglSwapBuffers;
|
||||
|
||||
xdrv->Base.ClientAPIsMask = EGL_OPENGL_BIT /*| EGL_OPENGL_ES_BIT*/;
|
||||
|
||||
xdrv->Base.ClientAPIs = "OpenGL"; /* "OpenGL_ES" */
|
||||
xdrv->Base.Name = "Xlib/softpipe";
|
||||
|
||||
/* create one winsys and use it for all contexts/surfaces */
|
||||
|
|
@ -535,7 +542,6 @@ _eglMain(_EGLDisplay *dpy, const char *args)
|
|||
|
||||
xdrv->screen = softpipe_create_screen(xdrv->winsys);
|
||||
|
||||
|
||||
return &xdrv->Base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue