mesa: Patch BGLView to make LockGL recursive.

This commit is contained in:
Augustin Cavalier
2018-08-28 21:35:34 -04:00
parent d0d1b04927
commit d1d70a5c4b
2 changed files with 44 additions and 1 deletions

View File

@@ -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"

View File

@@ -555,3 +555,46 @@ index 2a388cb..0e4a531 100644
--
2.14.2
From c47b10797fd59404235090cb8b9157372c0200d2 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
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