diff --git a/tools/bionic-runtime/NOTICE b/tools/bionic-runtime/NOTICE index e571f87c7d..7ebe6bbe41 100644 --- a/tools/bionic-runtime/NOTICE +++ b/tools/bionic-runtime/NOTICE @@ -22,6 +22,10 @@ Taken unchanged from The412Banner's Bannerlator (GPL-3.0, https://github.com/The - 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. Not in this pack: the bionic DroidDeck-Proton layer (The412Banner/proton-wine releases), GPU drivers, DXVK/VKD3D and FEX (DroidDeck components). diff --git a/tools/bionic-runtime/build.sh b/tools/bionic-runtime/build.sh index ce961d2977..64cc5bae4c 100755 --- a/tools/bionic-runtime/build.sh +++ b/tools/bionic-runtime/build.sh @@ -82,6 +82,18 @@ 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" fetch "$BL_ASSETS/ffmpeg8.tzst" "$FFMPEG8_SHA256" "$WORK/ffmpeg8.tzst" +# OpenGL: Bannerlator's bionic Mesa (EGL + GLX + Zink, x11 and wayland platforms; Banners-Turnip exp/egl-x11-platform +# ab76cba3, run 36862058991) for winex11's EGL backend, as Bannerlator's Fast OpenGL uses it +mkdir -p "$PACK/egl" +for e in libEGL.so.1:e86f32844cb2f8f5d67df261afaacb7c7ea392d1af2b8d6f584d6b54010838dd \ + libGL.so.1:e29c6b870af456069452e4cf2c036959fbbfa7fd4bca12da64883e671191c9ce \ + libGLESv2.so.2:f277208f38f2c9e107f7cb3a32fc4b6e8bd1dc3d90f2f4ec9e90b12de75e99fb \ + libgallium-26.3.0-devel.so:0aef4d32b3c28a2cc2158df1cd768a44683a98a56ef0ed3188c48939a7451bef \ + libwayland-client.so:8f1dfc29c0e3f009da04c97b7de1f3ce6e351e0642bd9ae1da7ebc2117555bd5 \ + libarchive.so:eb3b13634bd2c188d71e886f8c690ef32f6b4a2a0e8a7197a7f974b2d341b7ab \ + x11egl.json:baf5fd4f91aa1551ecc4b67710bb2a7c506128b0022d27427457f24f0de8cacd; do + fetch "$BL_ASSETS/x11/egl/${e%%:*}" "${e#*:}" "$PACK/egl/${e%%:*}" +done cp "$HERE/icd.json" "$PACK/adapter/icd.json" echo "== libraries from the imagefs" @@ -152,7 +164,7 @@ 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)" + echo "bannerlator $BL_COMMIT (wayland/adapter, ffmpeg8.tzst, x11/egl: Mesa EGL + GLX + Zink)" echo "layer $LAYER_URL sha256 $LAYER_SHA256 (not packed)" echo "gamescope $GAMESCOPE_TAG $GAMESCOPE_COMMIT + $GAMESCOPE_PATCHES; vkroots $(git -C "$GS/subprojects/vkroots" rev-parse HEAD); Vulkan-Headers $VULKAN_HEADERS_TAG" echo diff --git a/tools/bionic-runtime/tool/launch.sh b/tools/bionic-runtime/tool/launch.sh index 1a7399222d..f948f0d6be 100644 --- a/tools/bionic-runtime/tool/launch.sh +++ b/tools/bionic-runtime/tool/launch.sh @@ -30,6 +30,7 @@ for v in $(env | sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p'); do FAKE_*|SDL_*|BL_WIDTH|BL_HEIGHT|BL_VK_DRIVER|WINEDLLOVERRIDES) ;; DISPLAY|GAMESCOPE_WAYLAND_DISPLAY|FEX_*) ;; TU_DEBUG|MESA_NO_ERROR|DXVK_CONFIG|DXVK_HUD|DROIDDECK_FORCE_SSBS) ;; + mesa_glthread|vblank_mode|ZINK_*|GALLIUM_HUD) ;; BL_SYNC|BL_FSYNC_FIRST|BL_SYNC_FALLBACK|PROTON_NO_ESYNC|PROTON_NO_FSYNC|PROTON_NO_NTSYNC|WINEESYNC) ;; *) unset "$v" 2>/dev/null ;; esac @@ -57,7 +58,7 @@ export XDG_RUNTIME_DIR=$RTD DROIDDECK_WSI_BYPASS_CHECK_MS=100 GAMESCOPE_WSI_FORC # Wine: DXVK/VKD3D over the builtins, X11 inside gamescope (winewayland would pick DroidDeck's compositor), # FEX for x86 code, userspace ntsync (no /dev/ntsync on Android), Valve's Android Steam client library. -export WINEDLLOVERRIDES="${WINEDLLOVERRIDES:+$WINEDLLOVERRIDES;}d3d9,d3d10core,d3d11,dxgi,d3d12,d3d12core=n,b;winewayland.drv=d" +export WINEDLLOVERRIDES="${WINEDLLOVERRIDES:+$WINEDLLOVERRIDES;}d3d8,d3d9,d3d10core,d3d11,dxgi,d3d12,d3d12core=n,b;winewayland.drv=d" # Sync as chosen in DroidDeck (Wine sync, per-game PROTON_NO_*): ntsync is userspace ntsync (no /dev/ntsync on # Android) with esync as its fallback; Android has no futex_waitv, so an fsync choice runs ntsync. on() { case "$1" in 1|on|true|yes) return 0 ;; esac; return 1; } @@ -98,7 +99,12 @@ export WINE_ADDITIONAL_CERTS_DIR=$PACK/etc/tls/cert.pem export FAKE_EVDEV_STEAM_PAD_AS_X360=1 export SDL_GAMECONTROLLER_IGNORE_DEVICES="$(echo "${SDL_GAMECONTROLLER_IGNORE_DEVICES:-}" | sed -e 's#0x045e/0x028e,##' -e 's#,0x045e/0x028e$##')" -LIBS=$F/lib:$PACK/lib:/system/lib64 +# OpenGL, and WineD3D on it (DirectDraw, Direct3D 1-8 without DXVK): Mesa's Zink on Vulkan through winex11's EGL +# backend (the runtime's egl/), the way Bannerlator's Fast OpenGL runs it; DroidDeck's GL settings above are kept. +export WINE_USE_EGL=1 WINE_X11FORCEGLX=1 GALLIUM_DRIVER=zink MESA_LOADER_DRIVER_OVERRIDE=zink LIBGL_KOPPER_DRI2=1 +export ZINK_DESCRIPTORS=${ZINK_DESCRIPTORS:-lazy} ZINK_DEBUG=${ZINK_DEBUG:-compact} vblank_mode=${vblank_mode:-0} + +LIBS=$F/lib:$PACK/egl:$PACK/lib:/system/lib64 PRELOAD=$PACK/preload/libexecshim.so:$PACK/preload/libnotag.so:$PACK/preload/libfakeinput.so wine_() { LD_LIBRARY_PATH=$LIBS LD_PRELOAD=$PRELOAD "$LINKER" "$F/lib/wine/aarch64-unix/wine" "$@"; } wineserver_() { LD_LIBRARY_PATH=$LIBS LD_PRELOAD=$PRELOAD "$LINKER" "$F/bin/wineserver" "$@"; }