summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiccolò Belli <niccolo.belli@linuxsystems.it>2022-11-10 11:55:29 +0100
committerMatt Turner <mattst88@gentoo.org>2023-05-12 13:18:42 -0400
commit9797e687d9bf332f49dc448791510e85efc20257 (patch)
treec44ab7c8ab83a94f8295cdb7072e5a7c21231c97
parentmedia-libs/mesa: Generate LLVM_DEPSTR (diff)
downloadgentoo-9797e687d9bf332f49dc448791510e85efc20257.tar.gz
gentoo-9797e687d9bf332f49dc448791510e85efc20257.tar.bz2
gentoo-9797e687d9bf332f49dc448791510e85efc20257.zip
media-libs/mesa: use rusticl instead of clover
This has two notable regressions: - No multilib support - No R600 support Bug: https://bugs.gentoo.org/880615 Closes: https://bugs.gentoo.org/872677 Signed-off-by: Niccolò Belli <niccolo.belli@linuxsystems.it> Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--media-libs/mesa/mesa-9999.ebuild32
-rw-r--r--media-libs/mesa/metadata.xml2
-rw-r--r--profiles/arch/x86/package.use.mask4
-rw-r--r--profiles/features/wd40/package.use.mask4
4 files changed, 26 insertions, 16 deletions
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index dba9e680f61f..ca386dd38126 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -67,9 +67,10 @@ RDEPEND="
)
lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
opencl? (
- >=virtual/opencl-3[${MULTILIB_USEDEP}]
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
+ >=virtual/opencl-3
+ dev-libs/libclc[spirv(-)]
+ >=dev-util/spirv-tools-1.3.231.0
+ virtual/libelf:0=
)
vaapi? (
>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
@@ -112,6 +113,7 @@ PER_SLOT_DEPSTR="
(
!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
+ opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
)
"
LLVM_DEPSTR="
@@ -138,9 +140,11 @@ DEPEND="${RDEPEND}
)
"
BDEPEND="
+ >=dev-util/meson-1.0.0
${PYTHON_DEPS}
opencl? (
- >=sys-devel/gcc-4.6
+ >=virtual/rust-1.62.0
+ >=dev-util/bindgen-0.58.0
)
sys-devel/bison
sys-devel/flex
@@ -163,6 +167,7 @@ x86? (
llvm_check_deps() {
if use opencl; then
has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
+ has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
fi
has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
}
@@ -178,13 +183,6 @@ pkg_pretend() {
fi
fi
- if use opencl; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi; then
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
- fi
- fi
-
if use vaapi; then
if ! use video_cards_d3d12 &&
! use video_cards_r600 &&
@@ -334,10 +332,14 @@ multilib_src_configure() {
gallium_enable video_cards_radeon r300 r600
fi
- # opencl stuff
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl icd disabled)"
- )
+ if use llvm && use opencl; then
+ PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
+ # See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
+ emesonargs+=(
+ $(meson_native_true gallium-rusticl)
+ -Drust_std=2021
+ )
+ fi
if use vulkan; then
vulkan_enable video_cards_freedreno freedreno
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
index ca05a0be0104..69f5a6733cc6 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -11,7 +11,7 @@
<flag name="gles2">Enable GLESv2 support.</flag>
<flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
<flag name="lm-sensors">Enable Gallium HUD lm-sensors support.</flag>
- <flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
+ <flag name="opencl">Enable the Rusticl Gallium OpenCL state tracker.</flag>
<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag>
<flag name="proprietary-codecs">Enable codecs for patent-encumbered audio and video formats.</flag>
<flag name="valgrind">Compile in valgrind memory hints</flag>
diff --git a/profiles/arch/x86/package.use.mask b/profiles/arch/x86/package.use.mask
index c7e1ce732ff0..575ae8c07ec1 100644
--- a/profiles/arch/x86/package.use.mask
+++ b/profiles/arch/x86/package.use.mask
@@ -1,6 +1,10 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# Matt Turner <mattst88@gentoo.org> (2023-05-12)
+# Likely untested upstream. Not worth the hassle.
+>=media-libs/mesa-23.1 opencl
+
# Ionen Wolkens <ionen@gentoo.org> (2023-03-30)
# Needs x11-drivers/nvidia-drivers which is no longer available here.
media-tv/mythtv nvdec
diff --git a/profiles/features/wd40/package.use.mask b/profiles/features/wd40/package.use.mask
index 9b572fad640f..6f804cffb525 100644
--- a/profiles/features/wd40/package.use.mask
+++ b/profiles/features/wd40/package.use.mask
@@ -1,6 +1,10 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# Matt Turner <mattst88@gentoo.org> (2023-05-12)
+# The Rusticl OpenCL state tracker requires rust
+>=media-libs/mesa-23.1 opencl
+
# Michał Górny <mgorny@gentoo.org> (2023-03-09)
# Packages needing dev-python/selenium.
dev-python/aiohttp-cors test