Request correct rendering type for EGL config

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 <andrii_chepurnyi@epam.com>
This commit is contained in:
Andrii Chepurnyi
2023-03-15 11:22:07 +02:00
parent 2e868b0030
commit d93f7b274b

View File

@@ -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,