Show a patch.

GET /api/patches/26943/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26943,
    "url": "https://patchwork.libcamera.org/api/patches/26943/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26943/",
    "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": "<20260618122245.946138-11-bryan.odonoghue@linaro.org>",
    "date": "2026-06-18T12:22:23",
    "name": "[10/30] libcamera: software_isp: gpu_pipeline_shader_pass: Move common attribute and uniform variables to base shader class",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "604b5015928aac2fc74aea4cc3d8b8ef39f068f1",
    "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/26943/mbox/",
    "series": [
        {
            "id": 6005,
            "url": "https://patchwork.libcamera.org/api/series/6005/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6005",
            "date": "2026-06-18T12:22:13",
            "name": "RFC/RFT: gpuisp: Multipass with speed optimisations on top",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/6005/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26943/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26943/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 BD6BAC3306\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 12:23:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C65E462FE1;\n\tThu, 18 Jun 2026 14:23:19 +0200 (CEST)",
            "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CD1C62C6A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 14:23:05 +0200 (CEST)",
            "by mail-wm1-x334.google.com with SMTP id\n\t5b1f17b1804b1-490b211ee6aso5484755e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 05:23:05 -0700 (PDT)",
            "from inspiron14p-linux ([109.76.144.236])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2026 05:23:04 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"SmELQWAg\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1781785385; x=1782390185;\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=EnOXXDwDQkS4RkeO0LXcAjFKNLZWffOHcAAqtwXY+iY=;\n\tb=SmELQWAgY+xgxDCfYU60R9K/ija50q280AF3H6LlEehyiezpCGBdD2m6bbsUDFrtw1\n\tXqk2a+C8lNb3TGaDDxj0/YqxgEEsqyBQM8FNVzT8hb9n0rT09Pxot4aSFqAYt4YvzxHB\n\t7GRy1JnEGuXpBWSYsHhmWEOKmvT0O2mOqGpzwmNylL0HS4ISt4YxiYLBlQtaqj7dvmej\n\tgHy2iGRbm1bzjOrruEaF6mSiw0NwUjDYhhq766o2T2n6XNvuKjR9Vh33qRi2VBfkPKPD\n\tWvxssLleNRCONlaAzbZgqA0Nvde9Fu8wyNHW7fUlRSgOzL2AZVAG7VXwPZYsFDIoPN+u\n\tK/Jw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1781785385; x=1782390185;\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=EnOXXDwDQkS4RkeO0LXcAjFKNLZWffOHcAAqtwXY+iY=;\n\tb=jsFYvCiG5Tm6u7LfgRWL2XBNZ2QrG0dAGvhU4ZmqauAIasfT/9J2pMhLtY7mRd/qlV\n\t1qvB5ZzM7jVxJpdSqbGYaC3tmMw2BPpsWwQrvvkJHQJYHJRHczrc19A5XWOmmH3h34ox\n\t3R4sNwgen2QoPvEKykVt2OJo1EuXAvxFa5tUUi5lXaHgat+GvS2uBLqnzqIO3vQ/tHJW\n\tSybGxeNgtv7ByTR5SPWtMD9WHnYM5tQBkGNrGzoZSWy+cOg4vpjtZ+qTkNuXVaWuByrU\n\tqKFF12QCwaTcOEPnGcbDT0QKRceo0ozxLPnfCDYp8CgbDUEph31QebowozxKuYb2QJvU\n\t+yCQ==",
        "X-Gm-Message-State": "AOJu0YzgvQE6sYPA1eZEV7MaPJRJnAd3MizkPpFDvmwDBQNX7ArVS5nj\n\tLezL9skEbkUcic1zqeli9E1/Fk1rUgppcqxeHYX1MwG0NicBMuSwcnEgZ3I+RjSFKA2Jl3A5iir\n\txdwktzFM=",
        "X-Gm-Gg": "AfdE7cl7g/z/FhktoAjDEaqeDTtX6YSjjuFOmPJy7qF41woj9/2c4TOY4YsSWvEN6Jy\n\t2v6gnFzRxEgG26CEmLH9FKzMGb2W88Ff10Q/jVt04cmhcRaF3UkCQtmTeCMPCIsskHC4f0cagh/\n\tT1v+2yR6l1phyuPf3cc24OEABhdb/uBIJU1AHocSc4LgX/C8644k1WdzHf7zvVDQwuDelHJnUbg\n\tnvLlnlvsPXlb6VG/3yr8UMpfaP785r+fdXnwrHEMapfPCixH+NSeve0f3ckB7SqqJuD8vqWFDm+\n\tINhvddOtjRs7ywAWuMpuTVee4IUGclm5/qQIIPkdhQnneQC6zqua/+C62tQqb883d5sCHgZaDZ8\n\tBVX50BfD8aUrHMzdyyT7FDRRAm4YHybvXe26QsZBTc7oG3KUz9GjgPeEAV5H52Z/HlwX9JfnPOQ\n\tTBKXW8DRN/deGYg/sG3u9mVhNOxFtG",
        "X-Received": "by 2002:a05:600c:1e0f:b0:490:e5c1:b88d with SMTP id\n\t5b1f17b1804b1-492333babfbmr148393635e9.1.1781785384740; \n\tThu, 18 Jun 2026 05:23:04 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "bryan.odonoghue@linaro.org,\n\tpavel@ucw.cz",
        "Subject": "[PATCH 10/30] libcamera: software_isp: gpu_pipeline_shader_pass:\n\tMove common attribute and uniform variables to base shader class",
        "Date": "Thu, 18 Jun 2026 13:22:23 +0100",
        "Message-ID": "<20260618122245.946138-11-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260618122245.946138-1-bryan.odonoghue@linaro.org>",
        "References": "<20260618122245.946138-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": "Every shader pass will want to set these variables so define them in the\nbase class not in the demosiac class.\n\nRender therefore unto Cesar the things which are Cesar's.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n .../software_isp/gpu_pipeline_shader_pass.h         | 13 +++++++++++++\n .../gpu_pipeline_shader_pass_demosiac.h             | 10 ----------\n 2 files changed, 13 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h\nindex d4d4cf34d..d55b27a85 100644\n--- a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h\n+++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h\n@@ -78,6 +78,19 @@ protected:\n \n \tstruct PassConfig passInputCfg_;\n \tstruct PassConfig passOutputCfg_;\n+\n+\t/* Common shader attributes */\n+\tGLint attributeVertex_;\n+\tGLint attributeTexture_;\n+\tGLint textureUniformProjMatrix_;\n+\tGLint textureUniformBayerDataIn_;\n+\tGLint textureUniformStrideFactor_;\n+\tuint32_t shaderStridePixels_;\n+\n+\t/* Bayer shader parameters - useful to potentially more than one shader */\n+\tGLint textureUniformBayerFirstRed_;\n+\tfloat firstRed_x_;\n+\tfloat firstRed_y_;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h b/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h\nindex 11bb04c30..60f175ad3 100644\n--- a/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h\n+++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h\n@@ -43,18 +43,8 @@ public:\n \tconst char *name() const override { return \"GpuIspShaderPassDemosiac\"; }\n private:\n \t/* Shader parameters */\n-\tfloat firstRed_x_;\n-\tfloat firstRed_y_;\n-\tGLint attributeVertex_;\n-\tGLint attributeTexture_;\n \tGLint textureUniformStep_;\n \tGLint textureUniformSize_;\n-\tGLint textureUniformStrideFactor_;\n-\tGLint textureUniformBayerFirstRed_;\n-\tGLint textureUniformProjMatrix_;\n-\tGLint textureUniformBayerDataIn_;\n-\n-\tuint32_t shaderStridePixels_;\n \n \t/* Represent per-frame CCM as a uniform vector of floats 3 x 3 */\n \tGLint ccmUniformDataIn_;\n",
    "prefixes": [
        "10/30"
    ]
}