From patchwork Tue Aug 4 10:19:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 27605 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 8B325C3301 for ; Tue, 4 Aug 2026 10:20:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4CB4F680B3; Tue, 4 Aug 2026 12:19:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PCkJA+iD"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0DD4968083 for ; Tue, 4 Aug 2026 12:19:53 +0200 (CEST) Received: from pb-laptop.local (185.221.141.208.nat.pool.zt.hu [185.221.141.208]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 85754DA8 for ; Tue, 4 Aug 2026 12:18:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1785838723; bh=xUiaQZd5tzlL4fxEfKE3i0B6g9ntU+CSgwbX3/eG+E4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PCkJA+iDUltDUttSeFRihECa2EIvk261F0txCySx1mhCxn2oN1Hm24mYEpWOXNE9P 4OhgJvXlmeQ1IuPudOIFjUG3idtvy1RjPl5/dQVMEGdUbuTHL5XbxohYyGflfeyCaG P3BMyyfDiGuTBn2ALiDALlRrQFZY6IQL84vx1rz0= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 03/10] libcamera: egl: Do not load `glGetString` dynamically Date: Tue, 4 Aug 2026 12:19:42 +0200 Message-ID: <20260804101949.353266-4-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260804101949.353266-1-barnabas.pocze@ideasonboard.com> References: <20260804101949.353266-1-barnabas.pocze@ideasonboard.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" `glGetString()` should be available in all version of OpenGL and OpenGL ES, so there should be no need to load it with `eglGetProcAddress()` like it is done for extension functions. Signed-off-by: Barnabás Pőcze --- include/libcamera/internal/egl.h | 1 - src/libcamera/egl.cpp | 6 ------ 2 files changed, 7 deletions(-) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index f8ae486a8d..6abb02bf3b 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -142,6 +142,5 @@ private: PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; - PFNGLGETSTRINGPROC glGetString; }; } //namespace libcamera diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp index 900d2174df..0768a840e6 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -410,12 +410,6 @@ int eGL::initEGLContext() 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;