From patchwork Tue Jun 30 12:52:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 27142 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 A96DDC3261 for ; Tue, 30 Jun 2026 12:52:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C8F2365F74; Tue, 30 Jun 2026 14:52:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hZUw1KiO"; 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 864B965F55 for ; Tue, 30 Jun 2026 14:52:15 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 84D78104C; Tue, 30 Jun 2026 14:51:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782823891; bh=AOQBr/KZ34GGjfSrPsQbq90WoFg2rMFDpQL3TT5sYj0=; h=From:To:Cc:Subject:Date:From; b=hZUw1KiOLZ05+YaTEUHnnZmRqq+/eVvFEX7QNaXSJgfocTdh43ZdIbZtjuJbiQLih Cix63Pxthhgc92jEi8LSPESSn/U0t83+V8Q/EF+RXi/az0pgPfM5Vs3pQZb3cn8VVx LGbVQAssU6MfQD0Oz1O2luIyhZPWfrBadZwiDWmA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue Subject: [PATCH v2 0/5] libcamera: Improve shader header generation Date: Tue, 30 Jun 2026 15:52:09 +0300 Message-ID: <20260630125214.3327516-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.54.0 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" Hello, I found a cleanup branch in my tree that I had forgotten to send out. Here it is after a rebase. The goal was to use std::array in the generated shader header. This is done in patch 4/5. As a byproduct, I ended up simplifying the generation by merging the two scripts into one (2/5) and moving the build logic (1/5) and generation script (3/5) to the right location. The last patch (5/5) is an API improvement for the eGL class that results from a suggestion received in the review of v1. Laurent Pinchart (5): libcamera: shaders: Move header generation to shaders directory utils: Merge shader header generation scripts utils: Rename and move shader header generation script libcamera: shaders: Replace C array with std::array libcamera: egl: Replace pointer and length with span for shader sources include/libcamera/internal/egl.h | 9 +-- src/libcamera/egl.cpp | 29 ++++----- src/libcamera/meson.build | 10 --- src/libcamera/shaders/meson.build | 10 +++ src/libcamera/software_isp/debayer_egl.cpp | 25 +++----- utils/codegen/gen-shader-header.py | 74 ++++++++++++++++++++++ utils/codegen/meson.build | 1 + utils/gen-shader-header.py | 37 ----------- utils/gen-shader-headers.sh | 54 ---------------- utils/meson.build | 2 - 10 files changed, 109 insertions(+), 142 deletions(-) create mode 100755 utils/codegen/gen-shader-header.py delete mode 100755 utils/gen-shader-header.py delete mode 100755 utils/gen-shader-headers.sh base-commit: 7a033dbdd4ca29cca2ef7eb144f6a6f57979b70d