mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Mesa: bump version
* fix framebuffer leak on resize for osmesa * enable lavapipe
This commit is contained in:
@@ -4,11 +4,11 @@ specification. The OpenGL specification documents a system for rendering \
|
||||
interactive 3D graphics. Mesa fills the role of the Haiku OpenGL kit \
|
||||
providing 3D rendering to Haiku applications."
|
||||
HOMEPAGE="https://www.mesa3d.org/"
|
||||
COPYRIGHT="1999-2021 Brian Paul"
|
||||
COPYRIGHT="1999-2022 Brian Paul"
|
||||
LICENSE="MIT"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://mesa.freedesktop.org/archive/mesa-${portVersion}.tar.xz"
|
||||
CHECKSUM_SHA256="77104fd4a93bce69da3b0982f8ee88ba7c4fb98cfc491a669894339cdcd4a67d"
|
||||
CHECKSUM_SHA256="96bb761fd546e9aa41d025fcc025225c5668443839dae21e3731959beb096736"
|
||||
SOURCE_DIR="mesa-${portVersion}"
|
||||
PATCHES="mesa-$portVersion.patchset"
|
||||
|
||||
@@ -67,11 +67,23 @@ REQUIRES_swpipe="
|
||||
lib:libLLVM_9$secondaryArchSuffix
|
||||
"
|
||||
|
||||
SUMMARY_lavapipe="Vulkan software rasteriser driver"
|
||||
DESCRIPTION_lavapipe="Lavapipe is Mesa's software-based Vulkan 1.2 \
|
||||
implementation akin to LLVMpipe for OpenGL."
|
||||
|
||||
PROVIDES_lavapipe="
|
||||
mesa${secondaryArchSuffix}_lavapipe = $portVersion
|
||||
"
|
||||
REQUIRES_lavapipe="
|
||||
lib:libLLVM_9$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libLLVM_9$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libvulkan$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
python3$secondaryArchSuffix
|
||||
@@ -92,6 +104,7 @@ BUILD_PREREQUIRES="
|
||||
|
||||
defineDebugInfoPackage mesa$secondaryArchSuffix \
|
||||
"${addOnsDir/mesa$secondaryArchSuffix/mesa${secondaryArchSuffix}_swpipe}/opengl/Software Pipe" \
|
||||
"${addOnsDir/mesa$secondaryArchSuffix/mesa${secondaryArchSuffix}_lavapipe}/vulkan/icd.d/libvulkan_lvp.so" \
|
||||
"$libDir"/libEGL.so.$libVersion \
|
||||
"$libDir"/libGL.so.$libVersion \
|
||||
"$libDir"/libOSMesa.so.$libOSMesaVersion \
|
||||
@@ -103,10 +116,15 @@ BUILD()
|
||||
fi
|
||||
|
||||
mkdir -p build
|
||||
meson build -Dosmesa=true -Degl=true -Dgallium-drivers=swrast \
|
||||
meson build \
|
||||
-Dosmesa=true \
|
||||
-Degl=true \
|
||||
-Dgallium-drivers=swrast \
|
||||
-Dvulkan-drivers=swrast \
|
||||
-Dvulkan-icd-dir=$addOnsDir/vulkan/icd.d \
|
||||
--buildtype=debugoptimized \
|
||||
--prefix=$prefix \
|
||||
--libdir=$libDir \
|
||||
--libdir=$libDir \
|
||||
--includedir=$includeDir
|
||||
ninja -C build $jobArgs
|
||||
}
|
||||
@@ -122,6 +140,8 @@ INSTALL()
|
||||
mkdir -p $addOnsDir/opengl
|
||||
mv $(find $libDir -name 'libswpipe.so') \
|
||||
"$addOnsDir/opengl/Software Pipe"
|
||||
mv $libDir/libvulkan_lvp.so \
|
||||
"$addOnsDir/vulkan/icd.d"
|
||||
rm -rf $libDir/haiku
|
||||
|
||||
# Set some nice version info
|
||||
@@ -130,6 +150,8 @@ INSTALL()
|
||||
setversion "$libDir/libEGL.so.1" -app $appVersion -long "Mesa EGL"
|
||||
setversion "$addOnsDir/opengl/Software Pipe" -app $appVersion -long \
|
||||
"Gallium LLVM software pipe renderer"
|
||||
setversion "$addOnsDir/vulkan/icd.d/libvulkan_lvp.so" -app $appVersion -long \
|
||||
"Vulkan software rasteriser driver"
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libGL libEGL libOSMesa
|
||||
@@ -159,6 +181,10 @@ INSTALL()
|
||||
packageEntries swpipe \
|
||||
"$addOnsDir/opengl/Software Pipe"
|
||||
|
||||
# lavapipe renderer package
|
||||
packageEntries lavapipe \
|
||||
"$addOnsDir/vulkan/icd.d"
|
||||
|
||||
rmdir "$addOnsDir"/opengl
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 05376c1bbe6f9aa24f5daf40f328e3ebc5b4b483 Mon Sep 17 00:00:00 2001
|
||||
From 7adad87f6f7237a19ef486d66481fe9735dffcee Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 22:34:39 +1000
|
||||
Subject: Fix build for Haiku
|
||||
@@ -106,7 +106,7 @@ index 013e8be..a80c2f7 100644
|
||||
2.30.2
|
||||
|
||||
|
||||
From 6637bfad0cfd894584f267e9e32c88f40c175916 Mon Sep 17 00:00:00 2001
|
||||
From 01bf3fa56f3d9514229fadbd20164190f413d42f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 22:35:54 +1000
|
||||
Subject: Add any color_space support
|
||||
@@ -240,3 +240,52 @@ index 96f19ae..6939e53 100644
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 5141f202c9784f42c5f9d16500adb8a99bb6e81c Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Mon, 7 Feb 2022 13:01:04 +0900
|
||||
Subject: osmesa: fix framebuffer leak on resize
|
||||
|
||||
New `st_framebuffer_iface object` pointer value may be the same as recently
|
||||
deleted so it will be not freed in `st_framebuffers_purge()`. Framebuffers
|
||||
should be freed before new framebuffer will be added to list.
|
||||
|
||||
diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c
|
||||
index 91a250d..9f08709 100644
|
||||
--- a/src/gallium/frontends/osmesa/osmesa.c
|
||||
+++ b/src/gallium/frontends/osmesa/osmesa.c
|
||||
@@ -786,6 +786,7 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type,
|
||||
osmesa->current_buffer->height != height)) {
|
||||
osmesa_destroy_buffer(osmesa->current_buffer);
|
||||
osmesa->current_buffer = NULL;
|
||||
+ stapi->make_current(stapi, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
if (!osmesa->current_buffer) {
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From d263cfa0f4dc6e2b37048d5d1dd4b16c329ae706 Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Mon, 7 Feb 2022 15:06:17 +0900
|
||||
Subject: Fix path for lavapipe module
|
||||
|
||||
|
||||
diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build
|
||||
index 1648118..ddab474 100644
|
||||
--- a/src/gallium/targets/lavapipe/meson.build
|
||||
+++ b/src/gallium/targets/lavapipe/meson.build
|
||||
@@ -25,6 +25,9 @@ if with_platform_windows
|
||||
module_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||
icd_file_name = 'vulkan_lvp.dll'
|
||||
endif
|
||||
+if with_platform_haiku
|
||||
+ module_dir = './'
|
||||
+endif
|
||||
|
||||
lvp_icd = custom_target(
|
||||
'lvp_icd',
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user