mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-18 23:27:01 +02:00
mesa: update to 22.3.5.
* remove obsolete add-elf-use-tls patch * remove xvmc * build intel_hasvk vulkan driver for older intel GPUs * build rusticl opencl implementation Closes: #41084 [via git-merge-pr]
This commit is contained in:
parent
e5d1ae158c
commit
dabdc2131a
5 changed files with 98 additions and 57 deletions
|
@ -1 +0,0 @@
|
|||
mesa
|
|
@ -1,29 +0,0 @@
|
|||
--- a/meson.build 2022-09-20 17:01:37.000000000 -0400
|
||||
+++ b/meson.build 2022-10-04 16:17:45.905483957 -0400
|
||||
@@ -504,6 +504,11 @@
|
||||
pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
|
||||
endforeach
|
||||
|
||||
+use_elf_tls = get_option('use-elf-tls')
|
||||
+if use_elf_tls
|
||||
+ pre_args += '-DUSE_ELF_TLS'
|
||||
+endif
|
||||
+
|
||||
if with_platform_android and get_option('platform-sdk-version') >= 29
|
||||
# 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
|
||||
--- a/meson_options.txt 2022-09-20 17:01:37.000000000 -0400
|
||||
+++ b/meson_options.txt 2022-10-04 16:21:30.469304615 -0400
|
||||
@@ -472,6 +472,12 @@
|
||||
description : 'Android Platform SDK version. Default: Nougat version.'
|
||||
)
|
||||
option(
|
||||
+ 'use-elf-tls',
|
||||
+ type : 'boolean',
|
||||
+ value : true,
|
||||
+ description : 'Build support for initial-exec TLS model'
|
||||
+)
|
||||
+option(
|
||||
'zstd',
|
||||
type : 'combo',
|
||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
@ -0,0 +1,77 @@
|
|||
From c426e5677f36c3b0b8e8ea199ed4f2c7fad06d47 Mon Sep 17 00:00:00 2001
|
||||
From: Erico Nunes <nunes.erico@gmail.com>
|
||||
Date: Sun, 12 Feb 2023 22:33:30 +0100
|
||||
Subject: [PATCH] lima: don't use resource_from_handle while creating scanout
|
||||
|
||||
resource_from_handle implementations create an additional reference to
|
||||
the scanout resource, which caused lima to leak those resources after
|
||||
commit ad4d7ca8332488be8a75aff001f00306a9f6402e.
|
||||
|
||||
Do as the other drivers do and import the bo directly while creating
|
||||
the scanount resource.
|
||||
|
||||
Cc: 22.3 mesa-stable
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8198
|
||||
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
|
||||
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21330>
|
||||
---
|
||||
src/gallium/drivers/lima/lima_resource.c | 26 ++++++++++++++++++------
|
||||
1 file changed, 20 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c
|
||||
index 54869ec03d24..0b7691f2b46f 100644
|
||||
--- a/src/gallium/drivers/lima/lima_resource.c
|
||||
+++ b/src/gallium/drivers/lima/lima_resource.c
|
||||
@@ -59,7 +59,10 @@ lima_resource_create_scanout(struct pipe_screen *pscreen,
|
||||
struct lima_screen *screen = lima_screen(pscreen);
|
||||
struct renderonly_scanout *scanout;
|
||||
struct winsys_handle handle;
|
||||
- struct pipe_resource *pres;
|
||||
+
|
||||
+ struct lima_resource *res = CALLOC_STRUCT(lima_resource);
|
||||
+ if (!res)
|
||||
+ return NULL;
|
||||
|
||||
struct pipe_resource scanout_templat = *templat;
|
||||
scanout_templat.width0 = width;
|
||||
@@ -71,20 +74,31 @@ lima_resource_create_scanout(struct pipe_screen *pscreen,
|
||||
if (!scanout)
|
||||
return NULL;
|
||||
|
||||
+ res->base = *templat;
|
||||
+ res->base.screen = pscreen;
|
||||
+ pipe_reference_init(&res->base.reference, 1);
|
||||
+ res->levels[0].offset = handle.offset;
|
||||
+ res->levels[0].stride = handle.stride;
|
||||
+
|
||||
assert(handle.type == WINSYS_HANDLE_TYPE_FD);
|
||||
- pres = pscreen->resource_from_handle(pscreen, templat, &handle,
|
||||
- PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE);
|
||||
+ res->bo = lima_bo_import(screen, &handle);
|
||||
+ if (!res->bo) {
|
||||
+ FREE(res);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ res->modifier_constant = true;
|
||||
|
||||
close(handle.handle);
|
||||
- if (!pres) {
|
||||
+ if (!res->bo) {
|
||||
renderonly_scanout_destroy(scanout, screen->ro);
|
||||
+ FREE(res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- struct lima_resource *res = lima_resource(pres);
|
||||
res->scanout = scanout;
|
||||
|
||||
- return pres;
|
||||
+ return &res->base;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
--
|
||||
GitLab
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'mesa'
|
||||
pkgname=mesa
|
||||
version=22.2.4
|
||||
revision=2
|
||||
version=22.3.5
|
||||
revision=1
|
||||
build_style=meson
|
||||
configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
|
||||
-Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled
|
||||
|
@ -9,7 +9,7 @@ configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
|
|||
-Dllvm=enabled -Db_lto=false -Dcpp_std=gnu++14"
|
||||
hostmakedepends="gettext flex llvm pkg-config python3-Mako glslang
|
||||
$(vopt_if wayland 'wayland-protocols wayland-devel')"
|
||||
makedepends="elfutils-devel expat-devel libXdamage-devel libXvMC-devel
|
||||
makedepends="elfutils-devel expat-devel libXdamage-devel
|
||||
libXxf86vm-devel libatomic-devel libdrm-devel libffi-devel libva-devel
|
||||
libvdpau-devel libxshmfence-devel ncurses-devel zlib-devel
|
||||
$(vopt_if wayland 'wayland-devel wayland-protocols') llvm libsensors-devel
|
||||
|
@ -22,15 +22,11 @@ license="MIT, LGPL-2.1-or-later"
|
|||
homepage="https://www.mesa3d.org/"
|
||||
changelog="https://docs.mesa3d.org/relnotes.html"
|
||||
distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
|
||||
checksum=65d76b53ca5c7b46019e0e8e5b414de45d2fecd3fcd71707f6c3bc7691c9f7ab
|
||||
checksum=3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9
|
||||
|
||||
build_options="wayland"
|
||||
build_options_default="wayland"
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
configure_args+=" -Duse-elf-tls=false"
|
||||
fi
|
||||
|
||||
# only use llvmpipe on targets where it's supported and reliable
|
||||
# especially on big endian it's all kinds of broken, and e.g. on
|
||||
# 32-bit powerpc it does not work at all, so fall back to softpipe
|
||||
|
@ -95,7 +91,7 @@ fi
|
|||
if [ "$_have_intel" ]; then
|
||||
_have_vulkan=yes
|
||||
_gallium_drivers+=",crocus,iris,i915"
|
||||
_vulkan_drivers+=",intel"
|
||||
_vulkan_drivers+=",intel,intel_hasvk"
|
||||
subpackages+=" mesa-vulkan-intel"
|
||||
# transitional dummy packages
|
||||
subpackages+=" mesa-intel-dri"
|
||||
|
@ -144,17 +140,17 @@ fi
|
|||
|
||||
# enabled currently by amd drivers
|
||||
if [ "$_have_opencl" ]; then
|
||||
hostmakedepends+=" clang"
|
||||
makedepends+=" clang libclc"
|
||||
hostmakedepends+=" clang rust rust-bindgen"
|
||||
makedepends+=" clang libclc rust SPIRV-LLVM-Translator-devel SPIRV-Tools-devel"
|
||||
subpackages+=" mesa-opencl"
|
||||
configure_args+=" -Dgallium-opencl=icd"
|
||||
configure_args+=" -Dgallium-opencl=icd -Dgallium-rusticl=true -Drust_std=2021"
|
||||
fi
|
||||
|
||||
if [ "$_have_hwdec" ]; then
|
||||
configure_args+=" -Dgallium-vdpau=enabled -Dgallium-va=enabled -Dgallium-xvmc=enabled"
|
||||
subpackages+=" mesa-vaapi mesa-vdpau mesa-XvMC"
|
||||
configure_args+=" -Dgallium-vdpau=enabled -Dgallium-va=enabled"
|
||||
subpackages+=" mesa-vaapi mesa-vdpau"
|
||||
else
|
||||
configure_args+=" -Dgallium-vdpau=disabled -Dgallium-va=disabled -Dgallium-xvmc=disabled"
|
||||
configure_args+=" -Dgallium-vdpau=disabled -Dgallium-va=disabled"
|
||||
fi
|
||||
|
||||
# empty values introduced by leading comma are not allowed; the whole enumeration can be empty
|
||||
|
@ -191,6 +187,7 @@ esac
|
|||
post_configure() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
find -iname "*.ninja" -exec sed -i "{}" \
|
||||
-e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
|
||||
-e "s; /usr/lib/; ${XBPS_CROSS_BASE}/usr/lib/;g" \
|
||||
-e "s;-L/usr/lib;-L${XBPS_CROSS_BASE}/usr/lib;g" \
|
||||
-e "s;-I/usr/include;-I${XBPS_CROSS_BASE}/usr/include;g" \
|
||||
|
@ -289,6 +286,7 @@ MesaLib-devel_package() {
|
|||
fi
|
||||
if [ "$_have_opencl" ]; then
|
||||
vmove usr/lib/libMesaOpenCL.so
|
||||
vmove usr/lib/libRusticlOpenCL.so
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
@ -307,6 +305,7 @@ mesa-opencl_package() {
|
|||
vmove etc/OpenCL
|
||||
vmove usr/lib/gallium-pipe
|
||||
vmove "usr/lib/libMesaOpenCL.so.*"
|
||||
vmove "usr/lib/libRusticlOpenCL.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,24 +333,18 @@ mesa-vdpau_package() {
|
|||
}
|
||||
}
|
||||
|
||||
mesa-XvMC_package() {
|
||||
short_desc="Mesa XvMC drivers"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libXvMC*"
|
||||
}
|
||||
}
|
||||
|
||||
mesa-vulkan-intel_package() {
|
||||
short_desc="Mesa Intel Vulkan driver"
|
||||
pkg_install() {
|
||||
vmove "usr/share/vulkan/icd.d/intel_icd*.json"
|
||||
vmove "usr/lib/libvulkan_intel.so"
|
||||
vmove "usr/share/vulkan/icd.d/intel*.json"
|
||||
vmove "usr/lib/libvulkan_intel*.so"
|
||||
}
|
||||
}
|
||||
|
||||
mesa-vulkan-radeon_package() {
|
||||
short_desc="Mesa Radeon Vulkan driver"
|
||||
pkg_install() {
|
||||
vmove "usr/share/drirc.d/00-radv-defaults.conf"
|
||||
vmove "usr/share/vulkan/icd.d/radeon_icd*.json"
|
||||
vmove "usr/lib/libvulkan_radeon.so"
|
||||
}
|
||||
|
@ -381,7 +374,7 @@ mesa-ati-dri_package() {
|
|||
short_desc="Mesa DRI drivers for ATI GPUs (transitional dummy package)"
|
||||
depends="mesa-dri mesa-vulkan-radeon"
|
||||
if [ "$_have_hwdec" ]; then
|
||||
depends+=" mesa-vaapi mesa-vdpau mesa-XvMC"
|
||||
depends+=" mesa-vaapi mesa-vdpau"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -426,7 +419,7 @@ mesa-nouveau-dri_package() {
|
|||
short_desc="Mesa DRI drivers for NVIDIA GPUs (transitional dummy package)"
|
||||
depends="mesa-dri"
|
||||
if [ "$_have_hwdec" ]; then
|
||||
depends+=" mesa-vaapi mesa-vdpau mesa-XvMC"
|
||||
depends+=" mesa-vaapi mesa-vdpau"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'removed-packages'
|
||||
pkgname=removed-packages
|
||||
version=0.1.20230213
|
||||
version=0.1.20230214
|
||||
revision=1
|
||||
build_style=meta
|
||||
short_desc="Uninstalls packages removed from repository"
|
||||
|
@ -319,6 +319,7 @@ replaces="
|
|||
masterpassword-cli<=2.6_5
|
||||
mattermost-desktop<=4.6.0_1
|
||||
mdds0<=0.12.1_3
|
||||
mesa-XvMC<=22.2.4_2
|
||||
mimms<=3.2.1_4
|
||||
miro-video-converter<=3.0.2_3
|
||||
mirrorbits<=0.5.1_1
|
||||
|
|
Loading…
Add table
Reference in a new issue