From d23b32f22efe1b8faecebd561bf99708bc86a6f0 Mon Sep 17 00:00:00 2001 From: The412Banner <205237651+The412Banner@users.noreply.github.com> Date: Tue, 17 Nov 2026 19:13:54 -0500 Subject: [PATCH] fix(bionic): Mesa's GL thread off unless the game's environment sets it AIO's 64-bit Direct3D 7 cube (WineD3D on Zink) drew solid white on DroidDeck-Bionic instead of its per-face vertex colours, with Bannerlator's adapter and with the fixed one. DroidDeck exports mesa_glthread=true for the whole session; with it, WineD3D's persistent buffer writes lose the vertex colours on the Fast OpenGL Mesa build the runtime ships. mesa_glthread=false gives the right colours (and 2556 vs 2443 fps), as does hiding GL_ARB_buffer_storage; DroidDeck-Proton, Bannerlator (Wayland), bionic 32-bit WineD3D and D7VK drew it right. The launcher now sets mesa_glthread=false unless the game's own DroidDeck environment names it. --- tools/bionic-runtime/tool/launch.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/bionic-runtime/tool/launch.sh b/tools/bionic-runtime/tool/launch.sh index 19044d50a3..dd873bf270 100644 --- a/tools/bionic-runtime/tool/launch.sh +++ b/tools/bionic-runtime/tool/launch.sh @@ -113,6 +113,10 @@ export ZINK_DESCRIPTORS=${ZINK_DESCRIPTORS:-lazy} ZINK_DEBUG=${ZINK_DEBUG:-compa # Gallium's threaded context off, as in Bannerlator's Fast OpenGL: with it, WineD3D (DirectDraw / Direct3D 1-7) # crashed in native code within seconds (AIO Direct3D 7, SIGSEGV). export GALLIUM_THREAD=${GALLIUM_THREAD:-0} +# Mesa's GL thread off unless the game's own DroidDeck environment sets it: with DroidDeck's session-wide +# mesa_glthread=true, WineD3D's persistent buffer writes lost vertex colours on this Mesa build (AIO 64-bit +# Direct3D 7 drew its cube white; DroidDeck-Proton's Mesa does not do this). +case "$KEEP" in *" mesa_glthread "*) ;; *) export mesa_glthread=false ;; esac # egl/ first: the layer's own lib/ carries a Wayland-only Mesa EGL of the same names, which winex11 cannot use LIBS=$PACK/egl:$F/lib:$PACK/lib:/system/lib64