[28/30] libcamera: software_isp: gpu: Switch to using glTexSubImage2D on slow path upload
diff mbox series

Message ID 20260618122245.946138-29-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • RFC/RFT: gpuisp: Multipass with speed optimisations on top
Related show

Commit Message

Bryan O'Donoghue June 18, 2026, 12:22 p.m. UTC
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 <bryan.odonoghue@linaro.org>
---
 src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

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<eGLImage>(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE3, 3);
 
+	egl_.createInputTexture2D(*eglImageBayerIn_, NULL);
 	egl_.createOutputTexture2D(*eglImagePingPong_[0]);
 	egl_.createOutputTexture2D(*eglImagePingPong_[1]);