]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
mesa: add opencl DISTRO_FEATURE
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Mon, 15 Sep 2025 23:25:56 +0000 (02:25 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Sep 2025 10:08:20 +0000 (11:08 +0100)
OpenCL is an important part of the GPU-related world. It makes sense to
be able to provide headless environment (without OpenGL and Vulkan), but
having just OpenCL as a GPU user. Currently it is not possible since
mesa requires either of those to be enabled for the DISTRO.

Add new 'opencl' DISTRO_FEATURE, controlling enablement of OpenCL.

Note: Mesa, if built with the libclc packageconfig (which is required
for OpenCL driver) depends on the mesa-clc tool from the mesa-native
package. It is required to propagate opencl DISTRO_FEATURE to the native
set in order to be able to fulfill mesa -> mesa-native dependency as
otherwise mesa-native package will be skipped.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/bitbake.conf
meta/recipes-graphics/mesa/mesa.bb
meta/recipes-graphics/mesa/mesa.inc

index 8e90c7bbc85c79f69003a6ac3dd91726bc362a42..eebefc4840621b4ca246faae6e4016e767a535d6 100644 (file)
@@ -915,8 +915,8 @@ DISTRO_FEATURES_NATIVESDK:mingw32 = "x11 ipv6"
 
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value
-DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
-DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opencl opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opencl opengl wayland"
 
 DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
index 49e077b20cd254415c73a30040da76b5d25fd2f3..cfa5d0f40f0af0b4bbd30c1f76ea235b48dd18a0 100644 (file)
@@ -5,6 +5,7 @@ PACKAGECONFIG = " \
        video-codecs \
        ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
+       ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'opencl libclc gallium-llvm', '', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
        xmlconfig \
 "
index 3f09cfd4df21dd3fc2eb01051f3cea6ddbda0d3c..a58de5ebc3dafd1a6a9430978fd02960318c1db7 100644 (file)
@@ -46,7 +46,7 @@ EXTRANATIVEPATH += "chrpath-native"
 
 inherit meson pkgconfig python3native gettext features_check rust
 
-ANY_OF_DISTRO_FEATURES = "opengl vulkan"
+ANY_OF_DISTRO_FEATURES = "opencl opengl vulkan"
 
 PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"