mesa: update to 19.3.1.

This commit is contained in:
travankor 2019-12-20 04:19:09 -07:00 committed by Juan RP
parent 98733daa85
commit 2266f8b7ed
4 changed files with 14 additions and 76 deletions

View file

@ -1,14 +1,17 @@
Upstream: https://gitlab.freedesktop.org/mesa/mesa/issues/966
Status: Not fixed upstream
diff --git meson.build meson.build
index 4afd8ca..ab9b365 100644
--- meson.build
+++ meson.build
@@ -378,7 +378,8 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
@@ -387,7 +387,8 @@
endif
# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
-if not with_platform_android or get_option('platform-sdk-version') >= 29
-if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29)
+with_use_elf_tls = get_option('use-elf-tls')
+if with_use_elf_tls and not with_platform_android or get_option('platform-sdk-version') >= 29
+if host_machine.system() != 'windows' and with_use_elf_tls and (not with_platform_android or get_option('platform-sdk-version') >= 29)
pre_args += '-DUSE_ELF_TLS'
endif
@ -16,7 +19,7 @@ diff --git meson_options.txt meson_options.txt
index b768c15..2533220 100644
--- meson_options.txt
+++ meson_options.txt
@@ -358,3 +358,9 @@ option(
@@ -366,3 +366,9 @@ option(
value : 25,
description : 'Android Platform SDK version. Default: Nougat version.'
)

View file

@ -1,11 +0,0 @@
--- src/mesa/meson.build
+++ src/mesa/meson.build
@@ -607,6 +607,7 @@
'x86/gen_matypes.c',
c_args : [c_vis_args, c_msvc_compat_args],
include_directories : inc_common,
+ native : true,
)
matypes_h = custom_target(
'matypes.h',

View file

@ -1,55 +0,0 @@
Upstream: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1785
Status: Merged
--- src/util/u_cpu_detect.c
+++ src/util/u_cpu_detect.c
@@ -92,7 +92,7 @@ static int has_cpuid(void);
#endif
-#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_APPLE)
+#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_APPLE) && !defined(PIPE_OS_LINUX)
static jmp_buf __lv_powerpc_jmpbuf;
static volatile sig_atomic_t __lv_powerpc_canjump = 0;
@@ -126,8 +126,29 @@ check_os_altivec_support(void)
util_cpu_caps.has_altivec = 1;
}
}
-#else /* !PIPE_OS_APPLE */
- /* not on Apple/Darwin, do it the brute-force way */
+#elif defined(PIPE_OS_LINUX) /* !PIPE_OS_APPLE */
+#if defined(PIPE_ARCH_PPC_64)
+ Elf64_auxv_t aux;
+#else
+ Elf32_auxv_t aux;
+#endif
+ int fd = open("/proc/self/auxv", O_RDONLY | O_CLOEXEC);
+ if (fd >= 0) {
+ while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) {
+ if (aux.a_type == AT_HWCAP) {
+ char *env_vsx = getenv("GALLIVM_VSX");
+ uint64_t hwcap = aux.a_un.a_val;
+ util_cpu_caps.has_altivec = (hwcap >> 28) & 1;
+ if (!env_vsx || env_vsx[0] != '0') {
+ util_cpu_caps.has_vsx = (hwcap >> 7) & 1;
+ }
+ break;
+ }
+ }
+ close(fd);
+ }
+#else /* !PIPE_OS_APPLE && !PIPE_OS_LINUX */
+ /* not on Apple/Darwin or Linux, do it the brute-force way */
/* this is borrowed from the libmpeg2 library */
signal(SIGILL, sigill_handler);
if (setjmp(__lv_powerpc_jmpbuf)) {
@@ -171,7 +192,7 @@ check_os_altivec_support(void)
util_cpu_caps.has_altivec = 0;
}
}
-#endif /* !PIPE_OS_APPLE */
+#endif /* !PIPE_OS_APPLE && !PIPE_OS_LINUX */
}
#endif /* PIPE_ARCH_PPC */

View file

@ -1,13 +1,13 @@
# Template file for 'mesa'
pkgname=mesa
version=19.2.7
revision=3
version=19.3.1
revision=1
wrksrc="mesa-${version}"
build_style=meson
configure_args="-Dglvnd=true -Dshared-glapi=true -Dgbm=true -Degl=true
-Dgallium-vdpau=true -Dgallium-xvmc=true -Dosmesa=gallium
-Dgles1=true -Dgles2=true -Dgallium-va=true -Dlmsensors=true
-Dplatforms=x11,drm,$(vopt_if wayland wayland,)surfaceless -Dllvm=true
-Dplatforms=x11,drm,$(vopt_if wayland wayland),surfaceless -Dllvm=true
-Db_lto=false"
hostmakedepends="flex libxml2-python llvm pkg-config
python3-Mako $(vopt_if wayland 'wayland-protocols wayland-devel')
@ -24,7 +24,7 @@ license="MIT, LGPL-2.1-or-later"
homepage="https://www.mesa3d.org/"
changelog="https://www.mesa3d.org/relnotes/${version}.html"
distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
checksum=e3799fb7896fd9ed2f90f651fb907b95cdebfbd494968ff116e6bf1be143579e
checksum=cd951db69c56a97ff0570a7ab2c0e39e6c5323f4cd8f4eb8274723e033beae59
build_options="wayland"
build_options_default="wayland"
@ -105,7 +105,7 @@ case "$XBPS_TARGET_MACHINE" in
esac
case "$XBPS_TARGET_MACHINE" in
# Disable TLS with musl: https://bugs.freedesktop.org/show_bug.cgi?id=35268
# Disable TLS with musl: https://gitlab.freedesktop.org/mesa/mesa/issues/966
# TODO: maybe this is handled by libglvnd now
*-musl) configure_args+=" -Duse-elf-tls=false";;
*) configure_args+=" -Dglx=dri";;
@ -158,7 +158,8 @@ MesaLib-devel_package() {
depends="xorgproto libxshmfence-devel libXext-devel libXxf86vm-devel
libXdamage-devel expat-devel libXfixes-devel libX11-devel libxcb-devel
libdrm-devel libglvnd-devel
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}"
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}
mesa>=${version}_${revision}"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) depends+=" libxatracker>=${version}_${revision}";;
esac