From patchwork Mon Jan 12 10:37:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 25716 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8997BBE08B for ; Mon, 12 Jan 2026 10:38:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3E39961F9F; Mon, 12 Jan 2026 11:38:15 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="bnDdxcYE"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4605661FB9 for ; Mon, 12 Jan 2026 11:38:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1768214289; cv=none; d=zohomail.com; s=zohoarc; b=YmOUmBlGGquCYLpFlggSFVzI3tJxfLcmse7Mwr3DwU9/tp9WfF1MBmggID/RnfxMb+7tvWre82jHTFgI+90SNN8krTh4g2EdIEFrs2L8ldsjJ9vWeKRE99ToN6N4YLyqiJK+O68PHZud3wqjZlmbfnKtqWeP1XglW/7d10UIETU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768214289; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=BwS+eZTULx2YfKTG/rTEgrLDyh8KbB652xIKkKPgweE=; b=VMMsP/ZoGO3JlFaafG9bJprJQRvYs2iTrXdDLWxFPzoMp7aEFljsybDe7n29uIZnocQXHris0bpGGdg1mNH5izCkmWVAByWYzCl1/PiGIjStJl9u2XrM4cUMX+Almsn7VFlYMd50664sgZmMbtH4EMNDBDm3HcQ+i30iTr/3dN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1768214289; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=BwS+eZTULx2YfKTG/rTEgrLDyh8KbB652xIKkKPgweE=; b=bnDdxcYEag1r0S3ka9UVWtpcKRVsJkB5FS6ktm43EXEks/ZHeiFskFq4Nrq94JsK SJ+VmSKcDdrRlFx2aN3McW2j0ba/kHNir7qhEs+lNTpuVACKFiZEGYqSrRBhWPIlY4W sd0LF6aKyURkov4thQ3D3eKwjqOWERDlWZ3HaoV4= Received: by mx.zohomail.com with SMTPS id 1768214288630581.9036033215984; Mon, 12 Jan 2026 02:38:08 -0800 (PST) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader , Hans de Goede , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v2 1/4] egl: Remove unused functions Date: Mon, 12 Jan 2026 11:37:37 +0100 Message-ID: <20260112103740.18360-2-robert.mader@collabora.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112103740.18360-1-robert.mader@collabora.com> References: <20260112103740.18360-1-robert.mader@collabora.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" They are left-overs from older iterations of the GPU-ISP. Signed-off-by: Robert Mader Reviewed-by: Hans de Goede Reviewed-by: Barnabás Pőcze Reviewed-by: Bryan O'Donoghue --- include/libcamera/internal/egl.h | 10 ---------- src/libcamera/egl.cpp | 10 ---------- src/libcamera/software_isp/debayer_egl.cpp | 2 -- 3 files changed, 22 deletions(-) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index a92921123..7b810773c 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -64,15 +64,6 @@ public: glGenFramebuffers(1, &fbo_); } - /** - * \brief Construct an eGLImage with automatic stride calculation - */ - eGLImage(uint32_t width, uint32_t height, uint32_t bpp, GLenum texture_unit, uint32_t texture_unit_uniform_id) - : eGLImage(width, height, bpp, utils::alignUp(width * bpp / 8, 256), - texture_unit, texture_unit_uniform_id) - { - } - /** * \brief Destroy the eGLImage * @@ -108,7 +99,6 @@ public: ~eGL(); int initEGLContext(GBM *gbmContext); - void cleanUp(); int createInputDMABufTexture2D(eGLImage &eglImage, int fd); int createOutputDMABufTexture2D(eGLImage &eglImage, int fd); diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp index 0544056bd..fcaf7c58f 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -349,16 +349,6 @@ fail: return -ENODEV; } -/** - * \brief Clean up EGL resources - * - * Destroys the EGL sync object. Must be called from the same thread - * that created the EGL context. - */ -void eGL::cleanUp() -{ -} - /** * \brief Make the EGL context current for the calling thread * diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 8e0890323..1c13b72a5 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -615,8 +615,6 @@ void DebayerEGL::stop() if (programId_) glDeleteProgram(programId_); - - egl_.cleanUp(); } SizeRange DebayerEGL::sizes(PixelFormat inputFormat, const Size &inputSize) From patchwork Mon Jan 12 10:37:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 25717 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 02266BE08B for ; Mon, 12 Jan 2026 10:38:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6EC861FC0; Mon, 12 Jan 2026 11:38:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="Y1kW852y"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 635A461FBE for ; Mon, 12 Jan 2026 11:38:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1768214293; cv=none; d=zohomail.com; s=zohoarc; b=Jz0rnxXFabxJsO92Hnjll6ZioteBMDfQq4Ey7oWvU3H+6ZMU3nJrjxVg08EgBSRMekt0PmWQzUsyP/VDMObuiFCs3m6wiiICXiu3igPJWUoiYCt0JmNFJbFg22BxKV2TKue04VN0c5dhTopRus68De5BwaUWdyBqHIo4jehgAek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768214293; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=j0dL+Sw7ngrHqKTsS1Igtoix9MzkwJDzje+T1BxJAmc=; b=DWsZrZrM8MCC/wy3qsuEy+z2r+Ccb5oLoxb1NdOb4rStwgQIrw8DvDhH0gG52Rh97kizCdInDXylNSDHmwa1OyldWCoJS9SVg/jfo4jaBxd7lujWvQtY2JQY44thhQm3uAOPH9d+KYG6nERqqBhZHNj9u4aBZrCm3IKaOg48NgM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1768214293; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=j0dL+Sw7ngrHqKTsS1Igtoix9MzkwJDzje+T1BxJAmc=; b=Y1kW852ytbs3Djk/T69/DuS/mja7+Iy/3YLIhtoMo+wJ2M01qN6SqfXYDnZY8ZfF Bn1j3c9IeTmVzgbTNnn8pi6y71cXG/Q9V4K9aohhjL2ZQ6gEzqOTJahSHEba8OGzqqy oMjp1Acxajxilo87vi8aER7ICF0tOHslj+Xpxcgo= Received: by mx.zohomail.com with SMTPS id 1768214291086141.38652604087088; Mon, 12 Jan 2026 02:38:11 -0800 (PST) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader , Hans de Goede Subject: [PATCH v2 2/4] egl: Remove bpp variable Date: Mon, 12 Jan 2026 11:37:38 +0100 Message-ID: <20260112103740.18360-3-robert.mader@collabora.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112103740.18360-1-robert.mader@collabora.com> References: <20260112103740.18360-1-robert.mader@collabora.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" It's unused and, in one case, was set wrongly. Signed-off-by: Robert Mader Reviewed-by: Hans de Goede Reviewed-by: Kieran Bingham Reviewed-by: Bryan O'Donoghue --- include/libcamera/internal/egl.h | 6 ++---- src/libcamera/software_isp/debayer_egl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index 7b810773c..21e2aa9df 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -49,14 +49,13 @@ public: * \brief Construct an eGLImage with explicit stride * \param[in] width Image width in pixels * \param[in] height Image height in pixels - * \param[in] bpp Bytes per pixel * \param[in] stride Row stride in bytes * \param[in] texture_unit OpenGL texture unit * \param[in] texture_unit_uniform_id Shader uniform ID */ - eGLImage(uint32_t width, uint32_t height, uint32_t bpp, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id) + eGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id) : width_(width), height_(height), stride_(stride), - framesize_(stride * height), bpp_(bpp), + framesize_(stride * height), texture_unit_uniform_id_(texture_unit_uniform_id), texture_unit_(texture_unit) { @@ -81,7 +80,6 @@ public: uint32_t stride_; /**< Row stride in bytes */ uint32_t offset_; /**< Buffer offset (reserved for future use) */ uint32_t framesize_; /**< Total frame size in bytes (stride * height) */ - uint32_t bpp_; /**< Bytes per pixel */ uint32_t texture_unit_uniform_id_; /**< Shader uniform id for texture unit */ GLenum texture_unit_; /**< Texture unit associated with this image eg (GL_TEXTURE0) */ GLuint texture_; /**< OpenGL texture object ID */ diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 1c13b72a5..9693d7252 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -597,10 +597,10 @@ int DebayerEGL::start() LOG(Debayer, Debug) << "Available fragment shader texture units " << maxTextureImageUnits; /* Raw bayer input as texture */ - eglImageBayerIn_ = std::make_unique(width_, height_, 32, inputConfig_.stride, GL_TEXTURE0, 0); + eglImageBayerIn_ = std::make_unique(width_, height_, inputConfig_.stride, GL_TEXTURE0, 0); /* Texture we will render to */ - eglImageBayerOut_ = std::make_unique(outputSize_.width, outputSize_.height, 31, outputConfig_.stride, GL_TEXTURE1, 1); + eglImageBayerOut_ = std::make_unique(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1); if (initBayerShaders(inputPixelFormat_, outputPixelFormat_)) return -EINVAL; From patchwork Mon Jan 12 10:37:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 25718 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id ACAE4C323E for ; Mon, 12 Jan 2026 10:38:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4BEE961FC4; Mon, 12 Jan 2026 11:38:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="Eprugc54"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1E7B761FBE for ; Mon, 12 Jan 2026 11:38:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1768214293; cv=none; d=zohomail.com; s=zohoarc; b=fd/Z/OEi7HzpJETXO2xo+TDzpKHceHJ5swDY7kV2dG+DMcHN65rxVHA8CD4zUO0TGlLzvcHII0fL+bjg5754t/Rh46PFizixJJ+6yn/wP3LxXhswlHs+tmJj9pTWUdyLudCBZUIJAPcWr2SGdCGH3aHvSYUV7B/IgqmkCUIdARU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768214293; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=M0yxTdv3AR3OUpRuELbtNefryxLkD/pC0IsO5BPWkLk=; b=EajBegscG+xNI2FXrkuPcbgN3Em68YCVcIbeSbMY0drJlN0sm+RupbYWZzNLfsh47nGlAf2Jk2s/c9jMPSHJqwCGgWmsrz6Iewjyh2X9OZ+DBhFJGUxKkkPpktVSNCQ9c0mxXOCRdFAv9gQlu5TsSCNEsPdAKEk+AGHCr7DVcQA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1768214293; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=M0yxTdv3AR3OUpRuELbtNefryxLkD/pC0IsO5BPWkLk=; b=Eprugc54gtkm0RUFe7IOjLIigoUJR3avwxIOkYlrkKSublo/MonjVrG+3dyjnlwk LJ/c3CrbbcdiG4e61RwK9/9Bbtz781QXQEuShOhuF+37OGYhLOKgMCkl1D3EkcssB+z l7WTNudhJ0D3mSMrRbWS+HUOBQwTAm+8+RqOMk6s= Received: by mx.zohomail.com with SMTPS id 176821429312935.5066968926659; Mon, 12 Jan 2026 02:38:13 -0800 (PST) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH v2 3/4] egl: Remove duplicated logging of EGL version Date: Mon, 12 Jan 2026 11:37:39 +0100 Message-ID: <20260112103740.18360-4-robert.mader@collabora.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112103740.18360-1-robert.mader@collabora.com> References: <20260112103740.18360-1-robert.mader@collabora.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The line below already prints it. Signed-off-by: Robert Mader Reviewed-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Kieran Bingham Reviewed-by: Bryan O'Donoghue --- src/libcamera/egl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp index fcaf7c58f..a88525279 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -285,8 +285,6 @@ int eGL::initEGLContext(GBM *gbmContext) EGLint numConfigs; EGLConfig config; - EGLint major; - EGLint minor; if (!eglBindAPI(EGL_OPENGL_ES_API)) { LOG(eGL, Error) << "API bind fail"; @@ -299,12 +297,11 @@ int eGL::initEGLContext(GBM *gbmContext) goto fail; } - if (eglInitialize(display_, &major, &minor) != EGL_TRUE) { + if (eglInitialize(display_, nullptr, nullptr) != EGL_TRUE) { LOG(eGL, Error) << "eglInitialize fail"; goto fail; } - LOG(eGL, Info) << "EGL: version " << major << "." << minor; LOG(eGL, Info) << "EGL: EGL_VERSION: " << eglQueryString(display_, EGL_VERSION); LOG(eGL, Info) << "EGL: EGL_VENDOR: " << eglQueryString(display_, EGL_VENDOR); LOG(eGL, Info) << "EGL: EGL_CLIENT_APIS: " << eglQueryString(display_, EGL_CLIENT_APIS); From patchwork Mon Jan 12 10:37:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 25719 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 73020BE08B for ; Mon, 12 Jan 2026 10:38:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2DBD661FC0; Mon, 12 Jan 2026 11:38:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="gYMKutRz"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CF5F361FCA for ; Mon, 12 Jan 2026 11:38:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1768214297; cv=none; d=zohomail.com; s=zohoarc; b=UvIdqYOYEdIJHmt7WLMUH7jJzoPLa3U8HeWBxHaWXW3yWZsPc0p8eH6I3OZTqHNFtmm+QUkfGt3YNheqELOeVPbyagk7WvQX3njh7KKiwYk34w8eTXwJvctC2YkAuYfjH3BA3vn4zhLCEXyn0ml5UkvEolxsA2N58Ff8LCEc2j8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768214297; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=dCpsgUEXD7wVNusXzpMaMXCmzNpEnVEImLYx0efJwV0=; b=Xyj6QVV5qrUdiE77kfEs9TxK+DFr+/rCWvV5OlzYqKlcR4D3v/aWCV+rR23hXxXbp6LP+YKc7ZklVUur6wguxM2ER1CAKmVJoVFV8lt+q32LwIICft4kPrsKPHau26fiNPwmyUM/jHsIRHakYKVYNe9Zby6ErRtizNULuWpQZag= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1768214297; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=dCpsgUEXD7wVNusXzpMaMXCmzNpEnVEImLYx0efJwV0=; b=gYMKutRzue0VYSsca9hvz92dEOl4qmQpzp5SQQ9nL5nJC8QaveTwGKVlRKLWvwJh yWnyauqRcw+9mSthjsnvo3JiyBRtI/2A49GLNgy+Pq5y+LRjoRrfoIHeGBn2l2Oigu9 8D6Ol99bLP7C+evMFG3Lk0O70I7EbXt+PXp6nYIA= Received: by mx.zohomail.com with SMTPS id 1768214295499680.1361726121255; Mon, 12 Jan 2026 02:38:15 -0800 (PST) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH v2 4/4] egl: Print GLES version Date: Mon, 12 Jan 2026 11:37:40 +0100 Message-ID: <20260112103740.18360-5-robert.mader@collabora.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112103740.18360-1-robert.mader@collabora.com> References: <20260112103740.18360-1-robert.mader@collabora.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" It might come in handy to know whether 2.0 or e.g. 3.2 is used. Signed-off-by: Robert Mader Reviewed-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Bryan O'Donoghue --- include/libcamera/internal/egl.h | 1 + src/libcamera/egl.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index 21e2aa9df..f007f448a 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -136,5 +136,6 @@ private: PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; + PFNGLGETSTRINGPROC glGetString; }; } //namespace libcamera diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp index a88525279..da563ee09 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -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: