mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
Squash of Droid-Deck/DroidDeck#517 (ASEbrahim/DroidDeck mali-bridge @ 6b823341): the Vulkan
bridge (tools/vkbridge) that runs the guest's Vulkan on the phone's own driver, with BC1-BC7,
clip/cull distance, vertex-divisor and depth-clip emulation and dma-heap memory sharing for Mali.
All of the bridge is ASEbrahim's work; squashed only to carry it on this test branch.
Combined with #570 on this branch, a device draws through exactly one path:
- Adreno: Turnip, unchanged (checked first; the bridge setting is ignored there).
- PowerVR / Xclipse with the system HAL and a render node: the system-Vulkan path (#570).
- Anything else with the Setup toggle on (Mali): the bridge.
15 lines
914 B
Bash
Executable File
15 lines
914 B
Bash
Executable File
#!/bin/bash
|
|
# Source this: starts a host vkbridge server on a desktop driver (VKB_HOST_ICD, default RADV) and
|
|
# points this shell's Vulkan programs at the bridge ICD.
|
|
# [VKB_HOST_ICD=...] . tools/vkbridge/host/bridge_env.sh
|
|
_vkb_host=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
_vkb_icd=${VKB_HOST_ICD:-/usr/share/vulkan/icd.d/radeon_icd.json}
|
|
export VKBRIDGE_SOCKET=${VKBRIDGE_SOCKET:-${XDG_RUNTIME_DIR:-/tmp}/vkbridge-host.sock}
|
|
pgrep -x vkbridge-server >/dev/null && kill $(pgrep -x vkbridge-server) 2>/dev/null; sleep 0.3
|
|
rm -f "$VKBRIDGE_SOCKET"
|
|
VK_DRIVER_FILES=$_vkb_icd VK_ICD_FILENAMES= nohup "$_vkb_host/out/vkbridge-server" --socket "$VKBRIDGE_SOCKET" \
|
|
--log "$_vkb_host/out/server.log" >/dev/null 2>&1 &
|
|
for _i in $(seq 50); do [ -S "$VKBRIDGE_SOCKET" ] && break; sleep 0.1; done
|
|
export VK_DRIVER_FILES=$_vkb_host/out/vkbridge_icd.json
|
|
echo "vkbridge server up ($_vkb_icd) at $VKBRIDGE_SOCKET"
|