From 6da3c2fc6ef71fea31c0a2b6efe9f8d31e0c34e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sun, 12 Jul 2026 14:32:16 -0400 Subject: [PATCH 01/20] gfx: prefer EGL on xcb and force a desktop OpenGL context Request the xcb EGL integration on X11 so that dma-buf import can stay zero-copy, and pin a desktop-GL (not GLES) core-profile context with a stencil buffer on the desktop code path. (cherry picked from commit 38cd38d6ac5a18fcb88eb5323028bb7227375688) Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_014rZgzE8JjWvHDtaVUhxpLE --- src/app/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index f8dc64c2ff..b824fb0c0d 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -273,6 +273,9 @@ static void setup_x11(int argc, char** argv) helper_dylibs.run_under_x11 = true; helper_dylibs.xwayland = wayland; + + // EGL is the only way to get zero-copy with dma-buf import + qputenv("QT_XCB_GL_INTEGRATION", "xcb_egl"); } } }; @@ -518,6 +521,7 @@ static void setup_opengl(bool& enable_opengl_ui) #ifndef QT_NO_OPENGL #if (defined(__arm__) || defined(__aarch64__)) && !defined(_WIN32) && !defined(__APPLE__) + // Raspberry Pi & such QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); fmt.setRenderableType(QSurfaceFormat::OpenGLES); fmt.setSwapInterval(1); @@ -533,6 +537,7 @@ static void setup_opengl(bool& enable_opengl_ui) fmt.setDefaultFormat(fmt); #else { + // Desktop GL std::vector> versions_to_test = {{4, 6}, {4, 5}, {4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0}, {3, 3}, {3, 2}, {3, 1}, {3, 0}, {2, 1}, {2, 0}}; @@ -571,7 +576,9 @@ static void setup_opengl(bool& enable_opengl_ui) QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); fmt.setProfile(QSurfaceFormat::CoreProfile); + fmt.setRenderableType(QSurfaceFormat::OpenGL); fmt.setSwapInterval(1); + fmt.setStencilBufferSize(8); bool ok = false; for(auto [maj, min] : versions_to_test) { From 680dccbd293f44551db12851407e80749d7b8d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sun, 5 Jul 2026 17:28:29 -0400 Subject: [PATCH 02/20] gstreamer: classify appsinks from the pipeline string, follow the engine quantum (cherry picked from commit cb5ca64ba99851dd83daecd7c5ccb79defd982b7) --- .../Gfx/GStreamer/GStreamerDevice.cpp | 174 +++++++++++++++--- 1 file changed, 148 insertions(+), 26 deletions(-) diff --git a/src/plugins/score-plugin-gfx/Gfx/GStreamer/GStreamerDevice.cpp b/src/plugins/score-plugin-gfx/Gfx/GStreamer/GStreamerDevice.cpp index 81a74cd651..b0b24ddbef 100644 --- a/src/plugins/score-plugin-gfx/Gfx/GStreamer/GStreamerDevice.cpp +++ b/src/plugins/score-plugin-gfx/Gfx/GStreamer/GStreamerDevice.cpp @@ -35,8 +35,10 @@ extern "C" { #include #include