diff options
author | Ken Mays <[email protected]> | 2019-09-26 09:47:06 +0000 |
---|---|---|
committer | Juan Suárez Romero <[email protected]> | 2019-10-01 10:31:02 +0000 |
commit | 4943c89d6d3f522b3100be9187ff045f84f032b1 (patch) | |
tree | 9c572b4a77b3a0309cc829d417b55682f521c5a7 /src/hgl | |
parent | e55df4c8596893ca7258a9f199610d8528d46640 (diff) |
haiku: fix Mesa build
1. The hgl.c file is a read-only file versus read-write.
Ref: src/gallium/state_trackers/hgl/hgl.c
2. I've included the Haiku-specific patches I used to get a successful
build of Mesa 19.1.7 on Haiku using the meson/ninja build procedure.
Shows "[764/764] linking target ... libswpipe.so" at build completion.
v2:
Remove autotools files (Eric)
v3:
Update the patch
Reported-by: Ken Mays <[email protected]>
Tested-by: Ken Mays <[email protected]>
CC: [email protected]
Reviewed-by: Alexander von Gluck IV <[email protected]>
Diffstat (limited to 'src/hgl')
-rw-r--r-- | src/hgl/GLView.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hgl/GLView.cpp b/src/hgl/GLView.cpp index 9ae5b5c83ac..9e01dcc2c60 100644 --- a/src/hgl/GLView.cpp +++ b/src/hgl/GLView.cpp @@ -51,6 +51,7 @@ BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode, fDitherMap(NULL) { fRoster = new GLRendererRoster(this, options); + fRenderer = fRoster->GetRenderer(); } @@ -68,7 +69,7 @@ BGLView::LockGL() // TODO: acquire the OpenGL API lock it on this glview fDisplayLock.Lock(); - if (fRenderer) + if (fRenderer != NULL && fDisplayLock.CountLocks() == 1) fRenderer->LockGL(); } @@ -76,7 +77,7 @@ BGLView::LockGL() void BGLView::UnlockGL() { - if (fRenderer) + if (fRenderer != NULL && fDisplayLock.CountLocks() == 1) fRenderer->UnlockGL(); fDisplayLock.Unlock(); @@ -189,7 +190,6 @@ BGLView::AttachedToWindow() for (BView* view = this; view != NULL; view = view->Parent()) view->ConvertToParent(&fBounds); - fRenderer = fRoster->GetRenderer(); if (fRenderer != NULL) { // Jackburton: The following code was commented because it doesn't look // good in "direct" mode: |