@@ -57,6 +57,8 @@ int GpuIspShaderPass::process(eGLImage &eglImageIn, eGLImage &eglImageOut, uint3
glViewport(0, 0, width, height);
glClear(GL_COLOR_BUFFER_BIT);
+ eglBenchMark_.begin(egl_);
+
glDrawArrays(GL_TRIANGLE_FAN, 0, DEBAYER_OPENGL_COORDS);
err = glGetError();
if (err != GL_NO_ERROR) {
@@ -64,9 +66,17 @@ int GpuIspShaderPass::process(eGLImage &eglImageIn, eGLImage &eglImageOut, uint3
return -ENODEV;
}
+ eglBenchMark_.end(egl_);
+
return 0;
}
+void GpuIspShaderPass::printShaderBenchMark(void)
+{
+ LOG(GpuShaderPass, Debug) <<
+ "ShaderPass = " << this->name() << " took " << eglBenchMark_.getTimeElapsedSync(egl_) / 1000 << " us";
+}
+
int GpuIspShaderPass::start()
{
return 0;
@@ -74,8 +74,12 @@ public:
*/
GLint glFormat_;
+ void initShaderBenchMark(void) { eglBenchMark_.init(); }
+ void printShaderBenchMark(void);
+
protected:
eGL& egl_;
+ eGLBenchMark eglBenchMark_;
/* Shader calculates this getter provides ability to interrogate if needed */
unsigned int bytesPerPixel_;
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- .../software_isp/gpu_pipeline_shader_pass.cpp | 10 ++++++++++ src/libcamera/software_isp/gpu_pipeline_shader_pass.h | 4 ++++ 2 files changed, 14 insertions(+)