Flatpak: workaround crashes in adaptive streaming on Intel GPUs #51

This commit is contained in:
Rafał Dzięgiel
2021-04-07 17:43:32 +02:00
parent b15b94fc90
commit b5e1b3ab86
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
From d42546dda8fdb3d044e715d0a6a1a74cd411acbe Mon Sep 17 00:00:00 2001
From: Rafostar <40623528+Rafostar@users.noreply.github.com>
Date: Mon, 5 Apr 2021 18:05:38 +0200
Subject: [PATCH] GL: Do not set backbuffer on Wayland memory copy
This aims to workaround a Mesa bug that causes crash on Intel GPUs
caused by calling "glDrawBuffer (GL_BACK)" on Wayland where
there is no actual backbuffer in GStreamer OpenGL context.
---
gst-libs/gst/gl/gstglmemory.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 76c04eb1b..cd3481847 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -762,7 +762,13 @@ gst_gl_memory_copy_teximage (GstGLMemory * src, guint tex_id,
gl->DeleteFramebuffers (n_fbos, &fbo[0]);
if (gl->DrawBuffer)
- gl->DrawBuffer (GL_BACK);
+ gl->DrawBuffer (
+#if GST_GL_HAVE_WINDOW_WAYLAND
+ GL_NONE
+#else
+ GL_BACK
+#endif
+ );
}
gst_memory_unmap (GST_MEMORY_CAST (src), &sinfo);
--
2.28.0

View File

@@ -25,6 +25,10 @@
{
"type": "patch",
"path": "gst-plugins-base-autodetect-subtitle-text-encoding.patch"
},
{
"type": "patch",
"path": "gst-plugins-base-do-not-set-backbuffer.patch"
}
]
}