Patch Detail
Show a patch.
GET /api/patches/26959/?format=api
{ "id": 26959, "url": "https://patchwork.libcamera.org/api/patches/26959/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26959/", "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-28-bryan.odonoghue@linaro.org>", "date": "2026-06-18T12:22:40", "name": "[27/30] libcamera: software_isp: egl: Add updateInputTexture2D", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "740dbd6e74ddbaa1d67ff81dfcba81d897ead70b", "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/26959/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/26959/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26959/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 98E03C3332\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 12:23:39 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09F3E656DD;\n\tThu, 18 Jun 2026 14:23:39 +0200 (CEST)", "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9649262C75\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 14:23:18 +0200 (CEST)", "by mail-wm1-x330.google.com with SMTP id\n\t5b1f17b1804b1-490b12270b3so4543205e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 05:23:18 -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.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2026 05:23:17 -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=\"W0rbTAmm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1781785398; x=1782390198;\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=jk6VjmJB52VBfryw+VvVOx5GPW7iwAzDIFqNQWEf2q0=;\n\tb=W0rbTAmmlkNMdDRYN7Slug0qb4gfL51I5Ib1Tv+RuBWfPxtfrWbHi5GaWkn4wg2AYj\n\td2QcVEyk2tRmaCp23qktEhBEtJEb/nHh29PyAbkcxLVXNwvunsZsfiXu6uW7NAZTZFP3\n\t4CZfQlXaWhmRHoYyQF6MghjG0UKHTNcWVkb/GYfILsH1YGOFqyGHQGRszYtCilsRgLDc\n\tQbTkvw3OtIs0o9MaPF4Eb53Mrp1/TaQRjbYb4dEP8jEhkVO59fgEQPvrWctQ5KO6+Uxz\n\tdvnuCvKaPTIaRbRMrSD5y3yihhUd0oFYMpb8RL9xwLTNqcgZHcz89cALHZNfbfWQQbbz\n\tY+2g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1781785398; x=1782390198;\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=jk6VjmJB52VBfryw+VvVOx5GPW7iwAzDIFqNQWEf2q0=;\n\tb=rs5x4ajLI6Cc66BAleirndx0AYcu9fBlH6UfAu9i5wmgfq1uNrkUcOmblyUkTTBWK/\n\t0aTpft6jONJLrWYI+y+vvIqGw2mTVvXsJHJEd72UBuT00fmhHuWOdXlrirfDlCeaSCAa\n\tJxeJSY5qqaHcxNNRzGu6+dnyoCkMsZBNtlrBQYQtRBTkG/sZJxCreByh0URTCWZTTcdi\n\tOee0LBG7gv0bZwqs8nOovrmAmfe9ws2cJnkSZSMUTw3wlHE7Cd4Z3En5WihSJMqx7GtG\n\tWcjM+StIiBrferGwbDcf6mBEabHrwO0kguP6knyjGcDFEmgHiSgi1OGibnbXLbQGz2pw\n\t9m3A==", "X-Gm-Message-State": "AOJu0YxxEj2vTLtZ5/a8MMxQGt91vTaTxzrpnjbW7NEcsBuzeZ9JLy9V\n\ts4nqADHc5cM4CxXUYjWwruXzGy6W/F7AhkygeVZRcoIaIkafFhSM+qXp/f1SOUWn0KcweLUUnl8\n\tsO9ZVcD0=", "X-Gm-Gg": "AfdE7cmdV9BJTVOXz+gs09PEh7DXmzqUo1IDHP8XBsgErFYeJEMjYacc6KUs1K2eV/4\n\t2mfMAbE4gyjFKjswAwDxj4VZe/6i8sKb+6y7jQP4g0ISrXwy7cj2dsx4P7FuOZ4UoSfOzoNMDmF\n\t5Xfxezu0kAFvtpWd3rwMdYeuL4lcHHOTZH6nsg5jahOVYlAhjAk6s0Sov+LitkO2eH7cv1yeHjK\n\tv4+OiEW+FQlhQB0Uh9Y3vANf7e7/66qgpYyMwdfua8ueby7hHLCVL2S9e3BAnZqcwsDvs6kr0hm\n\t0COoADtAlbGrneUzWw/nf0Tn3hMLfpspdIjxxoj0Gi7gWNigIFoA2Bd+KQ2yvWRBSI74rcUoPaV\n\ty9cQWCpGohXZnKlfXqPupfOnn9oHr1t/hnL01kr+XmeFCmFL8v80FmqffXluX0+n2d5f9DaTvIE\n\ts3W/jXNUM02zC1nNHxXWCFopEHtD+5", "X-Received": "by 2002:a05:600c:4e54:b0:492:328f:8623 with SMTP id\n\t5b1f17b1804b1-49234139d57mr135580655e9.31.1781785398158; \n\tThu, 18 Jun 2026 05:23:18 -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 27/30] libcamera: software_isp: egl: Add updateInputTexture2D", "Date": "Thu, 18 Jun 2026 13:22:40 +0100", "Message-ID": "<20260618122245.946138-28-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": "The internet box tells me that glTextSubImage2D lets us update a texture's\ndata only, instead of recreating the texture and uploading data.\n\nThis is a smallish optimisation but we are hunting for every possible cycle\nand watt so add the routine as precursor to using it in-place of\ncreateTexture2D on every upload cycle.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/egl.h | 1 +\n src/libcamera/egl.cpp | 27 +++++++++++++++++++++++++++\n 2 files changed, 28 insertions(+)", "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex 8f905416a..c9b3a4e81 100644\n--- a/include/libcamera/internal/egl.h\n+++ b/include/libcamera/internal/egl.h\n@@ -107,6 +107,7 @@ public:\n \tint createInputDMABufTexture2D(eGLImage &eglImage, int fd);\n \tint createOutputDMABufTexture2D(eGLImage &eglImage, int fd);\n \tvoid createInputTexture2D(eGLImage &eglImage, void *data);\n+\tvoid updateInputTexture2D(eGLImage &eglImage, void *data);\n \tvoid createOutputTexture2D(eGLImage &eglImage);\n \n \tint attachTextureToFBO(eGLImage &eglImage);\ndiff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\nindex 2fc10b800..fc1516634 100644\n--- a/src/libcamera/egl.cpp\n+++ b/src/libcamera/egl.cpp\n@@ -297,6 +297,33 @@ void eGL::createInputTexture2D(eGLImage &eglImage, void *data)\n \tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n }\n \n+void eGL::updateInputTexture2D(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// Update an already exsiting texture \n+\tglTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, eglImage.width_, eglImage.height_, format, type, data);\n+}\n+\n /**\n * \\brief Create a 2D texture attached to an FBO for render-to-texture\n * \\param[in,out] eglImage EGL image to associate with the texture\n", "prefixes": [ "27/30" ] }