mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +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.
33 lines
2.0 KiB
Bash
Executable File
33 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Host regression suite for the bridge: every automated check, in two server modes -
|
|
# plain the desktop driver as it is (RADV)
|
|
# mali the desktop driver with Mali-G720's known gaps imitated (mali_env.sh)
|
|
# Needs: make (out/), Proton Experimental for the DXVK check (VKB_WINE_DIR prepared, see README),
|
|
# docker image vkb-arch-gamescope for the gamescope/Zink check (skipped if absent).
|
|
cd "$(dirname "$0")"
|
|
pass=0; fail=0
|
|
result() { if [ "$1" = 0 ]; then pass=$((pass+1)); echo " ok $2"; else fail=$((fail+1)); echo " FAIL $2"; fi; }
|
|
run_mode() {
|
|
local mode=$1
|
|
echo "== $mode"
|
|
if [ "$mode" = mali ]; then . ./mali_env.sh >/dev/null; else unset VKBRIDGE_HIDE_EXTS VKBRIDGE_MAX_API; . ./bridge_env.sh >/dev/null; fi
|
|
timeout 120 ./out/vkbridge-smoke >out/t-smoke.log 2>&1; result $? "smoke ($(tail -1 out/t-smoke.log))"
|
|
timeout 180 ./out/bcn_check >out/t-bcn.log 2>&1; result $? "bcn_check ($(tail -1 out/t-bcn.log))"
|
|
if [ -n "${VKB_WINE_DIR:-}" ] && [ -d "$VKB_WINE_DIR/app" ]; then
|
|
./d3d11_test.sh >out/t-d3d11.log 2>&1; grep -q "^OK:" out/t-d3d11.log; result $? "d3d11_check via DXVK ($(grep -E '^(OK|FAILED)' out/t-d3d11.log))"
|
|
fi
|
|
timeout 60 vkcube-wayland --c 120 >out/t-vkcube.log 2>&1; result $? "vkcube-wayland (dma-buf)"
|
|
VKBRIDGE_WSI_SHM=1 timeout 60 vkcube-wayland --c 120 >>out/t-vkcube.log 2>&1; result $? "vkcube-wayland (wl_shm)"
|
|
timeout 60 vkcube --c 120 >>out/t-vkcube.log 2>&1; result $? "vkcube (X11)"
|
|
if docker image inspect vkb-arch-gamescope >/dev/null 2>&1; then
|
|
VKB_DOCKER_EXTRA="--device /dev/dri/renderD128" VKBRIDGE_DRM_RENDER=226:128 timeout 120 ./gamescope_test.sh \
|
|
"bash -c 'export MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LIBGL_KOPPER_DRI2=true; timeout 20 glxgears 2>&1 | grep -m1 frames'" \
|
|
>out/t-gamescope-$mode.log 2>&1
|
|
grep -q "frames in" out/t-gamescope-$mode.log; result $? "gamescope + Zink glxgears ($(grep -m1 -o '[0-9.]* FPS' out/t-gamescope-$mode.log))"
|
|
fi
|
|
}
|
|
run_mode plain
|
|
run_mode mali
|
|
echo "== $pass passed, $fail failed"
|
|
[ "$fail" = 0 ]
|