mesa: 25.2.6 -> 25.3.0
This commit is contained in:
@@ -5,14 +5,14 @@
|
|||||||
# nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa
|
# nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa
|
||||||
rec {
|
rec {
|
||||||
pname = "mesa";
|
pname = "mesa";
|
||||||
version = "25.2.6";
|
version = "25.3.0";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "gitlab.freedesktop.org";
|
domain = "gitlab.freedesktop.org";
|
||||||
owner = "mesa";
|
owner = "mesa";
|
||||||
repo = "mesa";
|
repo = "mesa";
|
||||||
rev = "mesa-${version}";
|
rev = "mesa-${version}";
|
||||||
hash = "sha256-erfvNR1Yor3k8gVVClyiBJsgyaOv7BMFd1NSgieTY5I=";
|
hash = "sha256-MviXDRAbCEXM9dIzD94/CM0bjlF4zCJUVE91Xst/uII=";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
spirv-tools,
|
spirv-tools,
|
||||||
intltool,
|
intltool,
|
||||||
jdupes,
|
jdupes,
|
||||||
|
libdisplay-info,
|
||||||
libdrm,
|
libdrm,
|
||||||
libgbm,
|
libgbm,
|
||||||
libglvnd,
|
libglvnd,
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
"asahi" # Apple AGX
|
"asahi" # Apple AGX
|
||||||
"crocus" # Intel legacy
|
"crocus" # Intel legacy
|
||||||
"d3d12" # WSL emulated GPU (aka Dozen)
|
"d3d12" # WSL emulated GPU (aka Dozen)
|
||||||
|
"ethosu" # ARM Ethos NPU
|
||||||
"etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs)
|
"etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs)
|
||||||
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
|
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
|
||||||
"i915" # Intel extra legacy
|
"i915" # Intel extra legacy
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
"r300" # very old AMD
|
"r300" # very old AMD
|
||||||
"r600" # less old AMD
|
"r600" # less old AMD
|
||||||
"radeonsi" # new AMD (GCN+)
|
"radeonsi" # new AMD (GCN+)
|
||||||
|
"rocket" # Rockchip NPU
|
||||||
"softpipe" # older software renderer
|
"softpipe" # older software renderer
|
||||||
"svga" # VMWare virtualized GPU
|
"svga" # VMWare virtualized GPU
|
||||||
"tegra" # Nvidia Tegra SoCs
|
"tegra" # Nvidia Tegra SoCs
|
||||||
@@ -75,7 +78,7 @@
|
|||||||
"broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D)
|
"broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D)
|
||||||
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
|
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
|
||||||
"gfxstream" # Android virtualized GPU
|
"gfxstream" # Android virtualized GPU
|
||||||
"imagination-experimental" # PowerVR Rogue (currently N/A)
|
"imagination" # PowerVR Rogue (currently N/A)
|
||||||
"intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
|
"intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
|
||||||
"intel" # new Intel (aka ANV)
|
"intel" # new Intel (aka ANV)
|
||||||
"microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
|
"microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
|
||||||
@@ -96,6 +99,7 @@
|
|||||||
"wayland"
|
"wayland"
|
||||||
],
|
],
|
||||||
vulkanLayers ? [
|
vulkanLayers ? [
|
||||||
|
"anti-lag"
|
||||||
"device-select"
|
"device-select"
|
||||||
"intel-nullhw"
|
"intel-nullhw"
|
||||||
"overlay"
|
"overlay"
|
||||||
@@ -144,8 +148,6 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./opencl.patch
|
./opencl.patch
|
||||||
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37027
|
|
||||||
./gallivm-llvm-21.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@@ -256,6 +258,7 @@ stdenv.mkDerivation {
|
|||||||
elfutils
|
elfutils
|
||||||
expat
|
expat
|
||||||
spirv-tools
|
spirv-tools
|
||||||
|
libdisplay-info
|
||||||
libdrm
|
libdrm
|
||||||
libgbm
|
libgbm
|
||||||
libglvnd
|
libglvnd
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
From eca19331d94005485de5246cfa87a21621486cd8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: no92 <no92.mail@gmail.com>
|
|
||||||
Date: Wed, 27 Aug 2025 16:02:31 +0200
|
|
||||||
Subject: [PATCH] gallivm: support LLVM 21
|
|
||||||
|
|
||||||
LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`,
|
|
||||||
dropping the Triple argument. The PR was first included in the LLVM 21
|
|
||||||
series, and the new signature is gated behind a version check for that.
|
|
||||||
|
|
||||||
`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6,
|
|
||||||
and the ORC examples in the LLVM tree seem to just create a context
|
|
||||||
instead, which we replicate here.
|
|
||||||
|
|
||||||
With this commit, mesa successfully builds the llvmpipe gallium driver
|
|
||||||
on riscv64 with LLVM 21.1.0.
|
|
||||||
|
|
||||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785
|
|
||||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852
|
|
||||||
|
|
||||||
Reviewed-by: David Heidelberg <david@ixit.cz>
|
|
||||||
---
|
|
||||||
src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
|
|
||||||
index 3d2b8cf81bc0c..0be69b02b6eef 100644
|
|
||||||
--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
|
|
||||||
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
|
|
||||||
@@ -340,7 +340,12 @@ LPJit::LPJit() :jit_dylib_count(0) {
|
|
||||||
.setJITTargetMachineBuilder(std::move(JTMB))
|
|
||||||
#ifdef USE_JITLINK
|
|
||||||
.setObjectLinkingLayerCreator(
|
|
||||||
+#if LLVM_VERSION_MAJOR >= 21
|
|
||||||
+ /* LLVM 21 removed the Triple argument */
|
|
||||||
+ [&](ExecutionSession &ES) {
|
|
||||||
+#else
|
|
||||||
[&](ExecutionSession &ES, const llvm::Triple &TT) {
|
|
||||||
+#endif
|
|
||||||
return std::make_unique<ObjectLinkingLayer>(
|
|
||||||
ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
|
|
||||||
})
|
|
||||||
@@ -552,7 +557,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
|
||||||
gallivm->cache = cache;
|
|
||||||
|
|
||||||
gallivm->_ts_context = context->ref;
|
|
||||||
- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref);
|
|
||||||
+ gallivm->context = LLVMContextCreate();
|
|
||||||
|
|
||||||
gallivm->module_name = LPJit::get_unique_name(name);
|
|
||||||
gallivm->module = LLVMModuleCreateWithNameInContext(gallivm->module_name,
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user