Show a patch.

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

{
    "id": 25959,
    "url": "https://patchwork.libcamera.org/api/patches/25959/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25959/",
    "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": "<20260126104256.119697-2-rick.w.ten.wolde@gmail.com>",
    "date": "2026-01-26T10:42:49",
    "name": "[1/7] libcamera: software_isp: egl: Add gl_scale_param to createTexture2D()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "86bbc03c916fe5642f169e2e76952e99f359954a",
    "submitter": {
        "id": 257,
        "url": "https://patchwork.libcamera.org/api/people/257/?format=api",
        "name": "Rick ten Wolde",
        "email": "rick.w.ten.wolde@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25959/mbox/",
    "series": [
        {
            "id": 5739,
            "url": "https://patchwork.libcamera.org/api/series/5739/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5739",
            "date": "2026-01-26T10:42:48",
            "name": "LSC for SoftISP simple pipeline",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5739/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25959/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25959/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 7F892C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Jan 2026 10:48:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A981F61FD8;\n\tMon, 26 Jan 2026 11:48:08 +0100 (CET)",
            "from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com\n\t[IPv6:2a00:1450:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7874061A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jan 2026 11:43:03 +0100 (CET)",
            "by mail-ej1-x62a.google.com with SMTP id\n\ta640c23a62f3a-b87f00ec06aso696167566b.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jan 2026 02:43:03 -0800 (PST)",
            "from castortop.wolde.loc (195-240-110-192.fixed.kpn.net.\n\t[195.240.110.192]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b885b7661f7sm599220366b.54.2026.01.26.02.43.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Jan 2026 02:43:02 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Zkw4eQyb\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1769424183; x=1770028983;\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=mgB6MrQvgMJiEZfORtJ9tLgqcmb2wkUK6G66JSN6xHI=;\n\tb=Zkw4eQyb6/gDvQVp3jzEIdfOTphTZSU2CQfgZeMfRNDAukKxtCeXNCocbfOwczlgla\n\taP/vVb/TVv+K+Gdr35U+ZTajj5oNkWXCD/2cglf9Chkeim+9+l9L1RFNK2Jno1+8wSY/\n\tYvJWIs5bSt05s0Cpei6K8VlYH9/4X9G8H+uitNmXf3j6lZIVNAVYBqz0HX48qs/89h6x\n\tsqN750KpCxY8ejh49TRuExasE6iv9Fh4j6my/y1pEYYJV/AHdtWq7M06KiyXw18eV9ge\n\tL5hBiX47QIBjMzIEqk+ib2GUyzzswUbzwj4ujj4LqUpT7idf0WRmZGIe8cyOtZyNBqjc\n\t20JQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769424183; x=1770028983;\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=mgB6MrQvgMJiEZfORtJ9tLgqcmb2wkUK6G66JSN6xHI=;\n\tb=hspEaiDDJE928uHEYyoxtWfLbDxj+ZKVebzAKFd+4RzRGN12VkYPdYZiWlNZjmAVRF\n\tUd4V+CaA9vC+DHMntIx9eQIlB3rlHRQRr+SYKoWi3h0Thq/KTT0wxctBCuPEZAqxMpKO\n\t4FsSvIV7QV3ORba1SDTyuBZPhebAJYboFdL8K+OYPKnRbW2gcBzwehdQpNlF+vnrp0o6\n\tUJimX4ShY6VJWQutJ2Tgmo4HIbbApLNCiI/22isW9lOFCaQxQV7iO2nnDTAfHo6+Opnw\n\tmbi9RUz8TzH8UKHzlG2m5Np2d6/xHdE4BtifUXiYki78WKeDzw7JVqxwR5J7TNTJvZum\n\tNkvg==",
        "X-Gm-Message-State": "AOJu0Yw7cr93L7JW17zhV5WwC3ngS0PzSXktfw5Qmq7p4gIBN5vtOrP5\n\tRHdwL9UItLTIhcpZzPx3VFMk0kOTXVx5KXLUoeeJT6hSCv1pKxnLM3D+UozgnQ==",
        "X-Gm-Gg": "AZuq6aKAlmYbyaR7Iz98HHlTpfFaAOzQl1SooWekUqz/F5/fH6jZdpB4YcA6OD1xDhK\n\tT87m6PqaqBxG5z/0lfaThMRERF1St7Y11JQHFBgrRmSP335pXxSvOWuuK45Nevxl2V/SQR3WVbP\n\tjfHU8Ff/oFi/WHehrWwGIi5M2T+MMtJ3ZUtsy9dD7cREdlMDSLaorz+hcT4LT7ClqhOLgYRIiFq\n\tSfW6tzr93SdRjk4V4ywt+/+ZtUC3nrocDw7/FuPDqOp9pMWzdLOMgwmVpvi6G1Pyl5B+N6V55G+\n\tdaxA7a+rd/bY676m1R1Cm93808+5hEeJj8EYW6SztGtB4aC7rAN0alSXvmcyd1bYpWozK+HV4h/\n\tPelw9JJHVu6rdmnHEHgCmTrd9TvJxkvfW3lnxv/FJhCBECWNjEGnSifE0z83gkYqBssdM83Tzrv\n\tL+UIm4jJM2oDK0h3oxlTaTMzaf5scMVKaEboBJWVyy1N+LQ954bjyUZToQxxUIvQb2ZwEJViz5i\n\tQ==",
        "X-Received": "by 2002:a17:907:1b18:b0:b80:4103:537e with SMTP id\n\ta640c23a62f3a-b8d2e89cfe6mr286424366b.53.1769424182505; \n\tMon, 26 Jan 2026 02:43:02 -0800 (PST)",
        "From": "Rick ten Wolde <rick.w.ten.wolde@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "xander.c.pronk@gmail.com, derekgielen@outlook.com,\n\t22012540@student.hhs.nl, \n\trick.w.ten.wolde@gmail.com, johannes.goede@oss.qualcomm.com,\n\tRick ten Wolde <rick_libcamera@wolde.info>",
        "Subject": "[PATCH 1/7] libcamera: software_isp: egl: Add gl_scale_param to\n\tcreateTexture2D()",
        "Date": "Mon, 26 Jan 2026 11:42:49 +0100",
        "Message-ID": "<20260126104256.119697-2-rick.w.ten.wolde@gmail.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20260126104256.119697-1-rick.w.ten.wolde@gmail.com>",
        "References": "<20260126104256.119697-1-rick.w.ten.wolde@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Mon, 26 Jan 2026 11:48:05 +0100",
        "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": "From: Xander Pronk <xander.c.pronk@gmail.com>\n\nAdd a gl_scale_param to createTexture2D() to allow overriding\nthe currently hardcoded GL_NEAREST value.\n\nCo-authored-by: Rick ten Wolde <rick_libcamera@wolde.info>\nSigned-off-by: Rick ten Wolde <rick_libcamera@wolde.info>\nSigned-off-by: Xander Pronk <xander.c.pronk@gmail.com>\n---\n include/libcamera/internal/egl.h | 2 +-\n src/libcamera/egl.cpp            | 7 ++++---\n 2 files changed, 5 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex a9292112..9c0504fb 100644\n--- a/include/libcamera/internal/egl.h\n+++ b/include/libcamera/internal/egl.h\n@@ -113,7 +113,7 @@ public:\n \tint createInputDMABufTexture2D(eGLImage &eglImage, int fd);\n \tint createOutputDMABufTexture2D(eGLImage &eglImage, int fd);\n \tvoid destroyDMABufTexture(eGLImage &eglImage);\n-\tvoid createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data);\n+\tvoid createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data, GLint gl_scale_param=GL_NEAREST);\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 0544056b..3565bfd3 100644\n--- a/src/libcamera/egl.cpp\n+++ b/src/libcamera/egl.cpp\n@@ -229,13 +229,14 @@ void eGL::destroyDMABufTexture(eGLImage &eglImage)\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+ * \\param[in] gl_scale_param GL texture filter setting\n  *\n  * Creates a 2D texture from a CPU-accessible memory buffer. The texture\n  * is configured with nearest filtering and clamp-to-edge wrapping. This\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, GLint format, uint32_t width, uint32_t height, void *data, GLint gl_scale_param)\n {\n \tASSERT(tid_ == Thread::currentId());\n \n@@ -246,8 +247,8 @@ void eGL::createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint\n \tglTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data);\n \n \t// Nearest filtering\n-\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n-\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n+\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_scale_param);\n+\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_scale_param);\n \n \t// Wrap to edge to avoid edge artifacts\n \tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n",
    "prefixes": [
        "1/7"
    ]
}