public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: profiles/features/wd40/, media-libs/mesa/, profiles/arch/x86/
@ 2023-05-12 17:18 Matt Turner
  0 siblings, 0 replies; only message in thread
From: Matt Turner @ 2023-05-12 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     9797e687d9bf332f49dc448791510e85efc20257
Author:     Niccolò Belli <niccolo.belli <AT> linuxsystems <DOT> it>
AuthorDate: Thu Nov 10 10:55:29 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 12 17:18:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9797e687

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 <AT> linuxsystems.it>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/mesa-9999.ebuild        | 32 +++++++++++++++++---------------
 media-libs/mesa/metadata.xml            |  2 +-
 profiles/arch/x86/package.use.mask      |  4 ++++
 profiles/features/wd40/package.use.mask |  4 ++++
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-12 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 17:18 [gentoo-commits] repo/gentoo:master commit in: profiles/features/wd40/, media-libs/mesa/, profiles/arch/x86/ Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox