[{"id":39592,"web_url":"https://patchwork.libcamera.org/comment/39592/","msgid":"<3c1cdeea-4f14-4f43-8f22-3206eac52917@collabora.com>","date":"2026-07-06T11:13:18","subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi Bryan, thanks for the updated series.\n\nOn 06.07.26 13:01, Bryan O'Donoghue wrote:\n> When operating from a texture cache on dma-buf inputs we will no longer\n> create new textures nor attach those textures for dma-buf handles we have\n> already encountered.\n>\n> This means we will use the texture id associated with a given texture unit\n> to switch between one texture and another. The pages associated with the\n> texture will have been populated with new data by the CSI2 receiver. All we\n> will do is say to the GPU \"reuse this texture id\" aka zero-copy.\n>\n> However we must also activate and bind that texture for each loop. This\n> cost is small but necessary for zero-copy.\n>\n> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>   include/libcamera/internal/egl.h |  1 +\n>   src/libcamera/egl.cpp            | 24 +++++++++++++++++++-----\n>   2 files changed, 20 insertions(+), 5 deletions(-)\n>\n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 9b4261c55..1e31d490b 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -112,6 +112,7 @@ public:\n>   \tvoid createOutputTexture2D(eGLImage &eglImage);\n>   \n>   \tint attachTextureToFBO(eGLImage &eglImage);\n> +\tvoid activateBindTexture(eGLImage &eglImage);\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 b91f9096a..fae907881 100644\n> --- a/src/libcamera/egl.cpp\n> +++ b/src/libcamera/egl.cpp\n> @@ -138,6 +138,23 @@ int eGL::attachTextureToFBO(eGLImage &eglImage)\n>   \treturn ret;\n>   }\n>   \n> +/**\n> + * \\brief Activate a texture unit and bind a texture to that unit\n> + * \\param[in,out] eglImage EGL image containing data related to unit and texture id\n> + *\n> + * When we create a texture we will bind a texture unit and texture id so\n> + * we can set filters. For the case where a texture already exists though\n> + * we need to activate and bind an existing texture. This helper function\n> + * facilitates both cases.\n> + *\n> + */\n> +void eGL::activateBindTexture(eGLImage &eglImage)\n> +{\n> +\t// Bind texture unit and texture\n> +\tglActiveTexture(eglImage.texture_unit_);\n> +\tglBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n> +}\n> +\n>   /**\n>    * \\brief Create a DMA-BUF backed 2D texture\n>    * \\param[in,out] eglImage EGL image to associate with the DMA-BUF\n> @@ -197,9 +214,7 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>   \t\treturn -ENODEV;\n>   \t}\n>   \n> -\t// Bind texture unit and texture\n> -\tglActiveTexture(eglImage.texture_unit_);\n> -\tglBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n> +\tactivateBindTexture(eglImage);\n>   \n>   \t// Generate texture with filter semantics\n>   \tglEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);\n> @@ -270,8 +285,7 @@ void eGL::createTexture2D(eGLImage &eglImage, void *data)\n>   {\n>   \tASSERT(tid_ == Thread::currentId());\n>   \n> -\tglActiveTexture(eglImage.texture_unit_);\n> -\tglBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n> +\tactivateBindTexture(eglImage);\n>   \n>   \t// Generate texture, bind, associate image to texture, configure, unbind\n>   \tglTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_, eglImage.width_, eglImage.height_, 0, eglImage.format_, GL_UNSIGNED_BYTE, data);\nThis still misses using `activateBindTexture()` in `updateTexture2D()` - \nwhich is why I again suggest to move this commit *before* \"libcamera: \negl: Add updateTexture2D\" ;)","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 83A36C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:13:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B02E366017;\n\tMon,  6 Jul 2026 13:13:28 +0200 (CEST)","from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com\n\t[136.143.188.11])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1E9F86600A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:13:26 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1783336401696856.5328849181356;\n\tMon, 6 Jul 2026 04:13:21 -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=\"Ol2S3MYx\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1783336403; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=nRkKV9n5qar7mqKzt68F2uaUlfNsM5fNM7Cq20+bSTP/hGFQ6V0v2ADOh/zNHLqSmObJuyjZcdFw0RcnmjKt1u9bpMKstT17f6KGeVz71iorLjXSQzLujfy79wNu1T82VYBiJEtA8UOl8sCpPgYIkrLAflr/9AyLkWvfZY5mjPU=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1783336403;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=/2XyU5ISg0u9bTLfIezeZzpgfQEBLL3eCaYSd3TfjpQ=; \n\tb=Pz2tY2Rmq4tOpcrIXa/pls6RDTwvz66WjP3Aqjwz8cBRoLRZPe1m4UPGEZBgdEiTQ14MRc8MQAD+bos0PqJXfUi+LABeQypqLNQ9CD9XHUWrviNRI9xCkjMERnD2WI1RIJmp+9VnBfucoNbLdD5aUpT81lkx+CtjuqqX8vgeu0w=","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=1783336403;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=/2XyU5ISg0u9bTLfIezeZzpgfQEBLL3eCaYSd3TfjpQ=;\n\tb=Ol2S3MYx0hmor2Js6/ucR1Kn1pJLwzAHIaDdDyexRm38EikiUqQrOkfyGXEROjG1\n\tDNa0mmRSwvKO6N6ZyN6w9vnOxVkHi05TUl6Cals8fREO7TQmXoY7bzRr8PRuabiCxw/\n\twfOTmMcpRmoYu0q32ESjjblxxqk85dCqI+SD5zrA=","Message-ID":"<3c1cdeea-4f14-4f43-8f22-3206eac52917@collabora.com>","Date":"Mon, 6 Jul 2026 13:13:18 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Milan Zamazal <mzamazal@redhat.com>","References":"<20260706110120.2509826-1-bryan.odonoghue@linaro.org>\n\t<20260706110120.2509826-6-bryan.odonoghue@linaro.org>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260706110120.2509826-6-bryan.odonoghue@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>"}},{"id":39593,"web_url":"https://patchwork.libcamera.org/comment/39593/","msgid":"<0bb996b8-4175-4b54-9db9-b5f65c94d64a@linaro.org>","date":"2026-07-06T11:18:43","subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 06/07/2026 12:13, Robert Mader wrote:\n> Hi Bryan, thanks for the updated series.\n> \n> On 06.07.26 13:01, Bryan O'Donoghue wrote:\n>> When operating from a texture cache on dma-buf inputs we will no longer\n>> create new textures nor attach those textures for dma-buf handles we have\n>> already encountered.\n>>\n>> This means we will use the texture id associated with a given texture \n>> unit\n>> to switch between one texture and another. The pages associated with the\n>> texture will have been populated with new data by the CSI2 receiver. \n>> All we\n>> will do is say to the GPU \"reuse this texture id\" aka zero-copy.\n>>\n>> However we must also activate and bind that texture for each loop. This\n>> cost is small but necessary for zero-copy.\n>>\n>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n>> ---\n>>   include/libcamera/internal/egl.h |  1 +\n>>   src/libcamera/egl.cpp            | 24 +++++++++++++++++++-----\n>>   2 files changed, 20 insertions(+), 5 deletions(-)\n>>\n>> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/ \n>> internal/egl.h\n>> index 9b4261c55..1e31d490b 100644\n>> --- a/include/libcamera/internal/egl.h\n>> +++ b/include/libcamera/internal/egl.h\n>> @@ -112,6 +112,7 @@ public:\n>>       void createOutputTexture2D(eGLImage &eglImage);\n>>       int attachTextureToFBO(eGLImage &eglImage);\n>> +    void activateBindTexture(eGLImage &eglImage);\n>>       void pushEnv(std::vector<std::string> &shaderEnv, const char *str);\n>>       void makeCurrent();\n>> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\n>> index b91f9096a..fae907881 100644\n>> --- a/src/libcamera/egl.cpp\n>> +++ b/src/libcamera/egl.cpp\n>> @@ -138,6 +138,23 @@ int eGL::attachTextureToFBO(eGLImage &eglImage)\n>>       return ret;\n>>   }\n>> +/**\n>> + * \\brief Activate a texture unit and bind a texture to that unit\n>> + * \\param[in,out] eglImage EGL image containing data related to unit \n>> and texture id\n>> + *\n>> + * When we create a texture we will bind a texture unit and texture \n>> id so\n>> + * we can set filters. For the case where a texture already exists \n>> though\n>> + * we need to activate and bind an existing texture. This helper \n>> function\n>> + * facilitates both cases.\n>> + *\n>> + */\n>> +void eGL::activateBindTexture(eGLImage &eglImage)\n>> +{\n>> +    // Bind texture unit and texture\n>> +    glActiveTexture(eglImage.texture_unit_);\n>> +    glBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n>> +}\n>> +\n>>   /**\n>>    * \\brief Create a DMA-BUF backed 2D texture\n>>    * \\param[in,out] eglImage EGL image to associate with the DMA-BUF\n>> @@ -197,9 +214,7 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, \n>> int fd, bool output)\n>>           return -ENODEV;\n>>       }\n>> -    // Bind texture unit and texture\n>> -    glActiveTexture(eglImage.texture_unit_);\n>> -    glBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n>> +    activateBindTexture(eglImage);\n>>       // Generate texture with filter semantics\n>>       glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);\n>> @@ -270,8 +285,7 @@ void eGL::createTexture2D(eGLImage &eglImage, void \n>> *data)\n>>   {\n>>       ASSERT(tid_ == Thread::currentId());\n>> -    glActiveTexture(eglImage.texture_unit_);\n>> -    glBindTexture(GL_TEXTURE_2D, eglImage.texture_);\n>> +    activateBindTexture(eglImage);\n>>       // Generate texture, bind, associate image to texture, \n>> configure, unbind\n>>       glTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_, \n>> eglImage.width_, eglImage.height_, 0, eglImage.format_, \n>> GL_UNSIGNED_BYTE, data);\n> This still misses using `activateBindTexture()` in `updateTexture2D()` - \n> which is why I again suggest to move this commit *before* \"libcamera: \n> egl: Add updateTexture2D\" ;)\n> \n\nits worse than that, we are doing activateBindTexture in debayer_egl.cpp \nand then activate/Bind here again manually.\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 7230BC330A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:18:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9CA7E66015;\n\tMon,  6 Jul 2026 13:18:46 +0200 (CEST)","from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AC51A66015\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:18:45 +0200 (CEST)","by mail-wm1-x32b.google.com with SMTP id\n\t5b1f17b1804b1-493ba701891so23005665e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 04:18:45 -0700 (PDT)","from [192.168.0.101] ([109.77.44.220])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-493c637bbcfsm340950995e9.6.2026.07.06.04.18.44\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 06 Jul 2026 04:18:44 -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=\"pOmpmGHU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1783336725; x=1783941525;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:content-type:in-reply-to:content-language\n\t:from:references:cc:to:subject:user-agent:mime-version:date\n\t:message-id:from:to:cc:subject:date:message-id:reply-to:content-type; \n\tbh=hKjVOHm9nlJ2grm8sl4P4P2+1e4KEJzyDgRBY257WQ0=;\n\tb=pOmpmGHUFBgEXBtqODmio1CdFED6v+evWbSfGVD9fIjn7UVCwzfoE+5lr0QkUxHi2B\n\tklbcyfNlHM3UPyCxaaEPX5m5csbqo+Be7HcK0uaU3eFg3PCbih32//2XikECX+6W81Qp\n\tHwhLwX92tQQ5kskmUC1Z5tZGnOtjxXmYGnS7P+nJNvvqxnTcXBoxpVMjdVNvxU8W3GBx\n\tdWw925OEOJ5DT5H8ST6UCxda08yIba95+kP4Rko/cIFu1KiOhbXEAtQP1Z/IOKCVktkv\n\tEhfPBR/Lo1CumHaNnX//QNnlW87ayAd5WECu8FBueGgvwjcsOaFSEiafchP0d9ybVtGO\n\trFKQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783336725; x=1783941525;\n\th=content-transfer-encoding:content-type:in-reply-to:content-language\n\t:from:references:cc:to:subject:user-agent:mime-version:date\n\t:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to:content-type;\n\tbh=hKjVOHm9nlJ2grm8sl4P4P2+1e4KEJzyDgRBY257WQ0=;\n\tb=rY1JzmYwqf4+ZEirN4aGqlnNqs3/JX8F2cMFENQPObWqVjdp8SwzsIvC78hFar30pq\n\tQPHVSZJp306EGk/u5mRCWh6Ahjt0wq9w1WTs/mGMaz6IkIv+4Mc/XCjAWgmVfarbEr1J\n\tqnn4OHM0LyeeBv5lC/o1aqBymjChjvJax9F9onGMMaTyJJlnRdMsYi4uESsu+1YEx01i\n\tZKJEAs2AfYmRdiDKrxavvhbZ9F0X5y69TFqrZy1Wx2H9U5ODEQ/t5iiyeqg2H4wF+kFF\n\tZzCEyJBxFbFtFDBzJ1SK4U+28u247z0F4YNcZ7/XmvgLGJRKkuqSJZvu/4LWqr9P6vI7\n\tqkwQ==","X-Forwarded-Encrypted":"i=1;\n\tAHgh+Rps6qRzdXP7GMn+g6/Ki2eo0pg9iIJ4MQ43iBeeVcZ9TGFyom5xDS6vaurm2zl1pPnoOl1yDG081ZWQAS/hhWo=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YzqXgsYQOkqVzXlM9x7tMjp9LTbktRleYOWBVpPqIl38wvDEo/h\n\tzfTKhtXuB7GljppRcKb+ZakFspKMRJz7sQVvmzOvLiKGu4CWYBhSwTFqFALYAZbiclVWg0+zGpo\n\tWAhRJ","X-Gm-Gg":"AfdE7cmNBPQK3qyzArQZ2Kzr6eyiTnEO2YTMfqwHsEJvtIzMsKbaV05c8iFT1A0iqYu\n\tL+kHbxQr2v4dRXDHAapdvgmWM/Mg+r40CfRAfqIuUGX0pjw94uHyYnEShqKNbqy69kTOfXSNQJW\n\twLETCJ1PLxeSjDFVZgt+D/zmNbJF8agQWjrvdCOY91QMwSI+Ks/NNvFhemqnmyi1fgxcKRv6pxs\n\tv2NkL/9oF4t89PARAhJ4LEY9UYwt2t3TscXhxvscqZJp6THqAD02DfawIFANo/lt4uDaAV8wTk4\n\tBKRsYKdN9yr9jfYryiO8COzs2XAJS6V2EexiOCa044K66D+Ukz/TEPrfMWxyZHvhxnXj0LOZ68i\n\ttBRuikkMHnQu1BOev5BhxdqRT2Wbei/xaRFCPRs0WwjaMn7clK1qvM3izcfYBqI3H7MTXSAomTA\n\tFFQ/DnkFwfiRcglQMwnnzP0y/aXQ==","X-Received":"by 2002:a05:600c:34c6:b0:493:cb5b:5dd6 with SMTP id\n\t5b1f17b1804b1-493d11d7e03mr115451735e9.12.1783336725031; \n\tMon, 06 Jul 2026 04:18:45 -0700 (PDT)","Message-ID":"<0bb996b8-4175-4b54-9db9-b5f65c94d64a@linaro.org>","Date":"Mon, 6 Jul 2026 12:18:43 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Milan Zamazal <mzamazal@redhat.com>","References":"<20260706110120.2509826-1-bryan.odonoghue@linaro.org>\n\t<20260706110120.2509826-6-bryan.odonoghue@linaro.org>\n\t<3c1cdeea-4f14-4f43-8f22-3206eac52917@collabora.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<3c1cdeea-4f14-4f43-8f22-3206eac52917@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":39594,"web_url":"https://patchwork.libcamera.org/comment/39594/","msgid":"<4429c8ff-e069-4192-9e60-1a8d3e2f807d@linaro.org>","date":"2026-07-06T11:37:46","subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 06/07/2026 12:18, Bryan O'Donoghue wrote:\n>>> configure, unbind\n>>>        glTexImage2D(GL_TEXTURE_2D, 0, eglImage.format_,\n>>> eglImage.width_, eglImage.height_, 0, eglImage.format_,\n>>> GL_UNSIGNED_BYTE, data);\n>> This still misses using `activateBindTexture()` in `updateTexture2D()` -\n>> which is why I again suggest to move this commit*before* \"libcamera:\n>> egl: Add updateTexture2D\" 😉\n>>\n> its worse than that, we are doing activateBindTexture in debayer_egl.cpp\n> and then activate/Bind here again manually.\n> \n> ---\n> bod\n\nI'm wrong about that, you do need to activate texture on dma import mode \neach time.\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 330F5C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:37:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7198566015;\n\tMon,  6 Jul 2026 13:37:49 +0200 (CEST)","from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n\t[IPv6:2a00:1450:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 15B9F65EFF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:37:48 +0200 (CEST)","by mail-ej1-x62e.google.com with SMTP id\n\ta640c23a62f3a-c127ec4447cso372017266b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 04:37:48 -0700 (PDT)","from [192.168.0.101] ([109.77.44.220])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-c12b62f38f3sm738928066b.57.2026.07.06.04.37.46\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 06 Jul 2026 04:37:46 -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=\"x0DuJGbK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1783337867; x=1783942667;\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=Grud0NgGGYxG8zVbYEDNwl4n55/AeQECTEwpKAoQ/aU=;\n\tb=x0DuJGbKGpHn2ZvIZvAtTPq1olDNKG5+3vzmW75b6syHJ3/i9jA0mF0YBew89QgKOW\n\tzJ5EWjfSFVaOqI9FyKLiQ9GA0NOUIco4bc143ck/s5aFu+16WaA/Q4ySjIfzX8YMQRdn\n\tx/KJSo4DQTVKURvtgn8WIf+2Ncp+F/I+IBDl+taVxOdoC8olBMGE61Ml7VYqYGY3JqXt\n\t1jcKC2Porm2QZOYEuNtRJoyFexyf/ESQUlJS9y/geYtzEqbRJ6bBTS8f8qINicH0Olgm\n\t4XjgtEux6oXeLyjTx4jJwK6w1g45nLqA32C3t8RrqS+II2JQQLw52KgjP3FubbSJERVR\n\tg4wQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783337867; x=1783942667;\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=Grud0NgGGYxG8zVbYEDNwl4n55/AeQECTEwpKAoQ/aU=;\n\tb=VOFwKkKbMTRND26UuoxO3WHjq1DE0OTgGwGn31U5DetLG4SOWMPJPt7B/nIQKVjbWB\n\tup2ZfngqcjsMaROfxdBzLdtjySgPHKDnZHvU9xfWir8MdlAaIFcw0wjPnUUFVP4tQKrm\n\tjuof1lWa/QZ2R+dNwZS33PTKEvsf5Fd+2aeIq08Tns6MyvZ3JiNL6GV3lbkfkBEO1lgO\n\tambK4+GEMxUAoenIP5pQ3svY3Nb7uQqq4ls7l5M9EaNosqQynd7221qqqu6RDyqqkfc/\n\tAdQ/Q1/vlQ0/+tYfxraOIZZbXhKVyzrhLYpFetiHfqi+qCQMY1o83oyA8yASPPczfWcy\n\t/mRg==","X-Gm-Message-State":"AOJu0YzRuZXM7REavqfIG76EOZrMrfP+5RMgtQLP/aRmFc0z1pDRPsLL\n\t5ECuUY/UTGP8wgUd7WaOy7N6E1nPQ2I6macy4TMDRS9jvqMfvcgFwsbvkukv7xU/blpQn+Q7ISb\n\tQSrPu","X-Gm-Gg":"AfdE7cmBRaJkI7/XOKB9riI7Ec7AdVSJtDa27RMZD/tRfW2aSfu0APCPQ90pmEjNmoT\n\tct42igsb9NaxGEUjK1jnxY85lgSmIFny8bUWNNVmsRG2xj0ny9teACLEgHIvTX196BqQl59OAdn\n\tt3Ojca5nGXU1SS1RWG7AOzbGPscVpvsSVhXKBmsCm9XBkkQ72CfD3tk2Zaq6dGrs1LsYO7YE7IR\n\tdnxQZ6RP67J9C+uldu3Dl4zuZ6MFqh8wvz7WhHMqXee6aYa/4ZJ2NNFhdBPev9SCnATtESdP2uL\n\tUOkGP7rPscy42gW7dnJh9k9X1EeKJc0u1oswYLv0lQ9RBz1Of0F3rh9XyuYKc7smxUIeZ6an/t5\n\tZbchpG9eQh/hjcfNAkc0A27MYFQ73hU/b+RbfdkUMsm93nlYfMl2+WNclUjgPaFGbO966lgeUz3\n\tOhdPqcYtmcR73418ySkDyxbJ7XYQ==","X-Received":"by 2002:a17:906:e298:b0:c12:a212:5d25 with SMTP id\n\ta640c23a62f3a-c15a66edc33mr6706766b.19.1783337867202; \n\tMon, 06 Jul 2026 04:37:47 -0700 (PDT)","Message-ID":"<4429c8ff-e069-4192-9e60-1a8d3e2f807d@linaro.org>","Date":"Mon, 6 Jul 2026 12:37:46 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 5/7] libcamera: egl: Add activateBindTexture","To":"libcamera-devel@lists.libcamera.org","References":"<20260706110120.2509826-1-bryan.odonoghue@linaro.org>\n\t<20260706110120.2509826-6-bryan.odonoghue@linaro.org>\n\t<3c1cdeea-4f14-4f43-8f22-3206eac52917@collabora.com>\n\t<7qrk-IUuf9aqSHmnGNK8LxhVlJpvWtLvRzcfqqnnNkVuxhrESL25eSEtIUcN7p6XqXLa0JC_hFWXlU85gpEMFA==@protonmail.internalid>\n\t<0bb996b8-4175-4b54-9db9-b5f65c94d64a@linaro.org>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<0bb996b8-4175-4b54-9db9-b5f65c94d64a@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]