From patchwork Thu Jun 18 12:22:38 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: 26958 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 76ADBC3330 for ; Thu, 18 Jun 2026 12:23:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D924F656CA; Thu, 18 Jun 2026 14:23:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VfFO3BN6"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 44DC0629CE for ; Thu, 18 Jun 2026 14:23:17 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-490b4a8e28bso6380145e9.1 for ; Thu, 18 Jun 2026 05:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781785397; x=1782390197; 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=R+IGxiwb/nNpubCez8ipcoHv8HytnsSvPHD8T96HbMI=; b=VfFO3BN6oi+Qg5PsKPnie0FzKqcR258JNA//M5Un70a9HUZd7xAcvYQ26HcHaazu8x hiUXrhWWYhIbyH1t0YoV1A0Xx+Is6mdqUQ0JNT2f4iCXDOQrghzY9V+Dc+C01tTz20QL SASmCSQKk6QZJ65qSf47uNyEOxvyu07dJgXu2n/qPAZvFyzurFgfk1KCZQQuFfd+mO1g 6DMq1O25Pegmow/jR5SwviCXfPr13eexsjMGEpJNW6Ch/qdd14u0KC/ukOSQ6VlsfIn5 3vq4vaJ26HVjF5GSsKATLDRriQDvQWd+DTjC+vCYZxAF5lmw9MIqHQ83zBdjWVK6VZjz /hhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781785397; x=1782390197; 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=R+IGxiwb/nNpubCez8ipcoHv8HytnsSvPHD8T96HbMI=; b=d2cbIliFWsQLsDEGRK5sLEtefMP8Aduosi5zMDxM1abeF4fUWiUnBQfO9HcPhJ6cl/ QSmZAloykl0Y4Zq6AuLmg1pEAgmISHihJv8PE38cM6jaKQAZp624r/jg0UoRH9v7SZm+ gHmomjyI/JVbuJUapMx4AjVRrIqBgBxHE2X1811asbmQQiVPfaqdofVvNzTPufsVWUzE w/Nc6zElD04Msyrx14h6gZqJwjVEj84h5LEV4SiWjlUD3K1zZT0cp+hOrXSVpPm4KUXW L8KhSPGaBlF9UpaDblFh9C7IkUcuNRzqIDjZihtpkldcAswJYYt7DCPuC7qg3sbHvwGo phPA== X-Gm-Message-State: AOJu0Yzob6tjoJ2OKKmlZeg/gaPs1Iie/SHgeDBhrB2PxvvLTLZqqrpA tK9aqFBlSlVg9Qc/htjVwTdI7hmR6FbiZa6CJ+Roti3v3RxrCkrTzenT5bWYtv7p6CVKPWRZA6t LyjhlT24= X-Gm-Gg: AfdE7cmjs47L17g5qBI+qOAmPopVcbIpBGFS3cNyrBI5ws1ailiPsODKOykpadX5iga Si60IdwhFX3EaVCkLCJK2GfT3PUhrgFjMD8174sqa6rEicAZLnVBiFCOT/LBxKOc9z8wseKWGxb G3mi+AkxAhOMCTwZqFd1YZMBId8qzrlUShle7EjdEKbISKHCM+WSqiLD7YoCa3UW8CRIg/xx10a U7paEN4Aibm3wy1ImaZy2YJs5u/E3QwBzs9bPGioM/N+6tVZXZscKr2JWjjUhu53gTGlBy8dLh1 Qe4uwPOAwvI1VDg0aVsQtCllAiBSTXmxdk68otuHS3MOthG/k5ITACnpxf0WN6Sr7VyP3fy2XBO lwod3lQbrb2TdMfUZ84uEsVgKBwu2MV4sZagdaFySclc4qxv2yiFYhzpn3W3JNrnEo1LCXYrGNC T5RLqBtMcCaf+grsU0cvqKLtmbVfUJ X-Received: by 2002:a05:600c:6091:b0:492:3172:bcf0 with SMTP id 5b1f17b1804b1-492333e8d2amr137937185e9.3.1781785396667; Thu, 18 Jun 2026 05:23:16 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 05:23:16 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: bryan.odonoghue@linaro.org, pavel@ucw.cz Subject: [PATCH 25/30] libcamera: software_isp: gpu_pipeline_shader_pass: Add shader DEBUG time logging Date: Thu, 18 Jun 2026 13:22:38 +0100 Message-ID: <20260618122245.946138-26-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" Signed-off-by: Bryan O'Donoghue --- .../software_isp/gpu_pipeline_shader_pass.cpp | 10 ++++++++++ src/libcamera/software_isp/gpu_pipeline_shader_pass.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass.cpp b/src/libcamera/software_isp/gpu_pipeline_shader_pass.cpp index d0d13eef9..57d60f50e 100644 --- a/src/libcamera/software_isp/gpu_pipeline_shader_pass.cpp +++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass.cpp @@ -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; diff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h index a329845ee..0cff531e9 100644 --- a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h +++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h @@ -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_;