Files
DroidDeck/tools/vkbridge/build-server-android.sh
T
ahmadandClaude Opus 5.5 c3f02222fc feat(vkbridge): Vulkan 1.4.341 registry, stand-in DRM node for gamescope, test switches
- registry moved from 1.3.247 to 1.4.341: current Zink and DXVK need post-1.3.247
  extensions (maintenance5); the bridge only exposes what the driver reports
- gamescope on the bridge: Mali's device stands in as the render node, the ICD reports its
  numbers (VKBRIDGE_DRM_RENDER), the session shim answers PRIME on it - linux-dmabuf works
- host: gamescope (Arch, no GPU device) composites vkcube through the bridge, zero-copy;
  Zink 26.2 runs GL 4.6 on the bridge
- VKBRIDGE_TRACE / HIDE_EXTS / MAX_API for diagnosis and imitating Mali on the host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00

22 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Builds the bridge server for the device (bionic, arm64-v8a, API 26) with the NDK's clang:
# tools/vkbridge/build-server-android.sh <ndk-dir> <jniLibs-out-dir>
# The output is an executable named like a library (libvkbridge_server.so) so that Android
# extracts it into the native library directory, the one place an app may exec from.
set -euo pipefail
ndk=$1
out=$2/arm64-v8a
here=$(cd "$(dirname "$0")" && pwd)
srv=$(cd "$here/../../app/src/main/cpp/vkbridge" && pwd)
cc=$(ls -d "$ndk"/toolchains/llvm/prebuilt/*/bin/aarch64-linux-android26-clang | head -1)
[ -x "$cc" ] || { echo "no NDK clang under $ndk" >&2; exit 1; }
mkdir -p "$out"
"$cc" -O2 -g0 -fPIE -pie -Wall -Wno-unused-parameter -Wno-missing-field-initializers \
-I"$here/third_party/Vulkan-Headers-1.4.341/include" -I"$here/common" -I"$here/common/gen" -I"$srv" \
-Wl,-z,max-page-size=16384 -Wl,--build-id=none \
-o "$out/libvkbridge_server.so" \
"$srv"/*.c "$here/common/vkb_wire.c" "$here/common/gen/vkb_gen_structs.c" "$here/common/gen/vkb_gen_server.c" \
-ldl -llog -lm
"$(dirname "$cc")/llvm-strip" --strip-unneeded "$out/libvkbridge_server.so"
echo "built $out/libvkbridge_server.so"