From f094bc8a520677b553184c6613d0474ade5d68f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 29 Jan 2026 17:10:34 +0100 Subject: [PATCH] meson: Guard softisp gpu acceleration with feature option: softisp-gpu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously it was not possible to disable gpu acceleration if every dependency was discovered by meson. Fix that by adding a new option. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- meson_options.txt | 5 +++++ src/libcamera/software_isp/meson.build | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 8049496e..20baacc4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -106,6 +106,11 @@ option('rpi-awb-nn', value : 'auto', description : 'Enable the Raspberry Pi Neural Network AWB algorithm') +option('softisp-gpu', + type : 'feature', + value : 'auto', + description : 'Enable GPU accelerated processing in the software ISP') + option('test', type : 'boolean', value : false, diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index cbcd3c1b..7a2f704b 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -7,9 +7,11 @@ if not softisp_enabled subdir_done() endif -libegl = dependency('egl', required : false) -libglesv2 = dependency('glesv2', required : false) -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) +libegl = dependency('egl', required : get_option('softisp-gpu')) +libglesv2 = dependency('glesv2', required : get_option('softisp-gpu')) +mesa_works = cc.check_header('EGL/egl.h', + required : get_option('softisp-gpu'), + dependencies : libegl) summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')