From patchwork Wed Nov 18 09:57:14 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: 28969 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 C6C93BDE17 for ; Wed, 18 Nov 2026 09:58:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5E1776A8BD; Wed, 18 Nov 2026 10:58:02 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="AN2Z1L7x"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D37B6A8AA for ; Wed, 18 Nov 2026 10:57:56 +0100 (CET) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-48e09aa5264so371949f8f.2 for ; Wed, 18 Nov 2026 01:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1794995876; x=1795600676; 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:content-type; bh=8of6o73sNzdiL69kdCd/SEtGC2WiEnG/3dU1ojuwP3c=; b=AN2Z1L7xNiXHLj5MU6uIi5rwkp65BVnNLo6kpPhqGfzsxRsqDakRjbTuoAbU1BgND5 a0ijozEkrl5/du7B1VREPSXkihsoLC5MxQBxp/b1eD6QS40sCzdI16/7rBgKcHUzWbfk LpgRx1+gGR1uNRyK423CKK6YbFI1/OaxgANgqh5q3Od7yDgdNO0wZhTDX3L7nF5LF3Sm H0Q5U40cS4/aEk/xQdktxbWSI0rwsT2mVUYH36+pukaYTPs+RxZ3SXoSyjXo2JMzuqQi 8UEXQl6On5U37qbvpLHa4giLRI4Ej/tHyySlriSCWZWZRv6eVma+u9sSiLiFUpPwEtJx er0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794995876; x=1795600676; 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:content-type; bh=8of6o73sNzdiL69kdCd/SEtGC2WiEnG/3dU1ojuwP3c=; b=CGJEVKCHlMW3WOKNhuTpD3w/v7QNUI5/6pTzn4TKINFfobdQnbMKdd9OfLsml4x0dx toFjOquqReV+gQAL821Z7lS7P9phao9XDqwzFztpsFL2MzcMgP6oKqsg6P7mgZX9IHrp fIAGxwMM88alRmF1SGsyIgTbgFKC6BPEiDp9FZkF4xiSN2Hd/wfPAGqRwUZBGwSFjKL/ 68JMZ2c6Xf2YmcKysRKiqE2N+OMaEmSLNKLqhSUSiVXUO7NaA7uIjzOty75zt5mTwVc2 EEBuZCxZnUOsrbkk9t+u81m94ZOkEG4nbX67xGRPgm8kiUdFzZ1t1sFAiG2pR2g7ADAy ZibA== X-Gm-Message-State: APuU4Z/jpiomFEtY4ugHx+7sUXRIkJr+xuGLGGqjcF2o9WUBlXPSbXXv RZKQAm8D9Jam7YuiiCBrjuheputs2tYNrRe0ng3ISB/Ob2qVOm6UnEFNhXMfm4KSzNwl1vBrGbq 3d7MyH8k= X-Gm-Gg: AZFdTZc7u4ZzmsQIHL9XG6MavsUzMWwsv+PCsnwmQQm8U2ic/3LONy360RyoatxW09k mCtWYY2awmd9RbeVbEUUVx9jPknXzxqP5O1+COAyzdREfszWKoEtamQDtYwZ3GUElNkYyQmzNvC vo+MbTw6LMxRmVC4c+48zdV/daxZTT0soGQlKGl6ZHP9tCfbV5bhbFAiUnycfavG0le2aFbJOjT rUINYQm8aQmUoOl0Kr0E92BYgtyENBxj8QNzwsiTCCFUv5DcvaXSFeL0BBq0OmEhjST2ItIK1q3 OlKBRjyD7wLWO66t2qgcGqJjWBObNpvAou2HJKfNK28U9aB2EDhPq6YAYmm3Wfmh79bjrQvkvdn 4w048lqUBlEdifn6jsT8uQGE3ef/DeVpg3FNZFA4paj6M9R5h79gnOWNoRd2kHF3qtD5r+VHU4v koD95nuzyx+yb7f7I7H/9RqjAZKQbAResE5nCNOOVBmwhW32fnfsCCwDjxR3XSVg8ojF3lClzFc gqwldpeX/+bJvVRvX1pIOPyrR4rdXumAkVAO0fWXLg/Si1IybuWGCzgm3uf8weo5F7biS8uQ4LV 5eqIMEIFMzBS5uobdq3F2Q5Whn6AGQuaVl1/jDY+m2yIcQ== X-Received: by 2002:adf:f4d2:0:b0:48d:b940:af7a with SMTP id ffacd0b85a97d-4a63c656d42mr3626649f8f.55.1794995875614; Wed, 18 Nov 2026 01:57:55 -0800 (PST) Received: from inspiron14p-linux ([109.76.187.112]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4a655f9f4a7sm3940871f8f.34.2026.11.18.01.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 01:57:55 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: rstrode@redhat.com, robert.mader@collabora.com, barnabas.pocze@ideasonboard.com, Bryan O'Donoghue Subject: [RFC PATCH v2 07/26] libcamera: software_isp: gpu_pipeline_shader_pass: Move common attribute and uniform variables to base shader class Date: Wed, 18 Nov 2026 10:57:14 +0100 Message-ID: <20261118095735.170587-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261118095735.170587-1-bryan.odonoghue@linaro.org> References: <20261118095735.170587-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" Every shader pass will want to set these variables so define them in the base class not in the demosiac class. Render therefore unto Cesar the things which are Cesar's. Signed-off-by: Bryan O'Donoghue --- .../software_isp/gpu_pipeline_shader_pass.h | 13 +++++++++++++ .../gpu_pipeline_shader_pass_demosiac.h | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h index 5e3748621..9611edc84 100644 --- a/src/libcamera/software_isp/gpu_pipeline_shader_pass.h +++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass.h @@ -80,6 +80,19 @@ protected: struct PassConfig passInputCfg_; struct PassConfig passOutputCfg_; + + /* Common shader attributes */ + GLint attributeVertex_; + GLint attributeTexture_; + GLint textureUniformProjMatrix_; + GLint textureUniformBayerDataIn_; + GLint textureUniformStrideFactor_; + uint32_t shaderStridePixels_; + + /* Bayer shader parameters - useful to potentially more than one shader */ + GLint textureUniformBayerFirstRed_; + float firstRed_x_; + float firstRed_y_; }; } /* namespace libcamera */ diff --git a/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h b/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h index 97f84d444..a4c0befe6 100644 --- a/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h +++ b/src/libcamera/software_isp/gpu_pipeline_shader_pass_demosiac.h @@ -44,18 +44,8 @@ public: const char *name() const override { return "GpuIspShaderPassDemosiac"; } private: /* Shader parameters */ - float firstRed_x_; - float firstRed_y_; - GLint attributeVertex_; - GLint attributeTexture_; GLint textureUniformStep_; GLint textureUniformSize_; - GLint textureUniformStrideFactor_; - GLint textureUniformBayerFirstRed_; - GLint textureUniformProjMatrix_; - GLint textureUniformBayerDataIn_; - - uint32_t shaderStridePixels_; /* Per-frame AWB gains */ GLint awbUniformDataIn_;