Show a patch.

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

{
    "id": 26793,
    "url": "https://patchwork.libcamera.org/api/patches/26793/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26793/",
    "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": "<20260521155906.120373-3-robert.mader@collabora.com>",
    "date": "2026-05-21T15:59:03",
    "name": "[v4,2/5] egl: Remove some parameters from createTexture2D()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6517920868e821a865fee2ed6f6aeeb627366745",
    "submitter": {
        "id": 140,
        "url": "https://patchwork.libcamera.org/api/people/140/?format=api",
        "name": "Robert Mader",
        "email": "robert.mader@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26793/mbox/",
    "series": [
        {
            "id": 5960,
            "url": "https://patchwork.libcamera.org/api/series/5960/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5960",
            "date": "2026-05-21T15:59:02",
            "name": "software_isp: Implement DMABuf import for input buffers",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/5960/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26793/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26793/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 58977BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 May 2026 15:59:34 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C31ED63025;\n\tThu, 21 May 2026 17:59:32 +0200 (CEST)",
            "from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E557962FEC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 May 2026 17:59:27 +0200 (CEST)",
            "by mx.zohomail.com with SMTPS id 177937916250335.21624434893283;\n\tThu, 21 May 2026 08:59:22 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"Z6VuYZTI\"; \n\tdkim-atps=neutral",
        "ARC-Seal": "i=1; a=rsa-sha256; t=1779379164; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=DexCRY3otuT53zXF6TO/JDFFcIeEzR5A+BRUHFgoVRQZxGv+vKiyO7E7ZSVtxm6kWnCMNbnu8P/qWkOATXRDbBzrlhUT1l1qKqqLBXSDML48wl/B1VWMTMenHuVaCKTDFzqNXzhDrOPiRoh4PO5womS1YeMAl5LDH2jJKbwvQrQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1779379164;\n\th=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=l7RjJAijFsQIL0xNq9BIdDwiEkWp3YMq2V3d/E0NjOg=; \n\tb=RYKtCeHNB9hbu9OT8Rj4FMDRy6VaABAYZ9HJ+juJfLBD/IAjPvvf22m+S6RtxCSNP/zRq9f3utr+sBELFCDSdsDOnc/L2X5kDEdByp2abW6wgOOlCgG2CHbMiEKMMIUDWav01GDjKY6O0PJ1gnxSrwftWsCbPEWRvg3DKS4wtJ4=",
        "ARC-Authentication-Results": "i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1779379164;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=l7RjJAijFsQIL0xNq9BIdDwiEkWp3YMq2V3d/E0NjOg=;\n\tb=Z6VuYZTIJSjKWD119IbrfMzxKFiYcK9Ni8AQALnCk3aUusLbiSPC1H0+4mzjlN3I\n\tKQBzArxYZPdpYy0nlWFCm3PB8WLvphRaBrbE6K0RoWslNCQcVN0iXATTppf3jyYlnak\n\tZ2hKzGg/DiC92CrPolImypgXdd3XqJKnuUcEM+8o=",
        "From": "Robert Mader <robert.mader@collabora.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Robert Mader <robert.mader@collabora.com>",
        "Subject": "[PATCH v4 2/5] egl: Remove some parameters from createTexture2D()",
        "Date": "Thu, 21 May 2026 17:59:03 +0200",
        "Message-ID": "<20260521155906.120373-3-robert.mader@collabora.com>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260521155906.120373-1-robert.mader@collabora.com>",
        "References": "<20260521155906.120373-1-robert.mader@collabora.com>",
        "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": "And use the values set in the constructor instead, bringing the\nfunction in line with createInputDMABufTexture2D() and\ncreateOutputDMABufTexture2D().\n\nAdopt the value passed into the constructor accordingly, which\npreviously was never used.\n\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\n---\n include/libcamera/internal/egl.h           | 2 +-\n src/libcamera/egl.cpp                      | 7 ++-----\n src/libcamera/software_isp/debayer_egl.cpp | 4 ++--\n 3 files changed, 5 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex 825240dbb..bcf09b475 100644\n--- a/include/libcamera/internal/egl.h\n+++ b/include/libcamera/internal/egl.h\n@@ -105,7 +105,7 @@ public:\n \n \tint createInputDMABufTexture2D(eGLImage &eglImage, int fd);\n \tint createOutputDMABufTexture2D(eGLImage &eglImage, int fd);\n-\tvoid createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data);\n+\tvoid createTexture2D(eGLImage &eglImage, void *data);\n \n \tvoid pushEnv(std::vector<std::string> &shaderEnv, const char *str);\n \tvoid makeCurrent();\ndiff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\nindex 2aabfc2e0..267d22c8b 100644\n--- a/src/libcamera/egl.cpp\n+++ b/src/libcamera/egl.cpp\n@@ -240,9 +240,6 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n /**\n  * \\brief Create a 2D texture from a memory buffer\n  * \\param[in,out] eglImage EGL image to associate with the texture\n- * \\param[in] format OpenGL internal format (e.g., GL_RGB, GL_RGBA)\n- * \\param[in] width Texture width in pixels\n- * \\param[in] height Texture height in pixels\n  * \\param[in] data Pointer to pixel data, or nullptr for uninitialised texture\n  *\n  * Creates a 2D texture from a CPU-accessible memory buffer. The texture\n@@ -250,7 +247,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n  * is useful for uploading static data like lookup tables or uniform color\n  * matrices to the GPU.\n  */\n-void eGL::createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data)\n+void eGL::createTexture2D(eGLImage &eglImage, void *data)\n {\n \tASSERT(tid_ == Thread::currentId());\n \n@@ -258,7 +255,7 @@ void eGL::createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint\n \tglBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n \n \t// Generate texture, bind, associate image to texture, configure, unbind\n-\tglTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data);\n+\tglTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_, eglImage.width_, eglImage.height_, 0, eglImage.format_, GL_UNSIGNED_BYTE, data);\n \n \t// Nearest filtering\n \tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\ndiff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\nindex 8c1f2074d..696498a58 100644\n--- a/src/libcamera/software_isp/debayer_egl.cpp\n+++ b/src/libcamera/software_isp/debayer_egl.cpp\n@@ -506,7 +506,7 @@ int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParam\n \tegl_.makeCurrent();\n \n \t/* Create a standard texture input */\n-\tegl_.createTexture2D(*eglImageBayerIn_, glFormat_, inputConfig_.stride / bytesPerPixel_, height_, in.planes()[0].data());\n+\tegl_.createTexture2D(*eglImageBayerIn_, in.planes()[0].data());\n \n \t/* Generate the output render framebuffer as render to texture */\n \tegl_.createOutputDMABufTexture2D(*eglImageBayerOut_, out_fd);\n@@ -587,7 +587,7 @@ int DebayerEGL::start()\n \t\treturn -EINVAL;\n \n \t/* Raw bayer input as texture */\n-\teglImageBayerIn_ = std::make_unique<eGLImage>(glFormat_, width_, height_, inputConfig_.stride, GL_TEXTURE0, 0);\n+\teglImageBayerIn_ = std::make_unique<eGLImage>(glFormat_, inputConfig_.stride / bytesPerPixel_, height_, inputConfig_.stride, GL_TEXTURE0, 0);\n \n \t/* Texture we will render to */\n \teglImageBayerOut_ = std::make_unique<eGLImage>(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);\n",
    "prefixes": [
        "v4",
        "2/5"
    ]
}