mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
- 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
27 lines
1.6 KiB
Bash
Executable File
27 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# Builds the Linux side of the bridge for the runtime (glibc, aarch64):
|
|
# tools/vkbridge/build-client-linux.sh <linuxfs-asset-dir> [cc]
|
|
# Produces, under the asset dir (staged into the runtime by SessionFiles):
|
|
# usr/local/lib/vkbridge/libvulkan_droidbridge.so the Vulkan ICD
|
|
# usr/local/share/vkbridge/droidbridge_icd.json its manifest
|
|
# usr/local/bin/droiddeck-vkbridge-smoke the session-start self-test
|
|
set -euo pipefail
|
|
d=$1
|
|
cc=${2:-aarch64-linux-gnu-gcc}
|
|
strip=${STRIP:-${cc%gcc}strip}
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
inc="-I$here/third_party/Vulkan-Headers-1.4.341/include -I$here/common -I$here/common/gen"
|
|
mkdir -p "$d/usr/local/lib/vkbridge" "$d/usr/local/share/vkbridge" "$d/usr/local/bin"
|
|
"$cc" -O2 -fPIC -shared -fvisibility=hidden -DVKB_CLIENT -Wall -Wno-unused-parameter -Wno-missing-field-initializers \
|
|
$inc -I"$here/client" -I"$here/client/compat" -pthread \
|
|
-Wl,--no-undefined -Wl,-soname,libvulkan_droidbridge.so \
|
|
-o "$d/usr/local/lib/vkbridge/libvulkan_droidbridge.so" \
|
|
"$here"/client/*.c "$here/common/vkb_wire.c" "$here/common/gen/vkb_gen_structs.c" "$here/common/gen/vkb_gen_client.c" -ldl
|
|
"$strip" --strip-unneeded "$d/usr/local/lib/vkbridge/libvulkan_droidbridge.so"
|
|
"$cc" -O2 -Wall $inc -I"$here/tests" -o "$d/usr/local/bin/droiddeck-vkbridge-smoke" "$here/tests/smoke.c" -ldl
|
|
"$strip" --strip-unneeded "$d/usr/local/bin/droiddeck-vkbridge-smoke"
|
|
cat > "$d/usr/local/share/vkbridge/droidbridge_icd.json" <<JSON
|
|
{"file_format_version": "1.0.0", "ICD": {"library_path": "/usr/local/lib/vkbridge/libvulkan_droidbridge.so", "api_version": "1.4.341"}}
|
|
JSON
|
|
echo "built the vkbridge client into $d"
|