Show a patch.

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

{
    "id": 27029,
    "url": "https://patchwork.libcamera.org/api/patches/27029/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27029/",
    "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": "<20260624085849.873784-4-bryan.odonoghue@linaro.org>",
    "date": "2026-06-24T08:58:42",
    "name": "[03/10] libcamera: egl: Extend eGL::createTexture2D to understand floats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e933e833e0e2a1c97715ee81ffa68bf6e36e3f8b",
    "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/27029/mbox/",
    "series": [
        {
            "id": 6015,
            "url": "https://patchwork.libcamera.org/api/series/6015/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6015",
            "date": "2026-06-24T08:58:39",
            "name": "libcamera: software_isp: gpu: Add go faster stripes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/6015/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27029/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27029/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 7BBF5C3306\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Jun 2026 08:59:12 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 817E06588D;\n\tWed, 24 Jun 2026 10:59:08 +0200 (CEST)",
            "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n\t[IPv6:2a00:1450:4864:20::332])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DFD0F65878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 10:59:02 +0200 (CEST)",
            "by mail-wm1-x332.google.com with SMTP id\n\t5b1f17b1804b1-490ac357c55so7053825e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 01:59:02 -0700 (PDT)",
            "from inspiron14p-linux ([109.76.100.231])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-49261063d6esm25128375e9.2.2026.06.24.01.59.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 24 Jun 2026 01:59:01 -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=\"OPQzNKFL\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1782291542; x=1782896342;\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=br9Q7T1ldP/TlFZGIutApjjAtcXAdKfOFS9iVRyulvE=;\n\tb=OPQzNKFLOnXfz9CO2GH9GE9V+NCgOpp/q9nxBW2M8sFAjhCSl6GP5TNV/Qmy3UB9oP\n\t+mLTqenpoNjfSuseInUQZm0+pNviN1lfvvh3zTStpqf5kEt8JoVs+BhNd25g4Dl69vYP\n\tUUzO4FI8tGmqroofOprXmDzi2GjEFtRPbONk52b2AyqU1xBSQz6HlpxpLRd66//Ymdul\n\tUJAJhoP1nrEMee0y54ciEjKvOMO7AkCuf++K/V4D94FYEimjnSNwxFd2DjcG8M6gvtMX\n\tcHyz93nijT5hpiRZukVvGg3EghRE5rJKKy9gNByRd3YhbP7C1ps43PaB4lNvFdYcUbLC\n\tVzYg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782291542; x=1782896342;\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=br9Q7T1ldP/TlFZGIutApjjAtcXAdKfOFS9iVRyulvE=;\n\tb=ep767KvmWEGnx5G+CseN2WUaK2sW35A7Q0IuNQGJIIRjeh8bRq0JMKgT5yH8bQVsPl\n\tSQFXooaXHpJfeN1WHW5zkn66sXMMb8nsuaGj5MarFrIZN8w6ild1NU+SUs5d1P1xUhDI\n\t/lPZ3WoRI2Q+ON+P6QNtNKYv6eGv7VdC82W4PeSRhHCYNcLuhfwhQFswPmmKKSQhgbhd\n\tYhEKFM0CS/1ymnugyIfgOuhhuW4E6t2MjnrMZIFaL7AWn5x40CrOcA3SSDoJVuLzauJg\n\tR1uEvvlCeqbYicjQ0SDt7YpqOi6d+Gld7M8tW64rHDvQYYyZq4LhvU78AV5TsPCEQV7J\n\tgyxA==",
        "X-Gm-Message-State": "AOJu0YyvmcUIDMVJsVtRQNRRwRlQ0JVFc6Z3+RWd9Y0YnqrNeTIG8nbE\n\tJtRfX7zCScM1zWSzfGhqqFR5Il8ntvcPGgyQH/RMw0MSdCWDBiFkmQ3BppFAb/wHE/y9uzLH5rN\n\tsuJYu/OQ=",
        "X-Gm-Gg": "AfdE7clH1eVel6TYhxc7yOMs/gSgqwq+JSMo5dE57Zv1fCTUX4D89Ofapfno0MoZCxg\n\tzi2rGxi8G0xkDOrFvmh3HQ/xoP7/trOg5oSZGyvqdWe72XvUVWKF8wShfP5isXZrLsJlag9ViR4\n\tRHY5GSoiARcRF9eo7veewD+zmomvYuxmELw7UzDJhvdeN6S9V/RT+BMybT8VE40SplJd5j0DI+n\n\twqWIG4JaPWmfinsbBSJBCyQu49f1bHIhsnCUSNcFwqVoYb4+kk3RU1RtbRiRK8/sZLqMmzU5BFN\n\tZz6P4JoLhYj0W+Kh9Ih4BOw5ErwtDzKVSO0gLTxVZnMAOUVcQ2BM/+LWZfQsdL7/i0aIfpk23q8\n\tiE6k9K9V0wf3igqdWghRIy2rtC6Wq0pR5QUZZ9FEnGqZsSkLvm30jic93a1V4Z6rOp4MAOdrQ/0\n\tWGyFUA93Yx7vwQ6qEb0unLJ2RtGHTj",
        "X-Received": "by 2002:a05:600c:8518:b0:490:a298:acf7 with SMTP id\n\t5b1f17b1804b1-4926086d16bmr35890145e9.17.1782291542242; \n\tWed, 24 Jun 2026 01:59:02 -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 03/10] libcamera: egl: Extend eGL::createTexture2D to\n\tunderstand floats",
        "Date": "Wed, 24 Jun 2026 09:58:42 +0100",
        "Message-ID": "<20260624085849.873784-4-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260624085849.873784-1-bryan.odonoghue@linaro.org>",
        "References": "<20260624085849.873784-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": "We want to have the option to use floats as an intermediary format between\ndifferent stages of a multi-pass pipeline. Adding floats means also\nplumbing the infrastructure to differentiate on data-type on the input to\ntexture creation.\n\nAdd the floats and the plumbing.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/egl.cpp | 18 +++++++++++++++++-\n 1 file changed, 17 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\nindex e83e24606..8d80a6d1a 100644\n--- a/src/libcamera/egl.cpp\n+++ b/src/libcamera/egl.cpp\n@@ -268,13 +268,29 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n  */\n void eGL::createTexture2D(eGLImage &eglImage, void *data)\n {\n+\tGLenum format;\n+\tGLenum type = GL_UNSIGNED_BYTE;\n+\n \tASSERT(tid_ == Thread::currentId());\n \n \tglActiveTexture(eglImage.texture_unit_);\n \tglBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n \n+\tswitch (eglImage.format_) {\n+\tcase GL_R16F:\n+\t\tformat = GL_RED;\n+\t\ttype = GL_HALF_FLOAT;\n+\t\tbreak;\n+\tcase GL_RG8:\n+\t\tformat = GL_RG;\n+\t\tbreak;\n+\tcase GL_LUMINANCE:\n+\t\tformat = GL_LUMINANCE;\n+\t\tbreak;\n+\t}\n+\n \t// Generate texture, bind, associate image to texture, configure, unbind\n-\tglTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_, eglImage.width_, eglImage.height_, 0, eglImage.format_, GL_UNSIGNED_BYTE, data);\n+\tglTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_, eglImage.width_, eglImage.height_, 0, format, type, data);\n \n \t// Nearest filtering\n \tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n",
    "prefixes": [
        "03/10"
    ]
}