[{"id":39511,"web_url":"https://patchwork.libcamera.org/comment/39511/","msgid":"<85qzlo1gzw.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-06-30T10:04:35","subject":"Re: [PATCH 1/4] libcamera: shaders: Move header generation to\n\tshaders directory","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Laurent,\n\nthank you for the cleanup.\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> The src/libcamera/shaders/ directory contains all libcamera shaders for\n> the software ISP. Move the related build logic to convert shaders to\n> headers to the same directory to make shaders self-contained.\n>\n> This changes the location of the glsl_shaders.h header, update\n> debayer_egl.cpp accordingly.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  src/libcamera/meson.build                  | 10 ----------\n>  src/libcamera/shaders/meson.build          | 10 ++++++++++\n>  src/libcamera/software_isp/debayer_egl.cpp |  2 +-\n>  3 files changed, 11 insertions(+), 11 deletions(-)\n>\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 6aedacbdb04d..17c1b2cb3479 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -184,16 +184,6 @@ libcamera_deps += [\n>      libyaml,\n>  ]\n>  \n> -# Generate headers from shaders\n> -libcamera_shader_headers = custom_target(\n> -    'gen-shader-headers',\n> -    input : [shader_files],\n> -    output : 'glsl_shaders.h',\n> -    command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'],\n> -)\n> -\n> -libcamera_internal_headers += libcamera_shader_headers\n> -\n>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n>  # The build_rpath is stripped at install time by meson, so we determine at\n>  # runtime if the library is running from an installed location by checking\n> diff --git a/src/libcamera/shaders/meson.build b/src/libcamera/shaders/meson.build\n> index dd441a577670..adac77327a3b 100644\n> --- a/src/libcamera/shaders/meson.build\n> +++ b/src/libcamera/shaders/meson.build\n> @@ -8,3 +8,13 @@ shader_files = files([\n>      'bayer_unpacked.vert',\n>      'identity.vert',\n>  ])\n> +\n> +# Generate headers from shaders\n> +libcamera_shader_headers = custom_target(\n> +    'gen-shader-headers',\n> +    input : [shader_files],\n> +    output : 'glsl_shaders.h',\n> +    command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'],\n> +)\n> +\n> +libcamera_internal_headers += libcamera_shader_headers\n> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n> index 0ec2a98cfafb..af9b9d426920 100644\n> --- a/src/libcamera/software_isp/debayer_egl.cpp\n> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n> @@ -24,7 +24,7 @@\n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/framebuffer.h\"\n>  \n> -#include \"../glsl_shaders.h\"\n> +#include \"../shaders/glsl_shaders.h\"\n>  \n>  namespace libcamera {","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BC31CC3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Jun 2026 10:04:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F37C665F46;\n\tTue, 30 Jun 2026 12:04:44 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9BE0F656D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Jun 2026 12:04:43 +0200 (CEST)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-653-dDfAyS1TM06JikSwtlgZWw-1; Tue, 30 Jun 2026 06:04:40 -0400","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-4926596eebcso28653515e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Jun 2026 03:04:40 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47563d19ba6sm5790498f8f.6.2026.06.30.03.04.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 30 Jun 2026 03:04:38 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"GQ2B/shF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1782813882;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=AHMEXiT8emnxbkiPaZi1FLZ7uspBem6QE/FnyzmF7RA=;\n\tb=GQ2B/shFxW02Xr/JukIN7phBLXCnPHO/2AEPGU/d81b9QWSljSxgTDkzmrEC7LvVX+OShM\n\tW7GXJB2Vdb/U2Hpx1kOM48hL6EDhaMy4KnarRHJmGeeIKnWwIjL2uZYB/y5ZmQCAwJiynW\n\thAkFgjXrxrVs2q1fylgRGWZXfeWh2l8=","X-MC-Unique":"dDfAyS1TM06JikSwtlgZWw-1","X-Mimecast-MFC-AGG-ID":"dDfAyS1TM06JikSwtlgZWw_1782813879","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782813879; x=1783418679;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=AHMEXiT8emnxbkiPaZi1FLZ7uspBem6QE/FnyzmF7RA=;\n\tb=N2oQtoOsF78tdipnrqUli3TTntnyKMqxDQrnLRNMFb1chXTqitY1LjkOS93Rbyxu7r\n\tBuwtQWQFFO16zS8LH78c+gvNUIen0sgKJ87XqR1BzcwlESYN9c+yXIk7HF56dXhUAc7t\n\t21+wOoIVNQiF6mNN0mJd6QveVjtpOQlNkiaD00oi7RyrPCMCdDQgqL4gaVJygEuePl9b\n\tz41edCWt/As1HZ3+Dpv2Iv4Aa5q8YLkfvreANyUeWB0Ev5rQMsRKQ2GaXKovdKWXg8qZ\n\tHaR6gu67IOPV7TMu0TfXrnmvFvYgB9b9UqJ0nXqTFMaeG5mdxp+/OgJaJMXQKRk+n5TW\n\tauxg==","X-Gm-Message-State":"AOJu0YzLdNXnin5t5EIMgySkpDLQhG3PmPpI/ECBoXiivPXBpRk304Vr\n\tXIQSkJ1PKF6gIk5MraFWsGu+AqjiKLDg5eLO612wP/Zy7o21NbFdCN7wJhcJAtuMb8lNl+cVhdv\n\totRhJ2LaArUYBiDfg1q2XWikEgpGV7I8LsH3L+Yq5MVh75CnRWTZqWGVmByPNNjw3V6ldrMCmQA\n\tk=","X-Gm-Gg":"AfdE7ckEqKAtNdIJOLYQyJVSuR5wSA//a61YDBJyxegOsgxV1oLdloXddmOi1yeoJaF\n\tP8HUbauxwyP6rm/JC/ocsp4oBzFlOpSWiXYiX/34WHXGIYGylV69uohHzYah3qo+eFTHFRxlbmD\n\tqHF/MYny6o/LU+HycaCQY0HIN80t9W11Ke7fs82C2ifqg8YBuFFMgDIKLL8lUlC56iuS2u1j7cp\n\t+6ctE1YRun6DjA6QPf+/Nrz3Rw51yAxm8275X5OaWgCiJoXqB9Xrw2D9HVQp23/rzSoq2ZuA6Bk\n\t5jBzWF5sMFWZcKapbfTZiGdCKXWBn5w07tvvhM0wIkIUISAf5TQvQOfb7XLFIzReqycLPjyXBMY\n\th67NzBGjumebd/1yaaO3KDQN/krttydE36gqWSQco2ndEu0HLTgoh/bUtJHBqw2vb","X-Received":["by 2002:a05:600c:4e0b:b0:493:bd2a:93be with SMTP id\n\t5b1f17b1804b1-493bd2aa466mr5826065e9.6.1782813879457; \n\tTue, 30 Jun 2026 03:04:39 -0700 (PDT)","by 2002:a05:600c:4e0b:b0:493:bd2a:93be with SMTP id\n\t5b1f17b1804b1-493bd2aa466mr5825775e9.6.1782813878961; \n\tTue, 30 Jun 2026 03:04:38 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>","Subject":"Re: [PATCH 1/4] libcamera: shaders: Move header generation to\n\tshaders directory","In-Reply-To":"<20260630083031.3197714-2-laurent.pinchart@ideasonboard.com>\n\t(Laurent Pinchart's message of \"Tue, 30 Jun 2026 11:30:28 +0300\")","References":"<20260630083031.3197714-1-laurent.pinchart@ideasonboard.com>\n\t<20260630083031.3197714-2-laurent.pinchart@ideasonboard.com>","Date":"Tue, 30 Jun 2026 12:04:35 +0200","Message-ID":"<85qzlo1gzw.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"ny-lZK2NzEjy0aO5-Ujxl4lxMSlnhV2bYRJl5fYpmWE_1782813879","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39518,"web_url":"https://patchwork.libcamera.org/comment/39518/","msgid":"<1b015cb7-2e9c-4e3b-b1a9-d1c8a80b8e89@ideasonboard.com>","date":"2026-06-30T10:47:20","subject":"Re: [PATCH 1/4] libcamera: shaders: Move header generation to\n\tshaders directory","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 06. 30. 10:30 keltezéssel, Laurent Pinchart írta:\n> The src/libcamera/shaders/ directory contains all libcamera shaders for\n> the software ISP. Move the related build logic to convert shaders to\n> headers to the same directory to make shaders self-contained.\n> \n> This changes the location of the glsl_shaders.h header, update\n> debayer_egl.cpp accordingly.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/libcamera/meson.build                  | 10 ----------\n>   src/libcamera/shaders/meson.build          | 10 ++++++++++\n>   src/libcamera/software_isp/debayer_egl.cpp |  2 +-\n>   3 files changed, 11 insertions(+), 11 deletions(-)\n> \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 6aedacbdb04d..17c1b2cb3479 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -184,16 +184,6 @@ libcamera_deps += [\n>       libyaml,\n>   ]\n>   \n> -# Generate headers from shaders\n> -libcamera_shader_headers = custom_target(\n> -    'gen-shader-headers',\n> -    input : [shader_files],\n> -    output : 'glsl_shaders.h',\n> -    command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'],\n> -)\n> -\n> -libcamera_internal_headers += libcamera_shader_headers\n> -\n>   # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n>   # The build_rpath is stripped at install time by meson, so we determine at\n>   # runtime if the library is running from an installed location by checking\n> diff --git a/src/libcamera/shaders/meson.build b/src/libcamera/shaders/meson.build\n> index dd441a577670..adac77327a3b 100644\n> --- a/src/libcamera/shaders/meson.build\n> +++ b/src/libcamera/shaders/meson.build\n> @@ -8,3 +8,13 @@ shader_files = files([\n>       'bayer_unpacked.vert',\n>       'identity.vert',\n>   ])\n> +\n> +# Generate headers from shaders\n> +libcamera_shader_headers = custom_target(\n> +    'gen-shader-headers',\n> +    input : [shader_files],\n> +    output : 'glsl_shaders.h',\n> +    command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'],\n> +)\n> +\n> +libcamera_internal_headers += libcamera_shader_headers\n> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n> index 0ec2a98cfafb..af9b9d426920 100644\n> --- a/src/libcamera/software_isp/debayer_egl.cpp\n> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n> @@ -24,7 +24,7 @@\n>   #include \"libcamera/internal/formats.h\"\n>   #include \"libcamera/internal/framebuffer.h\"\n>   \n> -#include \"../glsl_shaders.h\"\n> +#include \"../shaders/glsl_shaders.h\"\n>   \n>   namespace libcamera {\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C493BC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Jun 2026 10:47:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EB35265F67;\n\tTue, 30 Jun 2026 12:47:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8581656D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Jun 2026 12:47:23 +0200 (CEST)","from [192.168.33.31] (185.221.140.128.nat.pool.zt.hu\n\t[185.221.140.128])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C0A8FD52;\n\tTue, 30 Jun 2026 12:46:39 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DN8TLrcy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782816399;\n\tbh=rUeAoxQo5KQlOxxV2Soqk91WJjyiH05W0JSDpKDTMsU=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=DN8TLrcy6UPwDcfFv/ZSglM8MsnLNkQx+L9JwS4NnJ3IFmawJhCcPOE9forV0zcKF\n\tOx0wz9YiDM59Zp4DBf22R3LduzR+OZX3oxi4G4PWuS02mynQNSmgIYWz11jr1l/6sd\n\t3uUty3u8qEbo/qfIaaLRiZTTpBKYslncXmTLAMyw=","Message-ID":"<1b015cb7-2e9c-4e3b-b1a9-d1c8a80b8e89@ideasonboard.com>","Date":"Tue, 30 Jun 2026 12:47:20 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/4] libcamera: shaders: Move header generation to\n\tshaders directory","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","References":"<20260630083031.3197714-1-laurent.pinchart@ideasonboard.com>\n\t<20260630083031.3197714-2-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260630083031.3197714-2-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]