[v2,7/7] meson: Guard softisp gpu acceleration with feature option: softisp-gpu
diff mbox series

Message ID 20260323082000.1324115-8-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • meson: Add `softisp-gpu` option
Related show

Commit Message

Barnabás Pőcze March 23, 2026, 8:20 a.m. UTC
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 <barnabas.pocze@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
changes in v2:
  * rename option from `softisp-debayer-egl` to `softisp-gpu`

v1: https://patchwork.libcamera.org/patch/26047/
---
 meson_options.txt                      | 5 +++++
 src/libcamera/software_isp/meson.build | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

--
2.53.0

Patch
diff mbox series

diff --git a/meson_options.txt b/meson_options.txt
index c27e377ad..af1c60cce 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -86,6 +86,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 cbcd3c1b3..7a2f704bf 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')