[{"id":38916,"web_url":"https://patchwork.libcamera.org/comment/38916/","msgid":"<33a76f96-ad4d-42a9-8609-855134d541d2@collabora.com>","date":"2026-05-18T20:39:04","subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Sorry, there are some CI errors around the format parameter and the \ninclude ordering - already fixed locally for v3.\n\nOn 18.05.26 22:15, Robert Mader wrote:\n> The parameters - format, width, height and stride - never change. Set them\n> during construction and remove them from createTexture2D(), making the\n> later match createInputDMABufTexture2D() and createOutputDMABufTexture2D().\n>\n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> ---\n>   include/libcamera/internal/egl.h           |  7 +++---\n>   src/libcamera/egl.cpp                      | 29 +++++++++++++++++-----\n>   src/libcamera/software_isp/debayer_egl.cpp | 12 ++++-----\n>   3 files changed, 33 insertions(+), 15 deletions(-)\n>\n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 0ad2320b1..8d80d6fb5 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -57,8 +57,8 @@ public:\n>   \t * \\param[in] texture_unit OpenGL texture unit\n>   \t * \\param[in] texture_unit_uniform_id Shader uniform ID\n>   \t */\n> -\teGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)\n> -\t\t: width_(width), height_(height), stride_(stride),\n> +\teGLImage(GLint format, uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)\n> +\t\t: format_(format), width_(width), height_(height), stride_(stride),\n>   \t\t  framesize_(stride * height),\n>   \t\t  texture_unit_uniform_id_(texture_unit_uniform_id),\n>   \t\t  texture_unit_(texture_unit)\n> @@ -79,6 +79,7 @@ public:\n>   \t\tglDeleteTextures(1, &texture_);\n>   \t}\n>   \n> +\tGLint format_;\n>   \tuint32_t width_; /**< Image width in pixels */\n>   \tuint32_t height_; /**< Image height in pixels */\n>   \tuint32_t stride_; /**< Row stride in bytes */\n> @@ -103,7 +104,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 357918711..b8f5d9b85 100644\n> --- a/src/libcamera/egl.cpp\n> +++ b/src/libcamera/egl.cpp\n> @@ -14,6 +14,8 @@\n>   #include <sys/mman.h>\n>   #include <unistd.h>\n>   \n> +#include <GLES3/gl32.h>\n> +\n>   #include <linux/dma-buf.h>\n>   #include <linux/dma-heap.h>\n>   #include <linux/drm_fourcc.h>\n> @@ -111,13 +113,31 @@ void eGL::syncOutput()\n>    */\n>   int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>   {\n> +\tEGLint drm_format;\n> +\n>   \tASSERT(tid_ == Thread::currentId());\n>   \n> +\tswitch (eglImage.format_) {\n> +\tcase GL_RED:\n> +\tcase GL_LUMINANCE:\n> +\t\tdrm_format = DRM_FORMAT_R8;\n> +\t\tbreak;\n> +\tcase GL_RG:\n> +\t\tdrm_format = DRM_FORMAT_RG88;\n> +\t\tbreak;\n> +\tcase GL_RGBA:\n> +\t\tdrm_format = DRM_FORMAT_ARGB8888;\n> +\t\tbreak;\n> +\tdefault:\n> +\t\tLOG(eGL, Error) << \"unhandled GL format\";\n> +\t\treturn -ENODEV;\n> +\t}\n> +\n>   \t// clang-format off\n>   \tEGLint image_attrs[] = {\n>   \t\tEGL_WIDTH, (EGLint)eglImage.width_,\n>   \t\tEGL_HEIGHT, (EGLint)eglImage.height_,\n> -\t\tEGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_ARGB8888,\n> +\t\tEGL_LINUX_DRM_FOURCC_EXT, drm_format,\n>   \t\tEGL_DMA_BUF_PLANE0_FD_EXT, fd,\n>   \t\tEGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,\n>   \t\tEGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)eglImage.stride_,\n> @@ -207,9 +227,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> @@ -217,7 +234,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> @@ -225,7 +242,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 eae4c57f4..a217e3798 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> @@ -582,14 +582,14 @@ int DebayerEGL::start()\n>   \n>   \tLOG(Debayer, Debug) << \"Available fragment shader texture units \" << maxTextureImageUnits;\n>   \n> +\tif (initBayerShaders(inputPixelFormat_, outputPixelFormat_))\n> +\t\treturn -EINVAL;\n> +\n>   \t/* Raw bayer input as texture */\n> -\teglImageBayerIn_ = std::make_unique<eGLImage>(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>(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);\n> -\n> -\tif (initBayerShaders(inputPixelFormat_, outputPixelFormat_))\n> -\t\treturn -EINVAL;\n> +\teglImageBayerOut_ = std::make_unique<eGLImage>(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);\n>   \n>   \treturn 0;\n>   }","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 A03FFBDCBC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 May 2026 20:39:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D7AF062FD3;\n\tMon, 18 May 2026 22:39:13 +0200 (CEST)","from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com\n\t[136.143.188.12])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8404D62FB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 May 2026 22:39:11 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1779136747105404.1414569429388;\n\tMon, 18 May 2026 13:39:07 -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=\"Rl5EG/zN\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1779136748; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=QqbplSOqY+ldn4tiXSOvdLhwf374XJo/v1Yi+JfhJMBrhOx790559zDVs2YKW8pCpiqtrv7x9Pw/jhBKjOrQFKQ58X/xgyzHEky73JC1KCeFqyWHYYRwpC56Cnr+a+sWUgoD08L/34KsX0CpVYcq/Oj/DazFyyhXPCgC+G0Wtlo=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1779136748;\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=zUk6F7mWOEVCWqhRJObYlIVUR0TqPJLSY7whyxSapoo=; \n\tb=dlM2uYefLxEALWPtXfTtBUG61+dyJR4QO0KE8iTnt1tYEG4qHFYXLyOmax1JBXKzuy21HMSudGdcVlPI06sAIGcYRQYsJd7LSgHSwz9uLWF1tadxUBn7AAeAV+O8TqbZdWUTbP7KOoRJtw/qKi8K+VNce+W2Nro1jL6gjvnTNgk=","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=1779136748;\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=zUk6F7mWOEVCWqhRJObYlIVUR0TqPJLSY7whyxSapoo=;\n\tb=Rl5EG/zN92PnKR0wqTeLIf7+zXjYT0O/XhDH2UILMZbsyRrcR6eyvTPxsE1n3FSg\n\tcpMZOWLfBJ+fk1aDuBT948M70kGqit5UTxGrvgZwmhljE59+chuqNqyLPjyGCSLFCWu\n\tsPR59kojXMGiQspOxGB3tU02KE4Tew2Xkh2XrmNg=","Message-ID":"<33a76f96-ad4d-42a9-8609-855134d541d2@collabora.com>","Date":"Mon, 18 May 2026 22:39:04 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","To":"libcamera-devel@lists.libcamera.org","References":"<20260518201508.140849-1-robert.mader@collabora.com>\n\t<20260518201508.140849-2-robert.mader@collabora.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260518201508.140849-2-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":38921,"web_url":"https://patchwork.libcamera.org/comment/38921/","msgid":"<6d723140-46fa-4c68-bd68-6883973594b7@linaro.org>","date":"2026-05-19T15:54:42","subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 18/05/2026 21:15, Robert Mader wrote:\n> The parameters - format, width, height and stride - never change. Set them\n> during construction and remove them from createTexture2D(), making the\n> later match createInputDMABufTexture2D() and createOutputDMABufTexture2D().\n\nYou've a fair bit more than just moving values into a constructor in \nthis patch.\n\nI think this patch needs to be decomposed into separate bits.\n\n> \n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> ---\n>   include/libcamera/internal/egl.h           |  7 +++---\n>   src/libcamera/egl.cpp                      | 29 +++++++++++++++++-----\n>   src/libcamera/software_isp/debayer_egl.cpp | 12 ++++-----\n>   3 files changed, 33 insertions(+), 15 deletions(-)\n> \n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 0ad2320b1..8d80d6fb5 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -57,8 +57,8 @@ public:\n>   \t * \\param[in] texture_unit OpenGL texture unit\n>   \t * \\param[in] texture_unit_uniform_id Shader uniform ID\n>   \t */\n> -\teGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)\n> -\t\t: width_(width), height_(height), stride_(stride),\n> +\teGLImage(GLint format, uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)\n> +\t\t: format_(format), width_(width), height_(height), stride_(stride),\n>   \t\t  framesize_(stride * height),\n>   \t\t  texture_unit_uniform_id_(texture_unit_uniform_id),\n>   \t\t  texture_unit_(texture_unit)\n> @@ -79,6 +79,7 @@ public:\n>   \t\tglDeleteTextures(1, &texture_);\n>   \t}\n> \n> +\tGLint format_;\n>   \tuint32_t width_; /**< Image width in pixels */\n>   \tuint32_t height_; /**< Image height in pixels */\n>   \tuint32_t stride_; /**< Row stride in bytes */\n> @@ -103,7 +104,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 357918711..b8f5d9b85 100644\n> --- a/src/libcamera/egl.cpp\n> +++ b/src/libcamera/egl.cpp\n> @@ -14,6 +14,8 @@\n>   #include <sys/mman.h>\n>   #include <unistd.h>\n> \n> +#include <GLES3/gl32.h>\n> +\n>   #include <linux/dma-buf.h>\n>   #include <linux/dma-heap.h>\n>   #include <linux/drm_fourcc.h>\n> @@ -111,13 +113,31 @@ void eGL::syncOutput()\n>    */\n>   int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>   {\n> +\tEGLint drm_format;\n> +\n>   \tASSERT(tid_ == Thread::currentId());\n> \n> +\tswitch (eglImage.format_) {\n> +\tcase GL_RED:\n> +\tcase GL_LUMINANCE:\n> +\t\tdrm_format = DRM_FORMAT_R8;\n> +\t\tbreak;\n> +\tcase GL_RG:\n> +\t\tdrm_format = DRM_FORMAT_RG88;\n> +\t\tbreak;\n> +\tcase GL_RGBA:\n> +\t\tdrm_format = DRM_FORMAT_ARGB8888;\n> +\t\tbreak;\n> +\tdefault:\n> +\t\tLOG(eGL, Error) << \"unhandled GL format\";\n> +\t\treturn -ENODEV;\n> +\t}\n> +\n>   \t// clang-format off\n>   \tEGLint image_attrs[] = {\n>   \t\tEGL_WIDTH, (EGLint)eglImage.width_,\n>   \t\tEGL_HEIGHT, (EGLint)eglImage.height_,\n> -\t\tEGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_ARGB8888,\n> +\t\tEGL_LINUX_DRM_FOURCC_EXT, drm_format,\n>   \t\tEGL_DMA_BUF_PLANE0_FD_EXT, fd,\n>   \t\tEGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,\n>   \t\tEGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)eglImage.stride_,\n> @@ -207,9 +227,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> @@ -217,7 +234,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> @@ -225,7 +242,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 eae4c57f4..a217e3798 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> @@ -582,14 +582,14 @@ int DebayerEGL::start()\n> \n>   \tLOG(Debayer, Debug) << \"Available fragment shader texture units \" << maxTextureImageUnits;\n> \n> +\tif (initBayerShaders(inputPixelFormat_, outputPixelFormat_))\n> +\t\treturn -EINVAL;\n> +\n>   \t/* Raw bayer input as texture */\n> -\teglImageBayerIn_ = std::make_unique<eGLImage>(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>(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);\n> -\n> -\tif (initBayerShaders(inputPixelFormat_, outputPixelFormat_))\n> -\t\treturn -EINVAL;\n> +\teglImageBayerOut_ = std::make_unique<eGLImage>(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);\n> \n>   \treturn 0;\n>   }\n> --\n> 2.54.0\n>","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 B83FFBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 May 2026 15:54:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 69BF963024;\n\tTue, 19 May 2026 17:54:47 +0200 (CEST)","from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 480D362DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 May 2026 17:54:45 +0200 (CEST)","by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-488b0e1b870so56152885e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 May 2026 08:54:45 -0700 (PDT)","from [192.168.0.35] ([51.37.145.233])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-48fe4c8d39esm339232285e9.7.2026.05.19.08.54.43\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tTue, 19 May 2026 08:54:43 -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=\"nmt3cjK0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1779206085; x=1779810885;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:content-language\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=wYDJLnLwtdH670EF5N90eFN1ZpVqGnfH4SCcNltYZAA=;\n\tb=nmt3cjK0JzmbxpQSHpdPHQx/yHELWyfetPVbkzUtIBrB7rqdVVNL+59J8GRF0opwqo\n\t+QkY8GtuapXlPnp3n7nWP34B3LqfHPCPGonAEyqQVvGGvPHYnID+PKnf+7V7rZchD/le\n\t25EN1cNgkvnruRnh8m2MTUSu5LCDfsiCiNwx1MA8oPsQzXLDnfMLFKALZuSwDCTddXFR\n\tTjbrR737Kb1cWUkt5MWvX8cDI+AyQqo9yy6sDJQW3Aj2SPT7E0yxg8uQgFoT5oD+YaYG\n\tvB7fUlgDa7ksxqY5RkDltQetgbcJdpnpLXDQR4LVyZvE0PJ68bxeZbkFx2tLmEVkUzzq\n\tJx8A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1779206085; x=1779810885;\n\th=content-transfer-encoding:in-reply-to:from:content-language\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=wYDJLnLwtdH670EF5N90eFN1ZpVqGnfH4SCcNltYZAA=;\n\tb=aht7L3OqMKe5mUj2d31tVFGpFPPFuuoO/tWZOtO3V2tYPusxndiNCX/8ir6nJwp49C\n\tnsj1DSYtXATv4IA4fSq2iEFiLUkUnu2+18vO/sPGfE+8JunQKgTQpN3prcbV/DJobUKt\n\tcceLNJ0ixluBQY5AfWbGH7Wspu/Hv/SzMFn2uxSlBPtKl/NGA66TcxpuQhBv09CTtpRD\n\tePZwOEgQMXTz4QzE82V0dKhr9KuGJRact7X+BUr0fCDHQ0WW/i97q2ZwT/DcDmauQ5Kv\n\t9+WFFpz83DySZb4UM/GZHv8zBRKolgrFkAVP9+7gbPy5eLFep3EmVg6HJfe/dfg2ECTv\n\tkB1w==","X-Forwarded-Encrypted":"i=1;\n\tAFNElJ8+ZwrDYtRhxdShDn37k74ALpUnIC1gT6WdYYMH3QRqfwkk7+eM0hUUrjNcebFFFksWF+UI/ZhXv0AizTk1G5I=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Ywzet2dljYsQHREaj2osi+HQDhLznTPGp5JGzQsR5U9PJV2alny\n\tYG2wWnhu+T1Kz5aePlF05oAGMQxV0YRNLcGYw9qxrBo/mcvTZSbASqgsPOjLjkknoRu8afXurvR\n\t0EM09xMY=","X-Gm-Gg":"Acq92OGH5nRGVSymtFUMm3GNgNCM7ejelfcFjaAC1OHKRTKbltOFZhzC6yRo/O2iqV7\n\tNahqD6KFbA7dnyq9iIEwHklSQztHRwHdYAbGubeCZLgyfjMi3UV9Wxrgjs0run0cQi0Fmb2+TKF\n\tWgd8JJZYyxLvUESU+VuwK18uEDvxHuOVLyWMzyFfzarivvsiI1RZfxrXF3cljocidLPmMpCmCXN\n\tt6GjEibek+greIicwz3FjvuCWhzYZMpK7s+GzgihYxBhtLoh7fLIJZZpZItAe0LjQMrtr6DeQIJ\n\tuCpNUWA/GvQ6xEwqJKw2exHWnERPfVplLDqSgVmd/gJoUzBPymWkctaLeFgexZIjf05CSsx+vwU\n\taRdknBEWjP/snBt8C8mDanKR1x4k9VW1vhgfMfxz8GUFD/tix4OtPpJAk8EgJW3PuyP7AK42uIf\n\tA+I6CzV+ABeplWFyw71rnUTmDBpOPXpGpVMg==","X-Received":"by 2002:a05:600c:4e47:b0:48f:d835:e0ff with SMTP id\n\t5b1f17b1804b1-48fe63265a1mr341867145e9.17.1779206084592; \n\tTue, 19 May 2026 08:54:44 -0700 (PDT)","Message-ID":"<6d723140-46fa-4c68-bd68-6883973594b7@linaro.org>","Date":"Tue, 19 May 2026 16:54:42 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260518201508.140849-1-robert.mader@collabora.com>\n\t<g7nEdvSyCWve-ahHr_8GbRnRUC5ev8nHjXWLQg6Bs704mvRqhCCMgsmK14moF2D0rJfo-2LqoLub-wZrR3tkhw==@protonmail.internalid>\n\t<20260518201508.140849-2-robert.mader@collabora.com>","Content-Language":"en-US","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","In-Reply-To":"<20260518201508.140849-2-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":38926,"web_url":"https://patchwork.libcamera.org/comment/38926/","msgid":"<db10e4cf-2676-44e2-8eb6-77ceda36b186@collabora.com>","date":"2026-05-19T19:40:33","subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi, thanks for the review!\n\nOn 19.05.26 17:54, Bryan O'Donoghue wrote:\n> On 18/05/2026 21:15, Robert Mader wrote:\n>> The parameters - format, width, height and stride - never change. Set \n>> them\n>> during construction and remove them from createTexture2D(), making the\n>> later match createInputDMABufTexture2D() and \n>> createOutputDMABufTexture2D().\n>\n> You've a fair bit more than just moving values into a constructor in \n> this patch.\n>\n> I think this patch needs to be decomposed into separate bits.\nSplit into two commits in v3","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 C1588BDCBC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 May 2026 19:40:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F75A6302C;\n\tTue, 19 May 2026 21:40:43 +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 D898063020\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 May 2026 21:40:41 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1779219635961202.69475823869823; \n\tTue, 19 May 2026 12:40:35 -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=\"faJVIGU+\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1779219638; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=RPYF+gAZBLbQ9JvGkznOsO7Kkrunn+pGpmTezSI7huyCVIe1mt1ZXGk1FmZc+1+xQrCieR/YK/ywAr1uAoXdf5XYCVeYXYLKLTwkM+3X360vN1D4xjJOnJSpc+4OwqqMDdOuhVTrilYLX7vkVTQC8H1pb1qnrSVpKXPnLA0KE7A=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1779219638;\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=Eawlbilmg9ueTaBzyvJEGk5vhWBRty3dQSNHUDM9Gmg=; \n\tb=IxGLI/lB2qdI7KEhTulmOLqt3usgBvBf93sSKgRUz8X5j4KENRr9T6i3I7YWfT+6/58vZGW1a3tcufkRomfxEN8wo2x2s1c9Sd+tgfozAaoABsQxDkNxNs0Y8bZtZCxLL1pU5fB6a7mrRW1rEXl81wm3RWQ2XoGdkuZpmxEZgcM=","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=1779219638;\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=Eawlbilmg9ueTaBzyvJEGk5vhWBRty3dQSNHUDM9Gmg=;\n\tb=faJVIGU+H+gDLtletlucUz7CnWABVtVjCjr5wlGPSrrrONrPP8bovr80L0/iurnJ\n\ts7GWeEwMdOBz2/+ALAGm1hoR46O6Izq8u6iehmGqp2t2YKaxSMb0ZYvVduQS7hteSyb\n\tNJZK/1vZnidXJUcl5tA0DD5zab4lYItIdhKCVHsc=","Message-ID":"<db10e4cf-2676-44e2-8eb6-77ceda36b186@collabora.com>","Date":"Tue, 19 May 2026 21:40:33 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 1/4] egl: Set more eGLImage paramters in constructor","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260518201508.140849-1-robert.mader@collabora.com>\n\t<g7nEdvSyCWve-ahHr_8GbRnRUC5ev8nHjXWLQg6Bs704mvRqhCCMgsmK14moF2D0rJfo-2LqoLub-wZrR3tkhw==@protonmail.internalid>\n\t<20260518201508.140849-2-robert.mader@collabora.com>\n\t<6d723140-46fa-4c68-bd68-6883973594b7@linaro.org>","Content-Language":"en-US, de-DE, en-GB","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<6d723140-46fa-4c68-bd68-6883973594b7@linaro.org>","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>"}}]