@@ -78,6 +78,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 */
@@ -43,18 +43,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_;
/* Represent per-frame CCM as a uniform vector of floats 3 x 3 */
GLint ccmUniformDataIn_;
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 <bryan.odonoghue@linaro.org> --- .../software_isp/gpu_pipeline_shader_pass.h | 13 +++++++++++++ .../gpu_pipeline_shader_pass_demosiac.h | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-)