Patch Detail
Show a patch.
GET /api/patches/25399/?format=api
{ "id": 25399, "url": "https://patchwork.libcamera.org/api/patches/25399/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25399/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251210003139.43606-4-bryan.odonoghue@linaro.org>", "date": "2025-12-10T00:31:20", "name": "[v4,03/20] meson: Automatically generate glsl_shaders.h from specified shader programs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "78bfd4997334c20c8a02b8d8be329e8c31927538", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25399/mbox/", "series": [ { "id": 5644, "url": "https://patchwork.libcamera.org/api/series/5644/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5644", "date": "2025-12-10T00:31:17", "name": "GPUISP precursor series", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5644/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25399/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25399/checks/", "tags": {}, "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 3BBDEBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:32:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E586661431;\n\tWed, 10 Dec 2025 01:32:06 +0100 (CET)", "from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com\n\t[IPv6:2607:f8b0:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E1F7361418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:32:04 +0100 (CET)", "by mail-pf1-x42f.google.com with SMTP id\n\td2e1a72fcca58-7bc248dc16aso5237637b3a.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:32:04 -0800 (PST)", "from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:32:02 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"eq2SQbn3\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765326723; x=1765931523;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=pQX41AGsNI0QCoqx36ezoVqFb8YAenUUt7bw97cItvQ=;\n\tb=eq2SQbn3TbNT+Z318qnFRr2tynSPpImCD0C21cVlegguZaGj75SJQ4743T6Zne4Igs\n\tHeWZRVcsgXztpu9+X688y8LbdMKBF1vr7J6Hy2WF7Xw3YlhBxzuUogR9t7KChRxpIP8+\n\t+GYX3nxRyJl5VaFyKu9LVHk63xwKbcdhX0BYbLAv2OfgGQf2WITBURDQIWfcm58H7cda\n\tITjZ2sykvQxvmGPIX7R567veM+FiC/YZFIJJ7Bo2kaWCuFECsoufJvv5Ro4p0a3j45GV\n\tcfOhndLG3Cuvjh2ISBqG4MLRAE/V71cQhPO2hHMy51vGsR/sSaTIzsweHXqeNvjo0avC\n\tvC4w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765326723; x=1765931523;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=pQX41AGsNI0QCoqx36ezoVqFb8YAenUUt7bw97cItvQ=;\n\tb=jDgO+Y72/La1bxUEK0du6B6iEjZo6K2QY2XJAGTSCNC7i9XhP5q0sAs4TwY0Xqoz3V\n\t3KWt0S1g/GJRqAfPp78tCpLzAP7Qg3z/UYtBvDsf19IjgiqAvFDbFZ9aX6NL2qR7No1h\n\tFt1/PBzOl5/J6SHTOj/sSTO+SJ2Q/gUEMWQwes/KAimh0EVm9McIjEvfvDTPPjp1UUvh\n\tsgCWsnGekvwHFu9GMDsW8i8zxgbRBFgV91MErFk+Rg5j0Qnjf57gfuJiRgzBJ7naaAQi\n\t0w3eyDHt5vLnZFtb1wc2w9UNfRKwsjoMV6TOJcrxldFbNMBBlT0VE7B/pfs8arAH73bK\n\thoRg==", "X-Gm-Message-State": "AOJu0YyhGdG0nq58d9WXbIspypVD+QMN1GWixGW38kZUS43D/2uZzwsq\n\t4DFCSnVFe59bYdXPDYCRF3dFDtBhOh3450PnJGITWZANaIKQ3kqPIPtqROD5B81TaD2DW+EUeu7\n\tc2Ko6", "X-Gm-Gg": "ASbGnctLPSmklSgGsNRZbxv1Bu/9NyGs2baWDWBup9fz7/i+u++laR+//pPpFVP8ZNk\n\txPx8JSuXkbIlPh4YwC3KCtUa9fOp+RB0vnqcNDkfkS42Tfxs5i0xB7tUjHAQZQOmDIUkHfFIT+p\n\tc473U04KiKax/KoIR0JxqwSqdau+P+h3ZiUAZJgiNx+g+GLC7hkIYX+k1o3wswn1gU6Nlw//ohy\n\tXKXiwPp/s4XtqJxriR/NeJkSTPLJSXWrkv/v8E+F75DBiqbcJ/8kAc2uzQIqfMwSGz82Qx5JQ60\n\tFXSpMfzLkOxM0bCgaPGidrFKlBid7QFbnzPcokVE3mEmr2NJCWnZvZW+/IUJ8DFqB4uuDSkxjik\n\t4UYnGgOB1VSOO4bcH1FzdUFP6iood8OL4qyLhjI6A+mpl+L9YCfmfBTv3w0OpojdAL3QoQcoZId\n\t7cwvODVa3ixIVoaHZCAIDSY7wAryQWAp8rGkIBxRy7P947uPnEtItzFak5HnO3vSo1", "X-Google-Smtp-Source": "AGHT+IGqBDXNQUpVt5Ff8KdBg0FCL2vHzXfc9btu3an/SoSjVtOmnrl07d/UW/p9v7lnpyXqLoeNGQ==", "X-Received": "by 2002:a05:6a20:3ca7:b0:342:873d:7e62 with SMTP id\n\tadf61e73a8af0-366e110193bmr448726637.29.1765326723080; \n\tTue, 09 Dec 2025 16:32:03 -0800 (PST)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>", "Subject": "[PATCH v4 03/20] meson: Automatically generate glsl_shaders.h from\n\tspecified shader programs", "Date": "Wed, 10 Dec 2025 00:31:20 +0000", "Message-ID": "<20251210003139.43606-4-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251210003139.43606-1-bryan.odonoghue@linaro.org>", "References": "<20251210003139.43606-1-bryan.odonoghue@linaro.org>", "MIME-Version": "1.0", "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>" }, "content": "Encode the bayer shader files into a header as part of the build process.\nQcam already compiles the shader files down into a QT resource file which\nit references internally.\n\nIn order to share the debayering shader programs outside of qcam create a\ngeneric header which both qcam and libcamera can operate from.\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/meson.build | 11 +++++++++++\n src/libcamera/shaders/meson.build | 10 ++++++++++\n utils/meson.build | 2 ++\n 3 files changed, 23 insertions(+)\n create mode 100644 src/libcamera/shaders/meson.build", "diff": "diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 34e20f557..90d434a5a 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -76,6 +76,7 @@ subdir('ipa')\n subdir('pipeline')\n subdir('proxy')\n subdir('sensor')\n+subdir('shaders')\n subdir('software_isp')\n \n libdl = dependency('dl')\n@@ -182,6 +183,16 @@ 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(), meson.project_build_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\ndiff --git a/src/libcamera/shaders/meson.build b/src/libcamera/shaders/meson.build\nnew file mode 100644\nindex 000000000..386b342d0\n--- /dev/null\n+++ b/src/libcamera/shaders/meson.build\n@@ -0,0 +1,10 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+# List of shader files to convert to header hex\n+# for the purposes of inclusion in OpenGL debayering\n+shader_files = files([\n+ 'bayer_1x_packed.frag',\n+ 'bayer_8.frag',\n+ 'bayer_8.vert',\n+ 'identity.vert',\n+])\ndiff --git a/utils/meson.build b/utils/meson.build\nindex 95d657ac9..3deed8ad4 100644\n--- a/utils/meson.build\n+++ b/utils/meson.build\n@@ -3,5 +3,7 @@\n subdir('codegen')\n subdir('ipu3')\n \n+gen_shader_headers = files('gen-shader-headers.sh')\n+\n ## Module signing\n gen_ipa_priv_key = files('gen-ipa-priv-key.sh')\n", "prefixes": [ "v4", "03/20" ] }