[{"id":39461,"web_url":"https://patchwork.libcamera.org/comment/39461/","msgid":"<855x35lcb9.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-06-26T12:24:10","subject":"Re: [PATCH v3 4/8] libcamera: egl: Add createOutputTexture2D","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:\n\n> Creates a non-dmabuf texture attached to a frame-buffer-object FBO, which\n> allows for render-to-texture.\n>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>  include/libcamera/internal/egl.h |  1 +\n>  src/libcamera/egl.cpp            | 13 +++++++++++++\n>  2 files changed, 14 insertions(+)\n>\n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 4b0757afd..e24a726dc 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -108,6 +108,7 @@ public:\n>  \tint createInputDMABufTexture2D(eGLImage &eglImage, int fd);\n>  \tint createOutputDMABufTexture2D(eGLImage &eglImage, int fd);\n>  \tvoid createTexture2D(eGLImage &eglImage, void *data);\n> +\tvoid createOutputTexture2D(eGLImage &eglImage);\n>  \n>  \tint attachTextureToFBO(eGLImage &eglImage);\n>  \n> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\n> index e83e24606..8e8d61813 100644\n> --- a/src/libcamera/egl.cpp\n> +++ b/src/libcamera/egl.cpp\n> @@ -329,6 +329,19 @@ bool eGL::isAvailable()\n>  \treturn true;\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> + *\n> + * Creates a 2D texture in VRAM. Subsequet attach the texture to the\n\ns/Subsequet/Subsequently/\n\nWith the typo fixed:\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> + * texture unit specified in the eGLImage object.\n> + */\n> +void eGL::createOutputTexture2D(eGLImage &eglImage)\n> +{\n> +\tcreateTexture2D(eglImage, NULL);\n> +\tattachTextureToFBO(eglImage);\n> +}\n> +\n>  /**\n>   * \\brief Initialise the EGL context\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 0BA47BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 12:24:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E4A3165EE1;\n\tFri, 26 Jun 2026 14:24:17 +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 46976658FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 14:24:16 +0200 (CEST)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-657-u9G0QxM9NIm247QQLDrI6g-1; Fri, 26 Jun 2026 08:24:13 -0400","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-492488f8583so9521935e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 05:24:13 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-49269071d05sm81092165e9.11.2026.06.26.05.24.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 26 Jun 2026 05:24:11 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"WGigEhF9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1782476655;\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\tin-reply-to:in-reply-to:references:references;\n\tbh=UUVvQGT9jdiz2SgZmu8TaY/bi9H9/o04uUrEL4nqHSU=;\n\tb=WGigEhF9wJudSJ0J7hfw40rFVFqk8zEcSp2T4VuTYB+cX2JSJGrrRBjxt4CNyZ1vwtC2Rs\n\tYWYi33Xu2ekSgqvK1olhJvs2pqLSigio1c2TChG27FZg50I67xbrP7PfeKjOS0uBf0pN2R\n\tAU8redgHzwdae1sridh72Ua4Z5aJPP4=","X-MC-Unique":"u9G0QxM9NIm247QQLDrI6g-1","X-Mimecast-MFC-AGG-ID":"u9G0QxM9NIm247QQLDrI6g_1782476652","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782476652; x=1783081452;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=UUVvQGT9jdiz2SgZmu8TaY/bi9H9/o04uUrEL4nqHSU=;\n\tb=m9zKGGyQ74g/tR9vVXAB0ML8aodSqNsGnq7cXSOW2IWg1a/WahXZHqv4/3NS25BSO5\n\tjcR9+vyfCp1ttHd5ppRqGwvwBOXkXVnDk+EPmwf74WIgbfyGkV0LPfNXCc9r+rNHL28o\n\tSote9SW6t677FNm9Y4xh+pCmvc9B/kzOcV+GL61HQCxIU08Z464WtcizR7Vo6imOzRCQ\n\tDZmJsZgodsKwCZBh+Ro1hHZ2y8Ouess2Qh+YA8duibv/lXuu3y3/8+ahvKeVBWOklT3G\n\tFzS2UgoBCGGWQCCSOf6EK0IwJcdZ1W0uWhCa+KebIp8Q2QcCW2JPkvCTgNBxqvFTo1av\n\t48Rw==","X-Gm-Message-State":"AOJu0YyWBUfYlvHyBGsXWON5SvWiB20Up/dRNbmnUO4NVcSHNps1AekK\n\thGPNXI70s1CpBvRFHoKJsIIellaIWfuQgV4B+xKvFapdAqzjdaw2j6zhX1iJVor4/WKmcXtgDY0\n\tDafNJYccl5tBFnMKC8kZa9nUtdtLbTaTt/vle5P4Pqk3w8t75MKClygbKLmoxdtKBfh4bEPQ/IO\n\tVWdOQQeOw=","X-Gm-Gg":"AfdE7cms3PvEiPWn59aru+fj+t5QNnvYgE8hfKsZUS1kXn+hpDsSk1DXl/Nsl/+a81q\n\t8U8N6NjGHdo5xySGdnCClX31mImkB+QwcuGlitNbcj47qpj9jZE8q/AnC+UCRF3Ns7U8nlXx2yF\n\tpPFMUPxdDpT6zWTr226OlGpdwmoUDX7UwM99l7ucFMZK3SM0TbbUeLJoZu6e9VGBlMdAYpIIcg3\n\tIPbIoPLxpD+q2KuUOS7t9Xkc0SgjwEABBerAe6yDTHKeFsMeKXibxCDlkwAJJ8KTaHeB/QMVjBD\n\ticd6Ywp5ZdZk17VjO8jRYyAZUX+l9BWIMO3cV50d/hTjBAs1Z2f0uUnH2XO4lIAGUcQ+B7r15yH\n\tG80BihTrChXFkiSnBJbUzUQ4Eit+EM8tt3EhT1i+x9jmUBgHPgn4vOHABNfKPQ+kh","X-Received":["by 2002:a05:600d:6405:20b0:490:bb3e:30b0 with SMTP id\n\t5b1f17b1804b1-4926685feabmr78340315e9.4.1782476652246; \n\tFri, 26 Jun 2026 05:24:12 -0700 (PDT)","by 2002:a05:600d:6405:20b0:490:bb3e:30b0 with SMTP id\n\t5b1f17b1804b1-4926685feabmr78339955e9.4.1782476651837; \n\tFri, 26 Jun 2026 05:24:11 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org,  pavel@ucw.cz","Subject":"Re: [PATCH v3 4/8] libcamera: egl: Add createOutputTexture2D","In-Reply-To":"<20260626113325.3218045-5-bryan.odonoghue@linaro.org> (Bryan\n\tO'Donoghue's message of \"Fri, 26 Jun 2026 12:33:21 +0100\")","References":"<20260626113325.3218045-1-bryan.odonoghue@linaro.org>\n\t<20260626113325.3218045-5-bryan.odonoghue@linaro.org>","Date":"Fri, 26 Jun 2026 14:24:10 +0200","Message-ID":"<855x35lcb9.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"nqIFA4UF-xNc0xhS5gjSx4IgJ0frcyvCvR1SK4Andyo_1782476652","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]