egl: Print GLES version

It might come in handy to know whether 2.0 or e.g. 3.2 is used.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # Thinkpad X1 Carbon G13 IPU7 ov08x40
Tested-by: Milan Zamazal <mzamazal@redhat.com> # TI AM69
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Robert Mader
2026-01-12 11:37:40 +01:00
committed by Kieran Bingham
parent 07335cbeb1
commit 6725ea8edd
2 changed files with 9 additions and 0 deletions

View File

@@ -136,5 +136,6 @@ private:
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES;
PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
PFNGLGETSTRINGPROC glGetString;
};
} //namespace libcamera

View File

@@ -325,6 +325,12 @@ int eGL::initEGLContext(GBM *gbmContext)
goto fail;
}
glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString");
if (!glGetString) {
LOG(eGL, Error) << "glGetString not found";
goto fail;
}
if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) {
LOG(eGL, Error) << "eglChooseConfig fail";
goto fail;
@@ -340,6 +346,8 @@ int eGL::initEGLContext(GBM *gbmContext)
makeCurrent();
LOG(eGL, Info) << "EGL: GL_VERSION: " << glGetString(GL_VERSION);
return 0;
fail: