Mesa (main): gallium/opencl: set OCL_ICD_FILENAMES with devenv
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 21 17:25:30 UTC 2022
Module: Mesa
Branch: main
Commit: fe65c5671b6cee094b9c2d177bc2bfae9729f827
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe65c5671b6cee094b9c2d177bc2bfae9729f827
Author: Dylan Baker <dylan.c.baker at intel.com>
Date: Fri Mar 18 14:05:05 2022 -0700
gallium/opencl: set OCL_ICD_FILENAMES with devenv
So that `meson devenv` also sets up OpenCL.
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15471>
---
src/gallium/targets/opencl/meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
index ec65fcbe18e..14df6b86f7f 100644
--- a/src/gallium/targets/opencl/meson.build
+++ b/src/gallium/targets/opencl/meson.build
@@ -114,4 +114,12 @@ if with_opencl_icd
install : true,
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
)
+
+ if meson.version().version_compare('>= 0.58')
+ # .so is hardcoded in the icd as well
+ devenv.prepend(
+ 'OCL_ICD_FILENAMES',
+ meson.current_build_dir() / 'libMesaOpenCL.so. at 0@'.format(opencl_version)
+ )
+ endif
endif
More information about the mesa-commit
mailing list