xwayland: add support for use core profile for glamor. (v2)
This adds support to Xwayland to try and use OpenGL core profile for glamor first. v1.1: use version defines. v2: let glamor work out core profile itself. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
79c3925532
commit
6978c8ee66
|
@ -270,6 +270,15 @@ xwl_drm_init_egl(struct xwl_screen *xwl_screen)
|
||||||
{
|
{
|
||||||
EGLint major, minor;
|
EGLint major, minor;
|
||||||
const char *version;
|
const char *version;
|
||||||
|
static const EGLint config_attribs_core[] = {
|
||||||
|
EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
|
||||||
|
EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
|
||||||
|
EGL_CONTEXT_MAJOR_VERSION_KHR,
|
||||||
|
GLAMOR_GL_CORE_VER_MAJOR,
|
||||||
|
EGL_CONTEXT_MINOR_VERSION_KHR,
|
||||||
|
GLAMOR_GL_CORE_VER_MINOR,
|
||||||
|
EGL_NONE
|
||||||
|
};
|
||||||
|
|
||||||
if (xwl_screen->egl_display)
|
if (xwl_screen->egl_display)
|
||||||
return;
|
return;
|
||||||
|
@ -298,7 +307,11 @@ xwl_drm_init_egl(struct xwl_screen *xwl_screen)
|
||||||
ErrorF("glamor: EGL version %s:\n", version);
|
ErrorF("glamor: EGL version %s:\n", version);
|
||||||
|
|
||||||
xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display,
|
xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display,
|
||||||
NULL, EGL_NO_CONTEXT, NULL);
|
NULL, EGL_NO_CONTEXT, config_attribs_core);
|
||||||
|
if (!xwl_screen->egl_context)
|
||||||
|
xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display,
|
||||||
|
NULL, EGL_NO_CONTEXT, NULL);
|
||||||
|
|
||||||
if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
|
if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
|
||||||
ErrorF("Failed to create EGL context\n");
|
ErrorF("Failed to create EGL context\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue