diff options
author | Marek Szuba <marecki@gentoo.org> | 2020-02-28 12:45:43 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2020-02-28 12:45:43 +0100 |
commit | 4d3b73032bb7a22457d8cd762f4240305ef66111 (patch) | |
tree | fcd929db62e5069f6d65a3cff85bbbce91e729dd /virtual/opencl | |
parent | profiles/p.mask: cleanup (diff) | |
download | gentoo-4d3b73032bb7a22457d8cd762f4240305ef66111.tar.gz gentoo-4d3b73032bb7a22457d8cd762f4240305ef66111.tar.bz2 gentoo-4d3b73032bb7a22457d8cd762f4240305ef66111.zip |
virtual/opencl: Only pull in media-libs/mesa on supported GPUs
virtual/opencl uses media-libs/mesa[opencl] as driver-independent
fallback OpenCL provider. However, media-libs/mesa[opencl] depends
on dev-libs/libclc - which at the time of me writing this only
supports nvidia, r600 and radeonsi, and whose REQUIRED_USE clause
requires at least one of the corresponding VIDEO_CARDS flags to be
set. This effectively breaks the OpenCL dependency cycle for a lot of
configurations, e.g. for VIDEO_CARDS="nouveau" systems.
Only try to use Mesa as an OpenCL provider when VIDEO_CARDS includes a
GPU supported by dev-libs/libclc.
Note that this means there is now no fallback OpenCL provider for
ABI_X86_32. Moreover, for ABI_X86_64 the fallback provider is now
dev-util/intel-ocl-sdk, which almost certainly doesn't work on AMD CPUs
- which however should be mostly harmless (the package should simply do
nothing beyond satisfying virtual/opencl dependencies), especially given
many OpenCL-aware applications ignore CPU-type devices anyway.
Closes: https://bugs.gentoo.org/710724
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'virtual/opencl')
-rw-r--r-- | virtual/opencl/opencl-2.ebuild | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/virtual/opencl/opencl-2.ebuild b/virtual/opencl/opencl-2.ebuild index 81e5238f3c14..9963833977ef 100644 --- a/virtual/opencl/opencl-2.ebuild +++ b/virtual/opencl/opencl-2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -8,7 +8,7 @@ inherit multilib-build DESCRIPTION="Virtual for OpenCL implementations" SLOT="0" KEYWORDS="amd64 x86" -CARDS=( amdgpu i965 nvidia ) +CARDS=( amdgpu i965 nvidia r600 radeonsi ) IUSE="${CARDS[@]/#/video_cards_}" # intel-neo and intel-ocl-sdk are amd64-only @@ -17,11 +17,15 @@ RDEPEND="app-eselect/eselect-opencl video_cards_i965? ( || ( abi_x86_64? ( !abi_x86_32? ( dev-libs/intel-neo ) ) dev-libs/beignet ) ) - >=media-libs/mesa-9.1.6[opencl,X(+),${MULTILIB_USEDEP}] video_cards_amdgpu? ( || ( dev-libs/rocm-opencl-runtime dev-libs/amdgpu-pro-opencl ) ) video_cards_nvidia? ( - >=x11-drivers/nvidia-drivers-290.10-r2[uvm] ) + >=x11-drivers/nvidia-drivers-290.10-r2[uvm] + >=media-libs/mesa-9.1.6[opencl,X(+),${MULTILIB_USEDEP}] ) + video_cards_r600? ( + >=media-libs/mesa-9.1.6[opencl,X(+),${MULTILIB_USEDEP}] ) + video_cards_radeonsi? ( + >=media-libs/mesa-9.1.6[opencl,X(+),${MULTILIB_USEDEP}] ) abi_x86_64? ( !abi_x86_32? ( dev-util/intel-ocl-sdk ) ) )" |