From 38ec930b7068d2e4583cbd8d8c8e489f0466fa17 Mon Sep 17 00:00:00 2001 From: The412Banner <205237651+The412Banner@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:11:05 -0500 Subject: [PATCH] fix(bionic): Wayland adapter with placed-mapping fixes, so 32-bit OpenGL and WineD3D run 32-bit OpenGL games and 32-bit WineD3D (DirectDraw / Direct3D 1-7 without D7VK) died under Wine's wow64: the adapter did not honour placed mapping for the exportable Vulkan memory Wine's OpenGL maps below 4 GB, did not turn its placed-map emulation on for Wine's OpenGL device, and let the driver flush memory only the adapter had mapped. Fixed in The412Banner/bionic-vulkan-wrapper banner/wayland-wsi-placed-export (acdf6bcc, f7e7258f, 270cc239 on top of Bannerlator's adapter f970b6c); the pack now takes libvulkan_wrapper.so and adapter.json from that repository's release wayland-adapter-placed-export-r1 (sha256 pinned) instead of Bannerlator's assets, which stay unchanged. NOTICE moves the adapter entry accordingly. Tested with the adapter swapped into r18 on the Pocket FIT: AIO 32-bit Direct3D 7 2178 / 2286 fps and 32-bit OpenGL 2348 fps (both crashed before); 64-bit Vulkan 2147, OpenGL 2363, Direct3D 11 3510, Direct3D 7 2521, 32-bit D7VK 144, DiRT Showdown 97.0 fps. --- tools/bionic-runtime/NOTICE | 9 ++++++--- tools/bionic-runtime/build.sh | 17 +++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tools/bionic-runtime/NOTICE b/tools/bionic-runtime/NOTICE index 40af67175f..3eeb0888a2 100644 --- a/tools/bionic-runtime/NOTICE +++ b/tools/bionic-runtime/NOTICE @@ -19,14 +19,17 @@ Taken unchanged from The412Banner's Bannerlator (GPL-3.0, https://github.com/The alsa-lib, libiconv (LGPL-2.1 or later), FreeType (FTL or GPL-2.0), Fontconfig (MIT), libxml2 (MIT), libffi (MIT), PCRE2 (BSD-3-Clause), zlib (zlib), and FFmpeg 8 libraries (LGPL-2.1 or later) from Bannerlator's ffmpeg8.tzst. share/X11 and etc/ (fonts, tls) come from the same imagefs. -- adapter/libvulkan_wrapper.so: the Wayland adapter built from https://github.com/The412Banner/bionic-vulkan-wrapper - (branch banner/wayland-wsi-bgra-native), a Mesa tree (MIT) in the line of Pipetto-crypto's wrapper and leegao's - bionic Vulkan wrapper. adapter/adapter.json records the exact build. - egl/: Mesa (MIT, https://gitlab.freedesktop.org/mesa/mesa) EGL, GLX and Gallium with Zink, built for the bionic userland with the x11 and wayland platforms in The412Banner/Banners-Turnip (exp/egl-x11-platform ab76cba3), with libwayland-client (MIT) and libarchive (BSD-2-Clause); egl/x11egl.json records the build. Bannerlator ships the same set for its Fast OpenGL. +From The412Banner/bionic-vulkan-wrapper (https://github.com/The412Banner/bionic-vulkan-wrapper, release +wayland-adapter-placed-export-r1): +- adapter/libvulkan_wrapper.so: the Wayland adapter Bannerlator ships (branch banner/wayland-wsi-bgra-native) plus + placed-mapping fixes for 32-bit OpenGL / WineD3D (branch banner/wayland-wsi-placed-export), a Mesa tree (MIT) in + the line of Pipetto-crypto's wrapper and leegao's bionic Vulkan wrapper. adapter/adapter.json records the build. + Taken unchanged from DroidDeck-Proton (https://github.com/Droid-Deck/DroidDeck-Proton, release DroidDeck-Proton-11-12.8): - d7vk/ddraw.dll: D7VK by WinterSnowfall (zlib, https://github.com/WinterSnowfall/d7vk, commit 06656b9e), Direct3D 7 and older on Vulkan, based on DXVK by Philip Rebohle and contributors (zlib, https://github.com/doitsujin/dxvk); diff --git a/tools/bionic-runtime/build.sh b/tools/bionic-runtime/build.sh index f81b595a8f..ebac95349e 100755 --- a/tools/bionic-runtime/build.sh +++ b/tools/bionic-runtime/build.sh @@ -21,8 +21,11 @@ IMAGEFS_URL=https://github.com/The412Banner/winlator-contents/releases/download/ IMAGEFS_SHA256=7838756e6a05c91afff68f4bf12aa2780f815877753f8dd354e203e99b9caf8a # same pin as Bannerlator app/build.gradle BL_COMMIT=410c969dfe37ed0c687d6a5ee3327ea21a53e0f8 # The412Banner/Bannerlator BL_ASSETS=https://raw.githubusercontent.com/The412Banner/Bannerlator/$BL_COMMIT/app/src/main/assets -ADAPTER_SHA256=c572b590faf3e14066a1ed86887a6f4502fd01ecd4efadf9eac70db0954d8120 # wayland/adapter/libvulkan_wrapper.so -ADAPTER_JSON_SHA256=a161ea72366fac8b4248d3e2e1469c3122b21aad62a495728ea645ce678b0c0f +# The Wayland adapter: Bannerlator's (bionic-vulkan-wrapper banner/wayland-wsi-bgra-native f970b6c) plus the placed- +# mapping fixes 32-bit OpenGL / WineD3D need (branch banner/wayland-wsi-placed-export), from that repository's release. +ADAPTER_URL=https://github.com/The412Banner/bionic-vulkan-wrapper/releases/download/wayland-adapter-placed-export-r1 +ADAPTER_SHA256=653791c2c2ea904a5122909f01d26689553e91cc4dc7a981478c1303adc96ea5 # libvulkan_wrapper.so +ADAPTER_JSON_SHA256=5448fd64f15fa13ca3c805967c2b4788eb5f86d29a2d2755e15498130cdef9b3 FFMPEG8_SHA256=34ca9076b6b69bc96ee0d53fcb7b9d0d8df869b9f1255dd686bf89cc590b1b08 # ffmpeg8.tzst GAMESCOPE_TAG=3.16.29 GAMESCOPE_COMMIT=8f212644c46460549035971ab914421180f61a7c @@ -84,9 +87,10 @@ mkdir -p "$WORK/layer" tar --zstd -xf "$WORK/layer.wcp" -C "$WORK/layer" lib LAYERLIB="$WORK/layer/lib" -echo "== Bannerlator assets (pinned): Wayland adapter, FFmpeg 8" -fetch "$BL_ASSETS/wayland/adapter/libvulkan_wrapper.so" "$ADAPTER_SHA256" "$PACK/adapter/libvulkan_wrapper.so" -fetch "$BL_ASSETS/wayland/adapter/adapter.json" "$ADAPTER_JSON_SHA256" "$PACK/adapter/adapter.json" +echo "== Wayland adapter (pinned release)" +fetch "$ADAPTER_URL/libvulkan_wrapper.so" "$ADAPTER_SHA256" "$PACK/adapter/libvulkan_wrapper.so" +fetch "$ADAPTER_URL/adapter.json" "$ADAPTER_JSON_SHA256" "$PACK/adapter/adapter.json" +echo "== Bannerlator assets (pinned): FFmpeg 8" fetch "$BL_ASSETS/ffmpeg8.tzst" "$FFMPEG8_SHA256" "$WORK/ffmpeg8.tzst" echo "== D7VK ddraw.dll (DroidDeck-Proton 11-12.8 release, that file only)" @@ -175,7 +179,8 @@ cp "$HERE/NOTICE" "$PACK/NOTICE" { echo "droiddeck-bionic-runtime $REV ($(date -u +%Y-%m-%dT%H:%M:%SZ), Android API $API, NDK $(basename "$NDK"))" echo "imagefs $IMAGEFS_URL sha256 $IMAGEFS_SHA256" - echo "bannerlator $BL_COMMIT (wayland/adapter, ffmpeg8.tzst, x11/egl: Mesa EGL + GLX + Zink)" + echo "bannerlator $BL_COMMIT (ffmpeg8.tzst, x11/egl: Mesa EGL + GLX + Zink)" + echo "adapter $ADAPTER_URL (libvulkan_wrapper.so sha256 $ADAPTER_SHA256)" echo "layer $LAYER_URL sha256 $LAYER_SHA256 (not packed)" echo "d7vk $D7VK_COMMIT: i386 ddraw.dll from $D7VK_FROM" echo "gamescope $GAMESCOPE_TAG $GAMESCOPE_COMMIT + $GAMESCOPE_PATCHES; vkroots $(git -C "$GS/subprojects/vkroots" rev-parse HEAD); Vulkan-Headers $VULKAN_HEADERS_TAG"