From d1d70a5c4be3e45f46a05270edd1fc853a428c62 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 28 Aug 2018 21:35:34 -0400 Subject: [PATCH] mesa: Patch BGLView to make LockGL recursive. --- sys-libs/mesa/mesa-17.1.10.recipe | 2 +- sys-libs/mesa/patches/mesa-17.1.10.patchset | 43 +++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/sys-libs/mesa/mesa-17.1.10.recipe b/sys-libs/mesa/mesa-17.1.10.recipe index 719cffa89..89b4e3f7d 100644 --- a/sys-libs/mesa/mesa-17.1.10.recipe +++ b/sys-libs/mesa/mesa-17.1.10.recipe @@ -6,7 +6,7 @@ providing 3D rendering to Haiku applications." HOMEPAGE="https://www.mesa3d.org/" COPYRIGHT="1999-2018 Brian Paul" LICENSE="MIT" -REVISION="1" +REVISION="2" SOURCE_URI="https://mesa.freedesktop.org/archive/mesa-${portVersion}.tar.xz" CHECKSUM_SHA256="cbc0d681cc4df47d8deb5a36f45b420978128522fd665b2cd4c7096316f11bdb" PATCHES="mesa-$portVersion.patchset" diff --git a/sys-libs/mesa/patches/mesa-17.1.10.patchset b/sys-libs/mesa/patches/mesa-17.1.10.patchset index f849c1ec4..86df3fa7d 100644 --- a/sys-libs/mesa/patches/mesa-17.1.10.patchset +++ b/sys-libs/mesa/patches/mesa-17.1.10.patchset @@ -555,3 +555,46 @@ index 2a388cb..0e4a531 100644 -- 2.14.2 + +From c47b10797fd59404235090cb8b9157372c0200d2 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Tue, 28 Aug 2018 21:32:38 -0400 +Subject: [PATCH] BGLView: Make LockGL recursive. + +This is the BeOS behavior, and the behavior of TinyGL's BGLView implementation +also. + +Fixes Flurry and other applications crashing on startup. +--- + src/hgl/GLView.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/hgl/GLView.cpp b/src/hgl/GLView.cpp +index 9ae5b5c..6afa182 100644 +--- a/src/hgl/GLView.cpp ++++ b/src/hgl/GLView.cpp +@@ -67,18 +67,18 @@ BGLView::LockGL() + { + // TODO: acquire the OpenGL API lock it on this glview + +- fDisplayLock.Lock(); + if (fRenderer) + fRenderer->LockGL(); ++ fDisplayLock.Lock(); + } + + + void + BGLView::UnlockGL() + { +- if (fRenderer) +- fRenderer->UnlockGL(); + fDisplayLock.Unlock(); ++ if (fRenderer && !fDisplayLock.IsLocked()) ++ fRenderer->UnlockGL(); + + // TODO: release the GL API lock to others glviews + } +-- +2.16.4 +