From patchwork Thu Jun 18 12:22:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 26961 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F0DAEC3334 for ; Thu, 18 Jun 2026 12:23:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 862A7656E1; Thu, 18 Jun 2026 14:23:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="rDiPphOT"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 86C186301A for ; Thu, 18 Jun 2026 14:23:19 +0200 (CEST) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-490ace40f4bso8813235e9.3 for ; Thu, 18 Jun 2026 05:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781785399; x=1782390199; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=++p7rbbpyQ4ktzzlFiMkpZEdxhGxm60fKHrNbbt6c5w=; b=rDiPphOTWXbscs6ah858KkcGdH0F5C/LKNHLYgr0+b3MCBSk9KUiBqnhSdza1wx33S wheDfQgBSVoTX4tUZD7nlF4Xln9zZx28t8wXrTqWlZn3qCoyOGoba0Tpc87FTLj8lYpx ZLIb7l1EImewa+7ZuzVGxihSoxYUgweDjD6hOUs/MdKcHvYDNBjPw7TQoYhSocVh3l4r rgDXeWquIx7uleWprXa3o+4K0ZeMCKWgD8SCeaB2oySnLXELoaEYAnPaih1DocbeUMKc texae6vYi25mmIuFhfKmAbdPSnromSNXGiQOYWwKIUqIlfn5Ntgyl1TA7kLP5jpcZVJa F0wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781785399; x=1782390199; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=++p7rbbpyQ4ktzzlFiMkpZEdxhGxm60fKHrNbbt6c5w=; b=HFHHqUyeufXLrPC+MVYSjKDdx+GDZHH/1pLbjIu4paFRwe/AV8NgNaQ5Eju7AZQrwc mybdMDh5XlF8ZRIbmOgMC8vd1+dsosUmqGaIEi8pTQduhSpYKvF8Ke3/VVL0P9vG/ckJ rHU0ESWyZW8dP2RzgTX9OFEvohafcQYozvMV0muItf0M3a+z3omlnHcBZYos2DztoiVd mw7eY7Asv+QdSLsHHYtHl6X63ASz8R++X6+tkEhH4T2rxLuQbkhAd5mLrC5dHhYoCn97 OT2bdt0UYYtJGyGFQiUNm6tLhnVm9N6dt39ynB1HtVLYUSHw/mcYlb++HeuHRQQqS3nK JQcw== X-Gm-Message-State: AOJu0YwWy6DfTFLb+05J0ZB0J8x+0m3kqDyT6fsclYBZqcdnGE3mJYGd HDsU4ddX6j6A3kURbB6W/XiMxBtXnjMKcAW7SCS0zAhc/pGrJawBPaAyQVeuthbGMkccQxRvmoh bvNLz+co= X-Gm-Gg: AfdE7cmGscwP6ptLktjSa51kDY8HKD1lgCHKf8MOF4m6EBL193BwpT0GWvpSVdg/FYh Jdv10BO3VBVGrZcvAfYNdfsaIyoRKzc57ncBQHdBRmCwOybKhWkkTvpx7kknssKsXBnLS8zNL+G v2kgFxu7lRPRLbyIpp7ww2groI2PQMRDrqawz8q5M7y4ciVzCLqeQx1w+GosWhNswLeodEIfj1A mHekUsUkJ2uOzXqEPzLpOIjFRBl/xfDp8lW8XVIA3+sFlP8PuNOMclvwx0MBT7DVQVXS/C6PqHP S53DEtCQPvK7NShbjP4iTi596RoaK6apHGL0FyHxnLYUlzgts4azThfogMRrV4fKd8SgZHyrFsv qeCzK6TgY5F390EuTKmBzkttzU7F0tH365Px1AiIytH1EFvy7sj+01Z+CObxKKH4sKbnPG30xMZ vGiV4I7cEIiUy1vSPn6q68Kv3Rxz91Pj0lMCSV/gs= X-Received: by 2002:a05:600c:8010:b0:490:bad9:de43 with SMTP id 5b1f17b1804b1-492381a5b88mr58651855e9.0.1781785399097; Thu, 18 Jun 2026 05:23:19 -0700 (PDT) Received: from inspiron14p-linux ([109.76.144.236]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 05:23:18 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: bryan.odonoghue@linaro.org, pavel@ucw.cz Subject: [PATCH 28/30] libcamera: software_isp: gpu: Switch to using glTexSubImage2D on slow path upload Date: Thu, 18 Jun 2026 13:22:41 +0100 Message-ID: <20260618122245.946138-29-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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This is the right thing to do but, isn't the thing that is costing us right now. We know this is slightly faster, emphasis on the slightly anything with less than a millisecond of performance increase is not easily measured. Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp index d7bed8837..2e5c0e40e 100644 --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp @@ -260,7 +260,7 @@ int SoftwareIspPipelineGpu::processGPU(FrameBuffer *input, FrameBuffer *output, LOG(Debayer, Error) << "mmap-ing buffer(s) failed"; return -ENODEV; } - egl_.createInputTexture2D(*eglImageBayerIn_, inMapped->value().planes()[0].data()); + egl_.updateInputTexture2D(*eglImageBayerIn_, inMapped->value().planes()[0].data()); } /* Generate the output render framebuffer as render to texture */ @@ -374,6 +374,7 @@ int SoftwareIspPipelineGpu::start() /* Texture we will render to */ eglImageRGBAOut_ = std::make_unique(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE3, 3); + egl_.createInputTexture2D(*eglImageBayerIn_, NULL); egl_.createOutputTexture2D(*eglImagePingPong_[0]); egl_.createOutputTexture2D(*eglImagePingPong_[1]);