summaryrefslogtreecommitdiff
path: root/user/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'user/mesa')
-rw-r--r--user/mesa/APKBUILD123
-rw-r--r--user/mesa/big-endian-flipping.patch37
-rw-r--r--user/mesa/musl-fixes.patch11
-rw-r--r--user/mesa/no-tls.patch25
-rw-r--r--user/mesa/nouveau-flush-fix.patch11
5 files changed, 58 insertions, 149 deletions
diff --git a/user/mesa/APKBUILD b/user/mesa/APKBUILD
index d5f828129..2bc34d02d 100644
--- a/user/mesa/APKBUILD
+++ b/user/mesa/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=mesa
-pkgver=21.3.9
-_llvmver=14
+pkgver=24.3.0
+_llvmver=18
pkgrel=0
pkgdesc="Mesa DRI OpenGL library"
url="https://www.mesa3d.org"
@@ -11,36 +11,34 @@ license="MIT AND X11 AND SGI-B-2.0 AND BSL-1.0 AND LGPL-2.1+"
depends=""
depends_dev="libdrm-dev libxcb-dev libxdamage-dev libxext-dev libxshmfence-dev
xorgproto-dev"
-makedepends="$depends_dev bison eudev-dev expat-dev flex libelf-dev
+makedepends="$depends_dev bison eudev-dev expat-dev flex libelf-dev libglvnd-dev
libva-dev libvdpau-dev libx11-dev libxfixes-dev libxrandr-dev libxt-dev
libxv-dev libxvmc-dev libxxf86vm-dev llvm$_llvmver-dev makedepend meson
ninja python3 py3-libxml2 py3-mako py3-pygments py3-markupsafe
- wayland-dev wayland-protocols
- zlib-dev zstd-dev"
-subpackages="$pkgname-dev $pkgname-dri
- $pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles
- $pkgname-xatracker $pkgname-osmesa $pkgname-gbm"
-# requires glslang: $pkgname-vulkan-overlay
-source="https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz
- big-endian-flipping.patch
- musl-fixes.patch
- no-tls.patch
- nouveau-flush-fix.patch
- "
+ py3-cparser py3-pyyaml rust wayland-dev wayland-protocols glslang-dev
+ zlib-dev zstd-dev bindgen-cli cbindgen clang-dev libarchive-dev"
+replaces="mesa-egl mesa-gl mesa-glapi mesa-gles"
+subpackages="$pkgname-dev $pkgname-dri $pkgname-vulkan-overlay $pkgname-gbm
+ $pkgname-d3d $pkgname-xatracker $pkgname-osmesa"
+source="https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz"
_dri_driverdir=/usr/lib/xorg/modules/dri
-_dri_drivers="r200,nouveau"
-_gallium_drivers="r300,r600,radeonsi,nouveau,swrast,virgl"
-_vulkan_drivers="amd"
+_gallium_drivers="r300,r600,radeonsi,nouveau,softpipe,llvmpipe,virgl,zink,svga"
+_vulkan_drivers="amd,nouveau,swrast,virtio"
case "$CARCH" in
+x86_64)
+ _gallium_drivers="${_gallium_drivers},i915,svga,crocus"
+ _vulkan_drivers="${_vulkan_drivers},microsoft-experimental"
+ _arch_conf="-Dintel-rt=enabled"
+ ;;
x86* | pmmx)
- _dri_drivers="${_dri_drivers},i965"
- _gallium_drivers="${_gallium_drivers},i915,svga,iris"
- _vulkan_drivers="${_vulkan_drivers},intel"
+ _gallium_drivers="${_gallium_drivers},i915,svga,crocus"
+ _arch_conf="-Dsse2=false"
;;
aarch64 | arm*)
- _gallium_drivers="${_gallium_drivers},vc4,freedreno,tegra,kmsro,v3d,lima,panfrost,etnaviv"
+ _gallium_drivers="${_gallium_drivers},vc4,freedreno,tegra,v3d,lima,panfrost,etnaviv"
+ _vulkan_drivers="${_vulkan_drivers},freedreno,panfrost,broadcom"
case "$CARCH" in
armhf) CFLAGS="$CFLAGS -mfpu=neon";;
esac
@@ -51,14 +49,34 @@ ppc64)
esac
build() {
+ # This is to fix #796, and is derived from:
+ # https://gitlab.freedesktop.org/mesa/mesa/-/commit/cc2b3a99ccf035a084d768e5c5ffa81478d685c1
+ cat > native.file <<EOF
+[binaries]
+llvm-config = '$(command -v llvm${_llvmver}-config)'
+rust = ['rustc', '--target=${CHOST}']
+EOF
+
meson \
+ --native-file=native.file \
-Dprefix=/usr \
-Ddri-drivers-path=$_dri_driverdir \
- -Dplatforms=x11,wayland \
- -Ddri-drivers=$_dri_drivers \
-Dgallium-drivers=$_gallium_drivers \
- -Dvulkan-drivers=$_vulkan_drivers \
+ -Dgallium-nine=true \
+ -Dgallium-opencl=disabled \
+ -Dgallium-rusticl=false \
+ -Dgallium-va=enabled \
+ -Dgallium-vdpau=enabled \
+ -Dgallium-xa=enabled \
+ -Dglvnd=enabled \
+ -Dglx=dri \
+ -Dmicrosoft-clc=disabled \
+ -Dopencl-spirv=false \
-Dosmesa=true \
+ -Dplatforms=x11,wayland \
+ -Dvideo-codecs=all_free \
+ -Dvulkan-drivers=$_vulkan_drivers \
+ -Dvulkan-layers=device-select,overlay \
$_arch_conf \
build
@@ -69,35 +87,11 @@ package() {
DESTDIR="$pkgdir" ninja -C build install
}
-egl() {
- replaces="mesa"
- pkgdesc="Mesa libEGL runtime libraries"
- install -d "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libEGL.so* \
- "$subpkgdir"/usr/lib/
-}
-
-gl() {
- replaces="mesa"
- pkgdesc="Mesa libGL runtime libraries"
- install -d "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libGL.so* \
- "$subpkgdir"/usr/lib/
-}
-
-glapi() {
- replaces="$pkgname-gles"
- pkgdesc="Mesa OpenGL API"
- install -d "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libglapi.so.* \
- "$subpkgdir"/usr/lib/
-}
-
-gles() {
+d3d() {
replaces="mesa"
- pkgdesc="Mesa libGLESv2 runtime libraries"
+ pkgdesc="Mesa Direct3D adaptor libraries"
install -d "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libGLES*.so* \
+ mv "$pkgdir"/usr/lib/d3d \
"$subpkgdir"/usr/lib/
}
@@ -123,14 +117,16 @@ gbm() {
"$subpkgdir"/usr/lib/
}
-vulkan_overlay() {
- pkgdesc="Vulkan layer to display information about the current window"
+overlay() {
+ pkgdesc="Vulkan overlays to display information"
+ install -d "$subpkgdir"/usr/bin
install -d "$subpkgdir"/usr/lib
- install -d "$subpkgdir"/usr/share/vulkan/explicit_layer.d
- mv "$pkgdir"/usr/lib/libVkLayer_MESA_overlay.so \
+ install -d "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/lib/libVkLayer_MESA_*.so \
"$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json \
- "$subpkgdir"/usr/share/vulkan/explicit_layer.d/
+ mv "$pkgdir"/usr/share/vulkan \
+ "$subpkgdir"/usr/share/vulkan
+ mv "$pkgdir"/usr/bin/mesa-overlay-control.py "$subpkgdir"/usr/bin
}
dri() {
@@ -138,22 +134,19 @@ dri() {
replaces="mesa-dri-ati mesa-dri-freedreno mesa-dri-intel
mesa-dri-nouveau mesa-dri-swrast mesa-dri-tegra mesa-dri-vc4
mesa-dri-virtio mesa-dri-vmwgfx"
+ depends="mesa=$pkgver-r$pkgrel"
provides="$replaces"
install -d "$subpkgdir"/usr/lib/xorg/modules
install -d "$subpkgdir"/usr/share/vulkan
mv "$pkgdir"/usr/lib/dri "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/xorg/modules/dri "$subpkgdir"/usr/lib/xorg/modules/
mv "$pkgdir"/usr/share/drirc.d "$subpkgdir"/usr/share/
- # XvMC drivers
- mv "$pkgdir"/usr/lib/libXvMC*.so* "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/share/glvnd "$subpkgdir"/usr/share/
+ mv "$pkgdir"/usr/lib/libgallium*.so* "$subpkgdir"/usr/lib/ || true
# support non-Vulkan arches
mv "$pkgdir"/usr/lib/libvulkan*.so* "$subpkgdir"/usr/lib/ || true
mv "$pkgdir"/usr/lib/vdpau "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/share/vulkan/icd.d "$subpkgdir"/usr/share/vulkan/
}
-sha512sums="4cec6f4f50f444fcd327f7c40f8899c2f265e348e121455262b540b1f890a1468bbea59965af0876c548fa97aa0a05a1b23fa6ca7d308bd60328cfdeab757684 mesa-21.3.9.tar.xz
-3417e5c6d7ec564178e1d72431042b0a6ba659321f13a3dda81eda5fa0f2c8bc7c6972cb8266aea84ab05976ffb161659e9988c50ecc418e8bc1e1ce8f93a65f big-endian-flipping.patch
-9f7a050f09571a2b17098d495b82e2e85b293fb7285e7d6d7c3c48cd4220a1bdcc61a7321ba78dd14860939ecabe7e89b32d6110f3728f793273e1e26b78a553 musl-fixes.patch
-076bb17d85235f3c833af8f1641f3556e406ad187b7ae1ebacced5f57b8832243a878678de4e50880c9a50b2aae3c42ad2342ed8c3e18d881edb7dd5018a710e no-tls.patch
-7283dc0e86e1ddaf4590008db57dd591921f47928945782afaa283f3b87770c731bab19d3d8879b4bf8b785f8886b9b46c576ca735296123f8afff29655abaeb nouveau-flush-fix.patch"
+sha512sums="20168ae4c278776a60d5febf53b3367cf08bffffb40ef2054821e68d7a8c37a07871d097ab17555f41a4fe716f0de7df95ad7d452b1ed57db6527838eb839ba4 mesa-24.3.0.tar.xz"
diff --git a/user/mesa/big-endian-flipping.patch b/user/mesa/big-endian-flipping.patch
deleted file mode 100644
index 154a83108..000000000
--- a/user/mesa/big-endian-flipping.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f1e0d76264491a8d8f99a0041b1a36cf9752fd28 Mon Sep 17 00:00:00 2001
-From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
-Date: Thu, 27 Feb 2020 04:24:52 -0600
-Subject: [PATCH] mesa: Support flipping three-channel formats
-
-Test system: POWER9 ppc64 (BE) system with a Radeon R5 230.
-
-Before this commit, starting Xorg caused this message:
-Assertion failed: !"Invalid array format" (../src/mesa/main/formats.c: _mesa_array_format_flip_channels: 421)
-
-After this commit, Xorg starts successfully.
----
- src/mesa/main/formats.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
-index 370859d37ca..2e7d5d7f05e 100644
---- a/src/mesa/main/formats.c
-+++ b/src/mesa/main/formats.c
-@@ -419,6 +419,14 @@ _mesa_array_format_flip_channels(mesa_array_format format)
- return format;
- }
-
-+ if (num_channels == 3) {
-+ static const uint8_t flip[6] = { 2, 1, 0, 3, 4, 5 };
-+ _mesa_array_format_set_swizzle(&format,
-+ flip[swizzle[0]], flip[swizzle[1]],
-+ flip[swizzle[2]], flip[swizzle[3]]);
-+ return format;
-+ }
-+
- if (num_channels == 4) {
- static const uint8_t flip[6] = { 3, 2, 1, 0, 4, 5 };
- _mesa_array_format_set_swizzle(&format,
---
-2.25.1
-
diff --git a/user/mesa/musl-fixes.patch b/user/mesa/musl-fixes.patch
deleted file mode 100644
index dd3e6bb64..000000000
--- a/user/mesa/musl-fixes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
-+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
-
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"
-
diff --git a/user/mesa/no-tls.patch b/user/mesa/no-tls.patch
deleted file mode 100644
index 803fa3707..000000000
--- a/user/mesa/no-tls.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- mesa-21.3.8/meson.build.old 2022-03-18 14:26:47.000000000 -0500
-+++ mesa-21.3.8/meson.build 2022-05-30 00:00:21.689085198 -0500
-@@ -508,22 +508,7 @@
- error('-Degl-native-platform does not specify an enabled platform')
- endif
-
--# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
- use_elf_tls = false
--if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
-- (not with_platform_android or get_option('platform-sdk-version') >= 29) and
-- (not with_platform_windows or not with_shared_glapi))
-- pre_args += '-DUSE_ELF_TLS'
-- use_elf_tls = true
--
-- if with_platform_android
-- # By default the NDK compiler, at least, emits emutls references instead of
-- # ELF TLS, even when building targeting newer API levels. Make it actually do
-- # ELF TLS instead.
-- c_args += '-fno-emulated-tls'
-- cpp_args += '-fno-emulated-tls'
-- endif
--endif
-
- if with_glx != 'disabled'
- if not (with_platform_x11 and with_any_opengl)
diff --git a/user/mesa/nouveau-flush-fix.patch b/user/mesa/nouveau-flush-fix.patch
deleted file mode 100644
index 97512d01a..000000000
--- a/user/mesa/nouveau-flush-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mesa-21.3.8/src/mesa/drivers/dri/nouveau/nouveau_driver.c.old 2022-03-18 19:26:47.000000000 +0000
-+++ mesa-21.3.8/src/mesa/drivers/dri/nouveau/nouveau_driver.c 2023-10-23 06:05:10.177357372 +0000
-@@ -69,7 +69,7 @@
- struct nouveau_context *nctx = to_nouveau_context(ctx);
- struct nouveau_pushbuf *push = context_push(ctx);
-
-- PUSH_KICK(push);
-+ if (push) PUSH_KICK(push);
-
- if (ctx->DrawBuffer && _mesa_is_winsys_fbo(ctx->DrawBuffer) &&
- ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {