From d93f7b274b1ecc6e62e69d2be08cf48a34e5a65f Mon Sep 17 00:00:00 2001 From: Andrii Chepurnyi Date: Wed, 15 Mar 2023 11:22:07 +0200 Subject: Request correct rendering type for EGL config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to [1] : section 3.4 : ... Creation of a client API context based on an EGLConfig will fail unless the EGLConfig’s EGL_RENDERABLE_TYPE attribute include the bit corresponding to that API and version. ... section 3.7.1.6: ... An EGL_BAD_MATCH error is generated if config does not support the requested client API. This includes requesting creation of an OpenGL ES 1.x, 2.0, or 3.0 context when the EGL_RENDERABLE_TYPE attribute of config does not contain EGL_OPENGL_ES_BIT, EGL_OPENGL_ES2_BIT, or EGL_- OPENGL_ES3_BIT respectively. ... Bootanimation uses EGL_CONTEXT_CLIENT_VERSION 2 for context creation, so appropriate EGL_RENDERABLE_TYPE should be requested during eglChooseConfig. 1. https://registry.khronos.org/EGL/specs/eglspec.1.5.pdf Change-Id: I5ebc18d8ace84197d069049decadb402576546b5 Signed-off-by: Andrii Chepurnyi --- cmds/bootanimation/BootAnimation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 1efdf7759f32..6b6bc9728b7f 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -460,6 +460,7 @@ public: EGLConfig BootAnimation::getEglConfig(const EGLDisplay& display) { const EGLint attribs[] = { + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, -- cgit v1.2.3-59-g8ed1b