mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
feat(vkbridge): vertex attribute divisor emulation; host regression suite; dispatch/version fixes
- divisor != 1 bindings get stride 0 and are rebound per draw; d > 1 splits draws, with a BaseInstance-as-0 vertex shader variant so DXVK's SV_InstanceID stays exact - device-level dispatch never falls back to a loader trampoline (crashed in vkCmdSetLineStipple) - core commands newer than the device's version are not handed out; the app's instance version is passed through as asked (Zink 26.2 aborted on a 1.4 entry point) - run_tests.sh: smoke, bcn_check, DXVK d3d11_check, vkcube x3, gamescope+Zink, in plain and Mali-imitation modes - 14/14 pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
This commit is contained in:
1 parent
92c94c5c15
commit
02a06bec3f
18 files changed
+1289
-734
No files matched your search
@@ -19,7 +19,7 @@ all: $(OUT)/vkbridge-server $(OUT)/libvulkan_droidbridge.so $(OUT)/vkbridge_icd.
|
||||
|
||||
$(OUT)/vkbridge-server: $(SERVER_SRC) $(wildcard $(SRV)/*.h $(VKB)/common/*.h $(VKB)/common/gen/*.h)
|
||||
@mkdir -p $(OUT)
|
||||
$(CC) $(CFLAGS) $(WARN) $(INC) -I$(SRV) -o $@ $(SERVER_SRC) -ldl -lpthread -lm
|
||||
$(CC) $(CFLAGS) $(WARN) $(INC) -I$(SRV) -o $@ $(SERVER_SRC) -ldl -lpthread -lm -rdynamic
|
||||
|
||||
$(OUT)/libvulkan_droidbridge.so: $(CLIENT_SRC) $(wildcard $(VKB)/client/*.h $(VKB)/common/*.h $(VKB)/common/gen/*.h)
|
||||
@mkdir -p $(OUT)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Source this: starts a host vkbridge server on the given desktop driver (default RADV) and
|
||||
# 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.
|
||||
# . tools/vkbridge/host/bridge_env.sh [icd-json]
|
||||
# [VKB_HOST_ICD=...] . tools/vkbridge/host/bridge_env.sh
|
||||
_vkb_host=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
_vkb_icd=${1:-/usr/share/vulkan/icd.d/radeon_icd.json}
|
||||
_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"
|
||||
|
||||
@@ -5,7 +5,7 @@ _vkb_host=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
export 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"
|
||||
VKBRIDGE_FAKE_MISSING=${VKB_MISSING:-bc,clip,cull,divisor,maint5} VK_DRIVER_FILES=${1:-/usr/share/vulkan/icd.d/radeon_icd.json} \
|
||||
VKBRIDGE_FAKE_MISSING=${VKB_MISSING:-bc,clip,cull,divisor,maint5} VK_DRIVER_FILES=${VKB_HOST_ICD:-/usr/share/vulkan/icd.d/radeon_icd.json} \
|
||||
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
|
||||
chmod 666 "$VKBRIDGE_SOCKET"
|
||||
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/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 ]
|
||||
Reference in new issue
Block a user