mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
85 lines
2.6 KiB
Plaintext
85 lines
2.6 KiB
Plaintext
From 828c3cf002ba4901ef65cd0665149d14c30df1d8 Mon Sep 17 00:00:00 2001
|
|
From: X512 <danger_mail@list.ru>
|
|
Date: Fri, 26 Jul 2024 04:45:27 +0900
|
|
Subject: [PATCH 175/200] egl/haiku: fix synchronization problems, add missing
|
|
header
|
|
|
|
`st_context_invalidate_state` call is required when changing buffer attachments.
|
|
|
|
Including header with BBitmap class definition is required to properly
|
|
call C++ destructor.
|
|
|
|
Cc: mesa-stable
|
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30372>
|
|
---
|
|
src/egl/drivers/haiku/egl_haiku.cpp | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp
|
|
index 62d2fb5c3cd..6ca5241c815 100644
|
|
--- a/src/egl/drivers/haiku/egl_haiku.cpp
|
|
+++ b/src/egl/drivers/haiku/egl_haiku.cpp
|
|
@@ -49,6 +49,8 @@
|
|
#include "hgl/hgl_sw_winsys.h"
|
|
#include "hgl_context.h"
|
|
|
|
+#include <Bitmap.h>
|
|
+
|
|
extern "C" {
|
|
#include "target-helpers/inline_sw_helper.h"
|
|
}
|
|
@@ -239,6 +241,8 @@ haiku_swap_buffers(_EGLDisplay *disp, _EGLSurface *surf)
|
|
|
|
update_size(buffer);
|
|
|
|
+ st_context_invalidate_state(st, ST_INVALIDATE_FB_STATE);
|
|
+
|
|
return EGL_TRUE;
|
|
}
|
|
|
|
--
|
|
2.45.2
|
|
|
|
From 2e70757dc0b5adb854c2911081e670d753d6a524 Mon Sep 17 00:00:00 2001
|
|
From: X512 <danger_mail@list.ru>
|
|
Date: Thu, 25 Jul 2024 22:26:25 +0900
|
|
Subject: [PATCH 066/200] egl/haiku: fix double free of BBitmap
|
|
|
|
Cc: mesa-stable
|
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30364>
|
|
---
|
|
src/egl/drivers/haiku/egl_haiku.cpp | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp
|
|
index 15417767406..62d2fb5c3cd 100644
|
|
--- a/src/egl/drivers/haiku/egl_haiku.cpp
|
|
+++ b/src/egl/drivers/haiku/egl_haiku.cpp
|
|
@@ -115,6 +115,9 @@ haiku_create_window_surface(_EGLDisplay *disp, _EGLConfig *conf,
|
|
return NULL;
|
|
}
|
|
|
|
+ // Unset and delete previously set bitmap if any.
|
|
+ delete ((BitmapHook *)native_window)->SetBitmap(NULL);
|
|
+
|
|
return &wgl_surf->base;
|
|
}
|
|
|
|
@@ -168,6 +171,13 @@ haiku_destroy_surface(_EGLDisplay *disp, _EGLSurface *surf)
|
|
struct haiku_egl_surface *hgl_surf = haiku_egl_surface(surf);
|
|
struct pipe_screen *screen = hgl_dpy->disp->fscreen->screen;
|
|
screen->fence_reference(screen, &hgl_surf->throttle_fence, NULL);
|
|
+
|
|
+ // Unset bitmap to release ownership. Bitmap will be deleted later
|
|
+ // when destroying framebuffer.
|
|
+ BitmapHook *bitmapHook = (BitmapHook*)hgl_surf->fb->winsysContext;
|
|
+ if (bitmapHook != NULL)
|
|
+ bitmapHook->SetBitmap(NULL);
|
|
+
|
|
hgl_destroy_st_framebuffer(hgl_surf->fb);
|
|
free(surf);
|
|
}
|
|
--
|
|
2.45.2
|
|
|