From patchwork Fri Dec 4 03:18:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Remy Alipoursafari X-Patchwork-Id: 29160 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 145E1C3300 for ; Fri, 4 Dec 2026 03:20:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D1A2D6AB64; Fri, 4 Dec 2026 04:20:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=coolgi.dev header.i=@coolgi.dev header.b="Du/nC4J7"; dkim=pass (2048-bit key; unprotected) header.d=coolgi.dev header.i=@coolgi.dev header.b="cj6097a/"; dkim-atps=neutral Received: from mail.coolgi.dev (mail.coolgi.dev [IPv6:2a02:c206:2202:9155::1]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 340106AB67 for ; Fri, 4 Dec 2026 04:20:12 +0100 (CET) From: Remy Alipoursafari DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coolgi.dev; s=rsa-2026-08; t=1796354410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=05fYRXbiz7oC20ug+CS8q4W7WZm8RZx7Mxo7KF1EjKs=; b=Du/nC4J7xXQO1KgFbd9cmvKSUR3Ade9+6ZYCYIesyqIIZMDeYpEVpdckZTTEmRpFDKjq0h NIl0REzYJjvdF0S8gtFunaKjuJ+d15A3VW1HwL9YYzAGEXfkCNrTXa/OFjvUBvgLF3JtRQ c7hcWF932uxuM+PjlYdgsbO0BrBtaxGUUQZLXe/LW89pV5k7vJZr9OiJ4Ru8PlWLsWQoxV /9bRyCMNVskoH8Bt0GH/FOOqd/9z5HZbmyNAVarTRf52Gr2sEGNkwxHWtFnI96MbNVcc2p GecY0zp50L9Zm0tZ6r04P5d6pTCvMZwOpAzhBynJN+ud2+NNgRxhBuQg59CGOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coolgi.dev; s=rsa-2026-11; t=1796354410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=05fYRXbiz7oC20ug+CS8q4W7WZm8RZx7Mxo7KF1EjKs=; b=cj6097a/lEDJie13NY1oZuaIuF9zbuXng6PS3rNslOvjmnwQy7OQkCa7AXsq4Cnu4xcWfl Nv8Bgl89IVFmN/6HSrUZBZxICfY/DWinyv8v3aLvR7blDCxT8IU+HKKH7Fy6BlVbkTAyPs /w2QbWtLKDFK67hXD1UdkjAxn6POSd7nrEN6pJs92UC9ybvlSxIYflLtHC1iaI3THMkNpE AQ2oXbtgbAkYmr7ETp75QFT2yI+wcblR+SjKtld33yjCOPUbwhESFv7b7VNYlktjrNqtVR 9z6+CNz0OnkVkXwagGA5pZ8gJqhlqqOddVW2BOE1+ul4+WAkV8SM5Vj6grZ7wA== To: libcamera-devel@lists.libcamera.org Cc: Remy Alipoursafari , =?utf-8?q?Lo?= =?utf-8?q?=C3=AFc_Molinari?= , Robert Mader Subject: [PATCH v2 3/6] libcamera: software_isp: debayer_egl: Check GL_RG support Date: Fri, 4 Dec 2026 16:18:55 +1300 Message-ID: <20261204031914.117401-4-me@coolgi.dev> In-Reply-To: <20261204031914.117401-1-me@coolgi.dev> References: <20261204031914.117401-1-me@coolgi.dev> 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 From: Loïc Molinari Unpacked 10 and 12-bit raw input formats require either OpenGL ES 3.0 or the GL_EXT_texture_rg extension. Signed-off-by: Loïc Molinari Reviewed-by: Robert Mader --- src/libcamera/software_isp/debayer_egl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 33933b11..d94a06d1 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -244,6 +244,13 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm break; }; + /* GL_RG textures need GL_EXT_texture_rg before ES 3.0 */ + if (glFormat_ == GL_RG && !egl_.hasGLESVersion(3, 0) && + !egl_.hasGLESExtension("GL_EXT_texture_rg")) { + LOG(Debayer, Error) << "GL_EXT_texture_rg not supported for unpacked input format"; + return -EINVAL; + } + if (egl_.compileVertexShader(vertexShaderId_, vertexShaderData, shaderEnv)) { LOG(Debayer, Error) << "Compile vertex shader fail";