diff options
Diffstat (limited to 'recipes-graphics/xorg-xserver/xserver-xorg/0001-prefer-to-use-GLES2-for-glamor-EGL-config.patch')
-rw-r--r-- | recipes-graphics/xorg-xserver/xserver-xorg/0001-prefer-to-use-GLES2-for-glamor-EGL-config.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg/0001-prefer-to-use-GLES2-for-glamor-EGL-config.patch b/recipes-graphics/xorg-xserver/xserver-xorg/0001-prefer-to-use-GLES2-for-glamor-EGL-config.patch new file mode 100644 index 00000000..6e140eaa --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xorg/0001-prefer-to-use-GLES2-for-glamor-EGL-config.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From a99ff39b3b6095a16977fbb13b2b453a7359850f Mon Sep 17 00:00:00 2001 | ||
2 | From: Xianzhong <xianzhong.li@nxp.com> | ||
3 | Date: Mon, 11 Jan 2021 11:53:29 +0800 | ||
4 | Subject: [PATCH] prefer to use GLES2 for glamor EGL config | ||
5 | |||
6 | created the initial patch for xorg/xserver 1.20.8 | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Xianzhong <xianzhong.li@nxp.com> | ||
10 | --- | ||
11 | hw/xwayland/xwayland-glamor-gbm.c | 13 ++++--------- | ||
12 | 1 file changed, 4 insertions(+), 9 deletions(-) | ||
13 | |||
14 | diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c | ||
15 | index dce782fc3..1fdf45490 100644 | ||
16 | --- a/hw/xwayland/xwayland-glamor-gbm.c | ||
17 | +++ b/hw/xwayland/xwayland-glamor-gbm.c | ||
18 | @@ -912,13 +912,8 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) | ||
19 | struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen); | ||
20 | EGLint major, minor; | ||
21 | Bool egl_initialized = FALSE; | ||
22 | - static const EGLint config_attribs_core[] = { | ||
23 | - EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, | ||
24 | - EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR, | ||
25 | - EGL_CONTEXT_MAJOR_VERSION_KHR, | ||
26 | - GLAMOR_GL_CORE_VER_MAJOR, | ||
27 | - EGL_CONTEXT_MINOR_VERSION_KHR, | ||
28 | - GLAMOR_GL_CORE_VER_MINOR, | ||
29 | + static const EGLint config_attribs_gles2[] = { | ||
30 | + EGL_CONTEXT_CLIENT_VERSION, 2, | ||
31 | EGL_NONE | ||
32 | }; | ||
33 | const GLubyte *renderer; | ||
34 | @@ -947,10 +942,10 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) | ||
35 | goto error; | ||
36 | } | ||
37 | |||
38 | - eglBindAPI(EGL_OPENGL_API); | ||
39 | + eglBindAPI(EGL_OPENGL_ES_API); | ||
40 | |||
41 | xwl_screen->egl_context = eglCreateContext( | ||
42 | - xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, config_attribs_core); | ||
43 | + xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, config_attribs_gles2); | ||
44 | if (xwl_screen->egl_context == EGL_NO_CONTEXT) { | ||
45 | xwl_screen->egl_context = eglCreateContext( | ||
46 | xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, NULL); | ||
47 | -- | ||
48 | 2.17.1 | ||
49 | |||