Patch Detail
Show a patch.
GET /api/1.1/patches/26522/?format=api
{ "id": 26522, "url": "https://patchwork.libcamera.org/api/1.1/patches/26522/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26522/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20260420183949.110548-2-mzamazal@redhat.com>", "date": "2026-04-20T18:39:39", "name": "[RFC,v2,1/8] libcamera: software_isp: egl: Add gl_scale_param to createTexture2D()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "79ab155ffc3f1a694205fef7616f15d4a3e13745", "submitter": { "id": 177, "url": "https://patchwork.libcamera.org/api/1.1/people/177/?format=api", "name": "Milan Zamazal", "email": "mzamazal@redhat.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26522/mbox/", "series": [ { "id": 5883, "url": "https://patchwork.libcamera.org/api/1.1/series/5883/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5883", "date": "2026-04-20T18:39:38", "name": "LSC for SoftISP simple pipeline", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5883/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26522/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26522/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 C86ACBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Apr 2026 18:40:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6318762EE7;\n\tMon, 20 Apr 2026 20:40:08 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 66D7862EC0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Apr 2026 20:40:06 +0200 (CEST)", "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-271-3WdLyOHRP_G5vvivW0RpWg-1;\n\tMon, 20 Apr 2026 14:40:01 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.93])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 7F1D91800352; Mon, 20 Apr 2026 18:39:59 +0000 (UTC)", "from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.48.16])\n\tby mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id F1071180047F; Mon, 20 Apr 2026 18:39:56 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"WpQRQb2j\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1776710405;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=GQ4tlzw/XZCxbfakwxkGebHivcMGTk5iZAwLF1kv+XU=;\n\tb=WpQRQb2jFsl4MSKiEkCr8Q1BFbPf5RtZVbEDnbawJJXIRWu+fDPrD0PqMcd9hc4318y4kn\n\tEjfYPrWcxqo2832kS55VUL07EO1rBXYLV+ewAWG0Gul6fyIGwNsjxfHu+y6JusXZyRcVTY\n\tDbbEgso6X9LQbM31eaCPr+EfTEEU9R4=", "X-MC-Unique": "3WdLyOHRP_G5vvivW0RpWg-1", "X-Mimecast-MFC-AGG-ID": "3WdLyOHRP_G5vvivW0RpWg_1776710400", "From": "Milan Zamazal <mzamazal@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Xander Pronk <xander.c.pronk@gmail.com>,\n\tHans de Goede <johannes.goede@oss.qualcomm.com>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tRick ten Wolde <rick_libcamera@wolde.info>,\n\tMilan Zamazal <mzamazal@redhat.com>", "Subject": "[RFC PATCH v2 1/8] libcamera: software_isp: egl: Add gl_scale_param\n\tto createTexture2D()", "Date": "Mon, 20 Apr 2026 20:39:39 +0200", "Message-ID": "<20260420183949.110548-2-mzamazal@redhat.com>", "In-Reply-To": "<20260420183949.110548-1-mzamazal@redhat.com>", "References": "<20260420183949.110548-1-mzamazal@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "Cs1AqdhlLgsf8xcO0s_tpyR6kVNvfmrNlOu9zC5ZtQI_1776710400", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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. This is needed for\ngrid-based lens shading interpolation, which is implemented in followup\npatches.\n\nReviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\nCo-developed-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>\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\n---\n include/libcamera/internal/egl.h | 3 ++-\n src/libcamera/egl.cpp | 8 +++++---\n src/libcamera/software_isp/debayer_egl.cpp | 4 +++-\n 3 files changed, 10 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex 8a2d96d7a..37cd8dc83 100644\n--- a/include/libcamera/internal/egl.h\n+++ b/include/libcamera/internal/egl.h\n@@ -105,7 +105,8 @@ 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,\n+\t\t\t const void *data, GLint glFilterParam);\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 5b9bbf410..6ba6888c4 100644\n--- a/src/libcamera/egl.cpp\n+++ b/src/libcamera/egl.cpp\n@@ -229,13 +229,15 @@ 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] glFilterParam 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,\n+\t\t\t const void *data, GLint glFilterParam)\n {\n \tASSERT(tid_ == Thread::currentId());\n \n@@ -246,8 +248,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, glFilterParam);\n+\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glFilterParam);\n \n \t// Wrap to edge to avoid edge artifacts\n \tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\ndiff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\nindex 2ad258bca..08e513eaf 100644\n--- a/src/libcamera/software_isp/debayer_egl.cpp\n+++ b/src/libcamera/software_isp/debayer_egl.cpp\n@@ -502,7 +502,9 @@ 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_, glFormat_,\n+\t\t\t inputConfig_.stride / bytesPerPixel_, height_,\n+\t\t\t in.planes()[0].data(), GL_NEAREST);\n \n \t/* Generate the output render framebuffer as render to texture */\n \tegl_.createOutputDMABufTexture2D(*eglImageBayerOut_, out_fd);\n", "prefixes": [ "RFC", "v2", "1/8" ] }