From patchwork Thu Nov 26 11:03:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Remy Alipoursafari X-Patchwork-Id: 29095 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 54829C3355 for ; Thu, 26 Nov 2026 11:05:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A73CB6AA29; Thu, 26 Nov 2026 12:05:14 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="GZiJ9b29"; dkim-atps=neutral Received: from sender6-pp-f112.zoho.com (sender6-pp-f112.zoho.com [165.173.180.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F0DCF6AA20 for ; Thu, 26 Nov 2026 12:05:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1795691106; cv=none; d=zohomail.com; s=zohoarc; b=e+OJ5OxmYIbLtyuEPVPzSz2JWWJ/+CqRU7WpgOirBxgY+TRugPtBN8dbxPsmU7ljoK7Y8f60Kk1J/1rUWCQ4Scf3GTJ98EJtkG4Di6SGvijrf2p30OMUbAnamlqSjBa7hPhalBcAVUf+bdKCQ7grSG6jhPeoJ3cfIwnoN3sj+38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795691106; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=8imxRdk6wBF0XerE/ppuDK/iM1wnP8hW/MFMu7fEt8k=; b=GgTOjD1wnkJBn9ZMXWZHx0qArX8BfZSFRnrDHvm2ILU+ciurBIlSRAoGcYMZHBGkQWoa4MTBPxS0BDXOifUeLx7kYoprYza57Sh8gOff1fgR47oIozyK5nxI/KaF/EfxmF76WKrxlkIAxnLXgQmvL84xeZI/HaGCk/vveIR0Wrw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=remy.alipoursafari@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=GZiJ9b29iB6dz0DqOw3LpWaG03CxpxGkNch3U45h6gCpMWXUNzFfXnLBoshjAWJRibSVzsGYW2YfFtKwBdrgnQm8Jz2pT8De5BeQ/MK27nY0OddYKLwOrqPZt2Bt2AH0T4zY8HkxNt66wlgaEaBiNhLqkgQStW80SqmtIXTW1DU=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=8imxRdk6wBF0XerE/ppuDK/iM1wnP8hW/MFMu7fEt8k=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1795691104061459.92536478501665; Thu, 26 Nov 2026 03:05:04 -0800 (PST) From: Remy Alipoursafari To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Lo=C3=AFc_Molinari?= , Robert Mader Subject: [PATCH 3/6] libcamera: software_isp: debayer_egl: Check GL_RG support Date: Fri, 27 Nov 2026 00:03:41 +1300 Message-ID: <20261126110422.362455-4-remy.alipoursafari@collabora.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261126110422.362455-1-remy.alipoursafari@collabora.com> References: <20261126110422.362455-1-remy.alipoursafari@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External 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" 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";