diff --git a/mesa-32/.footprint b/mesa-32/.footprint index 9f216751..9ef72257 100644 --- a/mesa-32/.footprint +++ b/mesa-32/.footprint @@ -68,7 +68,3 @@ lrwxrwxrwx root/root usr/lib32/vdpau/libvdpau_radeonsi.so.1 -> libvdpau_radeonsi lrwxrwxrwx root/root usr/lib32/vdpau/libvdpau_radeonsi.so.1.0 -> libvdpau_radeonsi.so.1.0.0 -rwxr-xr-x root/root usr/lib32/vdpau/libvdpau_radeonsi.so.1.0.0 drwxr-xr-x root/root usr/share/ -drwxr-xr-x root/root usr/share/vulkan/ -drwxr-xr-x root/root usr/share/vulkan/icd.d/ --rw-r--r-- root/root usr/share/vulkan/icd.d/intel_icd.i686.json --rw-r--r-- root/root usr/share/vulkan/icd.d/radeon_icd.i686.json diff --git a/mesa-32/.signature b/mesa-32/.signature index 07b5190e..db78e77e 100644 --- a/mesa-32/.signature +++ b/mesa-32/.signature @@ -1,7 +1,6 @@ untrusted comment: verify with /etc/ports/compat-32.pub -RWSwxGo/zH7eXRQBnhbGs/20XRQJFLpm6TqqDgr168VleP0tGTeE6ab7c50ZKkIedbggxmATdj14VJGHkPHZIW27mEH8UrfvUwY= -SHA256 (Pkgfile) = 6e23c5dfcb488b1a0b59ffec038d97488c7d96b761155f60f96a00996d824428 -SHA256 (.footprint) = 780b1525e8bf8a789c2aa204c5970636473be4cc1a6eb1925996af6df2842b84 -SHA256 (mesa-21.2.3.tar.xz) = 7245284a159d2484770e1835a673e79e4322a9ddf43b17859668244946db7174 +RWSwxGo/zH7eXQfsJ31glempGBChfZCuQJA6it86NQ4CokZ/GJzS4hc+hLnVEead4YrAatGlV1Zv+qLfSTSzpHGA3qjTKCOAfg4= +SHA256 (Pkgfile) = ec9a0c94cd6c816f4b95520496ed5799031d4e37f5598cda4733e43fe71e5c7b +SHA256 (.footprint) = 527df008ed7201dc1ef1c9ca059be00ab21098b6463c86c4e4250b6e11f8ba23 +SHA256 (mesa-21.2.4.tar.xz) = fe6ede82d1ac02339da3c2ec1820a379641902fd351a52cc01153f76eff85b44 SHA256 (x86-linux-gnu) = 448877bbe3efe8bdfe6282c8e730fe8a8b6bf3c07f659e71b7292aceca22d8bd -SHA256 (gallium-llvm13.patch) = 78a877aed2965ba1bfb0bb9cb81dd176c84f7609c6a20ac76803df37532ccec5 diff --git a/mesa-32/Pkgfile b/mesa-32/Pkgfile index 6109dad5..d5943ad6 100644 --- a/mesa-32/Pkgfile +++ b/mesa-32/Pkgfile @@ -1,24 +1,25 @@ # Description: Mesa 3D Graphics Library # URL: https://www.mesa3d.org/ # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu -# Depends on: elfutils-32 expat-32 libdrm-32 libglvnd-32 libvdpau-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32 -# Optional: glslang wayland-32 wayland-protocols +# Depends on: elfutils-32 expat-32 libdrm-32 libglvnd-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32 +# Optional: libva libvdpau-32 wayland-protocols name=mesa-32 -version=21.2.3 +version=21.2.4 release=1 source=(https://archive.mesa3d.org/mesa-$version.tar.xz - x86-linux-gnu - gallium-llvm13.patch) + x86-linux-gnu) build() { export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig' - prt-get isinst wayland-32 wayland-protocols && PKGMK_MESA_PLATFORMS+=',wayland' - prt-get isinst glslang && PKGMK_MESA_PLATFORMS+=' -D vulkan-overlay-layer=true -D vulkan-device-select-layer=true' + prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-layers=device-select,intel-nullhw,overlay' + prt-get isinst libvdpau-32 && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled' + prt-get isinst wayland-protocols && PKGMK_MESA_PLATFORMS+='wayland' + ## for future references + #prt-get isinst xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 && PKGMK_MESA_PLATFORMS+=',x11' + PKGMK_MESA_PLATFORMS+=',x11' - patch -d mesa-$version -p1 -i $SRC/gallium-llvm13.patch - - meson setup mesa-$version build $PKGMK_MESA3D \ + meson setup mesa-$version build $PKGMK_MESA \ --cross-file=$SRC/x86-linux-gnu \ --prefix=/usr \ --libdir=/usr/lib32 \ @@ -27,20 +28,22 @@ build() { --wrap-mode nodownload \ -D b_lto=true \ -D b_pie=true \ + -D dri3=enabled \ + -D egl=enabled \ -D llvm=enabled \ -D shared-llvm=enabled \ -D gbm=enabled \ -D gles1=disabled \ -D gles2=enabled \ + -D glx=dri \ + -D osmesa=true \ -D osmesa=true \ - -D platforms=x11$PKGMK_MESA_PLATFORMS \ -D gallium-xa=enabled \ - -D gallium-vdpau=enabled \ -D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl \ + -D platforms=${PKGMK_MESA_PLATFORMS#,} \ + -D shared-glapi=enabled \ -D vulkan-drivers=amd,intel \ - -D glvnd=true \ - -D dri3=enabled \ - -D egl=enabled + -D glvnd=true meson compile -C build -j ${JOBS:-1} DESTDIR=$PKG meson install -C build @@ -48,5 +51,5 @@ build() { # indirect rendering symlink ln -s libGLX_mesa.so.0 $PKG/usr/lib32/libGLX_indirect.so.0 - rm -r $PKG/usr/{include,share/{drirc.d,glvnd}} + rm -r $PKG/usr/{bin,include,share/{drirc.d,glvnd,vulkan/{explicit_layer.d,implicit_layer.d}}} } diff --git a/mesa-32/gallium-llvm13.patch b/mesa-32/gallium-llvm13.patch deleted file mode 100644 index 6d168a28..00000000 --- a/mesa-32/gallium-llvm13.patch +++ /dev/null @@ -1,113 +0,0 @@ -From c1b4c64a28d9fc093229eab91a3a7fc4cb4fe29a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= -Date: Thu, 22 Jul 2021 07:34:09 +0200 -Subject: [PATCH 1/2] gallivm: add new wrapper around - Module::setOverrideStackAlignment() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We need it in the next commit to replace setting the stack alignment on -i386 with LLVM >= 13 through the TargetOption::StackAlignmentOverride, -which was removed in the upstream commit -. - -Unfortunately Module::setOverrideStackAlignment() is not available -through the C API and we need to wrap it ourselves. - -Signed-off-by: Kai Wasserbäch -Reference: mesa/mesa#4906 -Reviewed-by: Roland Scheidegger -Part-of: ---- - src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 +++++++++ - src/gallium/auxiliary/gallivm/lp_bld_misc.h | 3 +++ - 2 files changed, 12 insertions(+) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -index 44d07fe69c6..5f52ed08fae 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -@@ -615,3 +615,12 @@ lp_is_function(LLVMValueRef v) - { - return LLVMGetValueKind(v) == LLVMFunctionValueKind; - } -+ -+extern "C" void -+lp_set_module_stack_alignment_override(LLVMModuleRef MRef, unsigned align) -+{ -+#if LLVM_VERSION_MAJOR >= 13 -+ llvm::Module *M = llvm::unwrap(MRef); -+ M->setOverrideStackAlignment(align); -+#endif -+} -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/src/gallium/auxiliary/gallivm/lp_bld_misc.h -index f2a15f19e47..fa0ce90162e 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_misc.h -+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.h -@@ -91,6 +91,9 @@ lp_is_function(LLVMValueRef v); - - void - lp_free_objcache(void *objcache); -+ -+void -+lp_set_module_stack_alignment_override(LLVMModuleRef M, unsigned align); - #ifdef __cplusplus - } - #endif --- -GitLab - - -From 3a2d317b996f57647da23de7876142be4b9b71f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= -Date: Thu, 22 Jul 2021 07:42:12 +0200 -Subject: [PATCH 2/2] gallivm: fix FTBFS on i386 with LLVM >= 13, - StackAlignmentOverride is gone -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use the newly added wrapper lp_set_module_stack_alignment_override() to -achieve the same end result. - -Signed-off-by: Kai Wasserbäch -Closes: mesa/mesa#4906 -Reviewed-by: Roland Scheidegger -Part-of: ---- - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++++ - src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c -index 8e5fe6f24dc..d2d049ace5e 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_init.c -+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c -@@ -347,6 +347,10 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, - if (!gallivm->module) - goto fail; - -+#if defined(PIPE_ARCH_X86) -+ lp_set_module_stack_alignment_override(gallivm->module, 4); -+#endif -+ - gallivm->builder = LLVMCreateBuilderInContext(gallivm->context); - if (!gallivm->builder) - goto fail; -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -index 5f52ed08fae..be288ab02e2 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -@@ -350,7 +350,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, - * friends for configuring code generation options, like stack alignment. - */ - TargetOptions options; --#if defined(PIPE_ARCH_X86) -+#if defined(PIPE_ARCH_X86) && LLVM_VERSION_MAJOR < 13 - options.StackAlignmentOverride = 4; - #endif - --- -GitLab -