From patchwork Tue Jun 30 12:52:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 27143 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 A4E1AC3261 for ; Tue, 30 Jun 2026 12:52:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 50EFC65F82; Tue, 30 Jun 2026 14:52:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WAIbcj6W"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A814665F66 for ; Tue, 30 Jun 2026 14:52:16 +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 BCD17104C; Tue, 30 Jun 2026 14:51:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782823892; bh=DzvDhBfHlKd+OkJwMWghkGqkyc2Jlr4n7jaXslgePbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WAIbcj6WVgyTJ5Bz7MMNiXFh4z3klOOEKjL/hf9aioIKQqJ/g9ecteLf6/t4PZ7hd 4WhZTCIsFZuoXPi9waowC4m4MarhTMSi63h0RRtq4MUNFLxO8AGwEAqSZzrKtH9npS wuZbPceFkhYOuRC0e7y8bJtdkTQjG0nkmc03IHf4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue Subject: [PATCH v2 1/5] libcamera: shaders: Move header generation to shaders directory Date: Tue, 30 Jun 2026 15:52:10 +0300 Message-ID: <20260630125214.3327516-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260630125214.3327516-1-laurent.pinchart@ideasonboard.com> References: <20260630125214.3327516-1-laurent.pinchart@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" The src/libcamera/shaders/ directory contains all libcamera shaders for the software ISP. Move the related build logic to convert shaders to headers to the same directory to make shaders self-contained. This changes the location of the glsl_shaders.h header, update debayer_egl.cpp accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Barnabás Pőcze --- src/libcamera/meson.build | 10 ---------- src/libcamera/shaders/meson.build | 10 ++++++++++ src/libcamera/software_isp/debayer_egl.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 6aedacbdb04d..17c1b2cb3479 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -184,16 +184,6 @@ libcamera_deps += [ libyaml, ] -# Generate headers from shaders -libcamera_shader_headers = custom_target( - 'gen-shader-headers', - input : [shader_files], - output : 'glsl_shaders.h', - command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'], -) - -libcamera_internal_headers += libcamera_shader_headers - # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag. # The build_rpath is stripped at install time by meson, so we determine at # runtime if the library is running from an installed location by checking diff --git a/src/libcamera/shaders/meson.build b/src/libcamera/shaders/meson.build index dd441a577670..adac77327a3b 100644 --- a/src/libcamera/shaders/meson.build +++ b/src/libcamera/shaders/meson.build @@ -8,3 +8,13 @@ shader_files = files([ 'bayer_unpacked.vert', 'identity.vert', ]) + +# Generate headers from shaders +libcamera_shader_headers = custom_target( + 'gen-shader-headers', + input : [shader_files], + output : 'glsl_shaders.h', + command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'], +) + +libcamera_internal_headers += libcamera_shader_headers diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 0ec2a98cfafb..af9b9d426920 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -24,7 +24,7 @@ #include "libcamera/internal/formats.h" #include "libcamera/internal/framebuffer.h" -#include "../glsl_shaders.h" +#include "../shaders/glsl_shaders.h" namespace libcamera {