[{"id":38978,"web_url":"https://patchwork.libcamera.org/comment/38978/","msgid":"<f5e709db-6d30-4d0a-b6d6-a19bb941e28d@collabora.com>","date":"2026-06-02T11:21:15","subject":"Re: [PATCH v5 2/5] egl: Remove some parameters from\n\tcreateTexture2D()","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi Bryan, thanks for R-B on the last patch! IIRC you were also ok with \nthis patch, assuming that it shouldn't conflict with your multi-stage \nseries - mind giving a R-B as well so we can land the series? :) Or do \nyou still have concerns?\n\nOn 27.05.26 10:15, Robert Mader wrote:\n> And use the values set in the constructor instead, bringing the\n> function in line with createInputDMABufTexture2D() and\n> createOutputDMABufTexture2D().\n>\n> Adopt the value passed into the constructor accordingly, which\n> previously was never used.\n>\n> Signed-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(-)\n>\n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 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();\n> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\n> index 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);\n> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n> index 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);","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 4DA72C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Jun 2026 11:21:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 227596303C;\n\tTue,  2 Jun 2026 13:21:26 +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 B4AF761754\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Jun 2026 13:21:24 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1780399277609599.7353776452869;\n\tTue, 2 Jun 2026 04:21:17 -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=\"E7GyaMFj\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1780399281; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=ZmVn/OW85whycW/KbplPQkHRP2XHOhYOepA1yCFMFKhJ80996mP77Ct0w740iMFadG8d9OIV7cPwSEYwglfI58M8+GgZIZuHoWOYQA5dMZMoVlmX9PQmQNV6MwXS0DYyvdO6YgGIldZz1T79ZDpRoCsLcV4hSUp8sVOUMTQAG00=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1780399281;\n\th=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=kNG4lw77hiATTNclmdUXmexS+NwRgZWq+9y7iLltutY=; \n\tb=cUrMPPRHlp3nBP1I74z4Vq4PBoT1ts3y9dVQvmGxaYNv79uSkn8uBGRoz1AZExtCxIPD/0YRWXO61a2eubMB2+PWt2AEAqdnCpMbclYmah0HHu3kSfnOquzDwSlNtQ2GwUlPnkEu96XMbQGfQZMVxdTF6kt7SLFCbgNYitCCfXA=","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=1780399281;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc;\n\tbh=kNG4lw77hiATTNclmdUXmexS+NwRgZWq+9y7iLltutY=;\n\tb=E7GyaMFjCdXt71HrBV3xjHg/cBq5fiBEN5xXfIScZ82H5C91HnpuSp6ZLeshyXWu\n\tptMRt4OPUQgokhcEkVMeOyyWj9WFBwmwKKpOeCUm/QEZVU9Z0A0j5HinsUoWFByOE6I\n\tB6fnm4LdwzvWrtLLOODcoSPXKXGXkPFuZ7ukrK7A=","Message-ID":"<f5e709db-6d30-4d0a-b6d6-a19bb941e28d@collabora.com>","Date":"Tue, 2 Jun 2026 13:21:15 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5 2/5] egl: Remove some parameters from\n\tcreateTexture2D()","To":"Bryan O'Donoghue <bod.linux@nxsw.ie>, libcamera-devel@lists.libcamera.org","References":"<20260527081534.20245-1-robert.mader@collabora.com>\n\t<20260527081534.20245-3-robert.mader@collabora.com>","Content-Language":"en-US, de-DE, en-GB","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260527081534.20245-3-robert.mader@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>"}},{"id":38985,"web_url":"https://patchwork.libcamera.org/comment/38985/","msgid":"<3d2d28b9-1671-4146-9d79-63c5716d60a5@linaro.org>","date":"2026-06-03T09:45:56","subject":"Re: [PATCH v5 2/5] egl: Remove some parameters from\n\tcreateTexture2D()","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 02/06/2026 12:21, Robert Mader wrote:\n> Hi Bryan, thanks for R-B on the last patch! IIRC you were also ok with\n> this patch, assuming that it shouldn't conflict with your multi-stage\n> series - mind giving a R-B as well so we can land the series? :) Or do\n> you still have concerns?\n\nStill not massively convinced about this one but fine by me.\n\nReviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n\n---\nbod","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 42B97C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Jun 2026 09:46:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 282BC630A2;\n\tWed,  3 Jun 2026 11:46:00 +0200 (CEST)","from mail-ed1-x536.google.com (mail-ed1-x536.google.com\n\t[IPv6:2a00:1450:4864:20::536])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77F186175A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jun 2026 11:45:58 +0200 (CEST)","by mail-ed1-x536.google.com with SMTP id\n\t4fb4d7f45d1cf-68bd167797dso71136a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 03 Jun 2026 02:45:58 -0700 (PDT)","from [192.168.0.101] ([109.77.42.178])\n\tby smtp.gmail.com with ESMTPSA id\n\t4fb4d7f45d1cf-68e65868049sm856547a12.24.2026.06.03.02.45.56\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tWed, 03 Jun 2026 02:45:57 -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=\"Wyr2S5nq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1780479958; x=1781084758;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:to:subject:user-agent:mime-version:date:message-id:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=AanVnZg+nk1zShcHYumBAWwALaeeHNqamdPLjofEixU=;\n\tb=Wyr2S5nqdqzi2qwUqeuvGlIG8yAyYiBxMxbdwCgOob4uVdp+9LgS649R5j/B24fEta\n\tJwiJFA+ySTC9W1Dn9W44WtHlla9ZvMYESi7GAyFH4UIzwNLzRSoVVlARUPvCwf31J+Tx\n\tM2+v5xtGAk7DSw+El4mSpegYQMpT8vvXLk3PdpRJFn9FgLoP1sCE501DydiaChP31pFu\n\tOBY6mnWwi1IgmTc+892qaHKBQWQ3T1fzyCGhnGG7SWKyPP7gTVQ44CunvtjpzMkbBMF3\n\tCQrwRM3ijB2p9gtbDmK8lCDAuu46mDfwTHrfK2ssIQtxBJCaJgMPRnpv3Sm4qojFVyMU\n\tcF1Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1780479958; x=1781084758;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=AanVnZg+nk1zShcHYumBAWwALaeeHNqamdPLjofEixU=;\n\tb=FaqOoVAs4VLitPQw63PvkVyyrvZ6vFgPBhoIK5VMNDMJXfkYf+OXYw+qn7pzAu02Bh\n\tOyocBcgjIxy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"by 2002:a05:6402:13d1:b0:66e:43a4:448e with SMTP id\n\t4fb4d7f45d1cf-68e710f21e2mr1343450a12.17.1780479957651; \n\tWed, 03 Jun 2026 02:45:57 -0700 (PDT)","Message-ID":"<3d2d28b9-1671-4146-9d79-63c5716d60a5@linaro.org>","Date":"Wed, 3 Jun 2026 10:45:56 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5 2/5] egl: Remove some parameters from\n\tcreateTexture2D()","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260527081534.20245-1-robert.mader@collabora.com>\n\t<20260527081534.20245-3-robert.mader@collabora.com>\n\t<J5zzDRus6eSczxnJHnaIkuxZcdTSfEK0kHm8w5zyXqQQQn7utsIolVdyusJZKRK4GLMNhOkEPc_nXJ1ZFWQRJg==@protonmail.internalid>\n\t<f5e709db-6d30-4d0a-b6d6-a19bb941e28d@collabora.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<f5e709db-6d30-4d0a-b6d6-a19bb941e28d@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>"}}]