From 49102f3a00919b533ca4df9b409e0045df36f504 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 9 Sep 2024 23:18:58 -0400 Subject: [PATCH] mesa-22.0.5: Re-enable pthread barriers and disable EGL. --- sys-libs/mesa/mesa-22.0.5.recipe | 6 +- sys-libs/mesa/patches/mesa-22.0.5.patchset | 84 +++++++++++++++++++--- 2 files changed, 79 insertions(+), 11 deletions(-) diff --git a/sys-libs/mesa/mesa-22.0.5.recipe b/sys-libs/mesa/mesa-22.0.5.recipe index d4c292646..b10bcc125 100644 --- a/sys-libs/mesa/mesa-22.0.5.recipe +++ b/sys-libs/mesa/mesa-22.0.5.recipe @@ -6,7 +6,7 @@ providing 3D rendering to Haiku applications." HOMEPAGE="https://www.mesa3d.org/" COPYRIGHT="1999-2022 Brian Paul" LICENSE="MIT" -REVISION="2" +REVISION="3" SOURCE_URI="https://mesa.freedesktop.org/archive/mesa-${portVersion}.tar.xz" CHECKSUM_SHA256="5ee2dc06eff19e19b2867f12eb0db0905c9691c07974f6253f2f1443df4c7a35" SOURCE_DIR="mesa-${portVersion}" @@ -86,8 +86,8 @@ BUILD_REQUIRES=" devel:libvulkan$secondaryArchSuffix " BUILD_PREREQUIRES=" - python39$secondaryArchSuffix - mako_python39 + python3.10$secondaryArchSuffix + mako_python310 cmd:ninja cmd:bison cmd:find diff --git a/sys-libs/mesa/patches/mesa-22.0.5.patchset b/sys-libs/mesa/patches/mesa-22.0.5.patchset index 79b8bd634..79e6d1558 100644 --- a/sys-libs/mesa/patches/mesa-22.0.5.patchset +++ b/sys-libs/mesa/patches/mesa-22.0.5.patchset @@ -1,4 +1,4 @@ -From 409a1320c8fdbb7b21f01a3db5f8c56e1625e495 Mon Sep 17 00:00:00 2001 +From 2da7c36202f110909398297912967ef0f8cbbfd1 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 @@ -103,10 +103,10 @@ index a421545..d138cc9 100644 #else return thrd_equal(t1, t2); -- -2.36.1 +2.45.2 -From 436a579259023ce3e5b0be1f0bbdfca6eae90ca2 Mon Sep 17 00:00:00 2001 +From d86249da8c6906cf1047eb4f6ec914e30f4dfa0d 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 @@ -238,10 +238,10 @@ index 96f19ae..6939e53 100644 dstClip.Shift(-fInfo->window_bounds.left, -fInfo->window_bounds.top); dstClip.Blit(srcBuf); -- -2.36.1 +2.45.2 -From 0d3ec4fa641154b41b380c1a5de0cc69fc8de89a Mon Sep 17 00:00:00 2001 +From 1eea5d34b26160071e5d9ef59a3e463a726ec67c Mon Sep 17 00:00:00 2001 From: X512 Date: Mon, 7 Feb 2022 13:01:04 +0900 Subject: osmesa: fix framebuffer leak on resize @@ -263,10 +263,10 @@ index 91a250d..9f08709 100644 if (!osmesa->current_buffer) { -- -2.36.1 +2.45.2 -From aca7ef315d1ed9ee79ed7c4ba54e63a32c8b5ed5 Mon Sep 17 00:00:00 2001 +From edd251b40ea59a66163b002d3b478f00b5c4ae15 Mon Sep 17 00:00:00 2001 From: X512 Date: Mon, 7 Feb 2022 15:06:17 +0900 Subject: Fix path for lavapipe module @@ -287,5 +287,73 @@ index 1648118..ddab474 100644 lvp_icd = custom_target( 'lvp_icd', -- -2.36.1 +2.45.2 + + +From 8502af2ea2c97e1d636266670e79a5cc04f2308f Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 9 Sep 2024 22:43:26 -0400 +Subject: Re-enable pthread barriers on Haiku. + + +diff --git a/src/util/u_thread.h b/src/util/u_thread.h +index d138cc9..f7623d3 100644 +--- a/src/util/u_thread.h ++++ b/src/util/u_thread.h +@@ -1,9 +1,9 @@ + /************************************************************************** +- * ++ * + * Copyright 1999-2006 Brian Paul + * Copyright 2008 VMware, Inc. + * All Rights Reserved. +- * ++ * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation +@@ -279,7 +279,7 @@ static inline bool u_thread_is_self(thrd_t thread) + * util_barrier + */ + +-#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) ++#if defined(HAVE_PTHREAD) && !defined(__APPLE__) + + typedef pthread_barrier_t util_barrier; + +-- +2.45.2 + + +From 5159c1525eef3175cfc7047f4272ff660d3320d9 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 9 Sep 2024 22:43:33 -0400 +Subject: Disable EGL on Haiku. + + +diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp +index 18c73c9..dd71f7b 100644 +--- a/src/egl/drivers/haiku/egl_haiku.cpp ++++ b/src/egl/drivers/haiku/egl_haiku.cpp +@@ -207,6 +207,10 @@ extern "C" + EGLBoolean + init_haiku(_EGLDisplay *disp) + { ++#if 1 ++ // Does not work. ++ return EGL_FALSE; ++#else + _EGLDevice *dev; + CALLED(); + +@@ -224,6 +228,7 @@ init_haiku(_EGLDisplay *disp) + TRACE("Initialization finished\n"); + + return EGL_TRUE; ++#endif + } + + +-- +2.45.2