aboutsummaryrefslogtreecommitdiff
path: root/package/mesa3d/Config.in
diff options
context:
space:
mode:
authorGravatar Valentin Korenblit <valentinkorenblit@gmail.com>2018-10-21 00:14:33 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-12-03 23:07:20 +0100
commitfddf7a04a5b86ec56a77b963c69892aead17f97a (patch)
tree531add0ebd809cb7cbdfc1c0befe10e64aa7b6c9 /package/mesa3d/Config.in
parente521845af49d7d8e6adabf7282a4e77b54889702 (diff)
downloadbuildroot-fddf7a04a5b86ec56a77b963c69892aead17f97a.tar.gz
buildroot-fddf7a04a5b86ec56a77b963c69892aead17f97a.tar.bz2
package/mesa3d: enable OpenCL support
This patch provides Clover, the OpenCL 1.1 API implementation by Mesa for AMD GPUs. It generates libOpenCL.so. Add --disable-opencl-icd because in Mesa 18 it defaults to on. When disabled, the shared library is named libOpenCL instead of libMesaOpenCL and CL headers are installed. Given that clc headers are being installed to a non-standard location, it is necessary to specify this path in configure.ac. Otherwise, pkg-config will output the absolute path to these headers located in STAGING_DIR, which will cause a runtime error when calling clBuildProgram. Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com> [Thomas: - improve the description of the patch, based on input from Romain - register as a libopencl provider] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Valentin Korenblit <a class="moz-txt-link-rfc2396E" href="mailto:valentin.korenblit@smile.fr">&lt;valentin.korenblit@smile.fr&gt;</a> Signed-off-by: Valentin Korenblit <a class="moz-txt-link-rfc2396E" href="mailto:valentinkorenblit@gmail.com">&lt;valentinkorenblit@gmail.com&gt;</a> Signed-off-by: Thomas Petazzoni <a class="moz-txt-link-rfc2396E" href="mailto:thomas.petazzoni@bootlin.com">&lt;thomas.petazzoni@bootlin.com&gt;</a> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/mesa3d/Config.in')
-rw-r--r--package/mesa3d/Config.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index c9e08af09f..5019f2683b 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -51,6 +51,17 @@ comment "llvm support needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+# clang and libclc dependencies are satisfied by
+# BR2_PACKAGE_MESA3D_LLVM
+config BR2_PACKAGE_MESA3D_OPENCL
+ bool "OpenCL support"
+ depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+ select BR2_PACKAGE_CLANG
+ select BR2_PACKAGE_LIBCLC
+ select BR2_PACKAGE_HAS_LIBOPENCL
+
# inform the .mk file of gallium, dri or vulkan driver selection
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
bool
@@ -271,6 +282,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL
config BR2_PACKAGE_PROVIDES_LIBGLES
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBOPENCL
+ default "mesa3d" if BR2_PACKAGE_MESA3D_OPENCL
+
endif # BR2_PACKAGE_MESA3D
comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library"