feat(vkbridge): Phase 1 integration - Setup toggle, server process, session wiring, builds

- Setup: 'Mali bridge' switch on the GPU row (non-Adreno only); the non-Adreno gate relaxes when on
- VkBridgeComponent starts libvkbridge_server.so before the guest and waits for its socket
- session script points the loader at the bridge ICD and logs the self-test + vulkaninfo
- Flatpak sandboxes get the bridge ICD and socket; the compositor uses the system driver without KGSL
- Gradle builds the server with the NDK; CI/build_local cross-build the ICD + smoke test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
This commit is contained in:
ahmadandClaude Opus 5.5 authored and Ahmad Sayed Alsayed Ebrahim committed 2026-10-10 14:28:13 +03:00
1 parent d82c42d818
commit 4050270511
17 files changed
+280 -5

No files matched your search

@@ -107,6 +107,31 @@ if [ -n "${BL_VK_DRIVER:-}" ]; then
fi
unset bl_icd_lib
fi
# The Mali bridge (Setup's experimental switch on a non-Adreno GPU; tools/vkbridge): the app runs a
# server on the phone's own Vulkan driver and this session draws through its ICD, which replaces
# every other driver here. Checked from inside like an imported driver, and on the first pass only
# the bridge's self-test and the driver's summary go into the log, so a black screen comes with the
# reason in the same file.
if [ "${BL_VKBRIDGE:-0}" = 1 ]; then
bl_vkb_icd=/usr/local/share/vkbridge/droidbridge_icd.json
if [ -r "$bl_vkb_icd" ] && [ -r /usr/local/lib/vkbridge/libvulkan_droidbridge.so ] && [ -S "${VKBRIDGE_SOCKET:-}" ]; then
export VK_DRIVER_FILES=$bl_vkb_icd VK_ICD_FILENAMES=$bl_vkb_icd
export VKBRIDGE_SOCKET VKBRIDGE_CLIENT_LOG
# Turnip's switches mean nothing to the bridge.
unset TU_DEBUG
if [ -z "${BL_INSIDE:-}" ]; then
step "vkbridge self-test"
timeout 60 /usr/local/bin/droiddeck-vkbridge-smoke 2>&1 | sed 's/^/== vkbridge: /'
if command -v vulkaninfo >/dev/null 2>&1; then
timeout 30 vulkaninfo --summary 2>&1 | sed -n '/^Devices:/,$p' | head -40 | sed 's/^/== vulkaninfo: /'
fi
fi
echo "== vulkan driver: Mali bridge ($bl_vkb_icd, server at $VKBRIDGE_SOCKET)"
else
echo "== vulkan driver: Mali bridge requested but NOT usable (icd $bl_vkb_icd, socket ${VKBRIDGE_SOCKET:-unset}); this GPU will show a black screen"
fi
unset bl_vkb_icd
fi
# The app's gamescope build (tools/gamescope) asks for realtime-priority Vulkan queues on this
# switch instead of on CAP_SYS_NICE, which proot never has; it falls back to normal priority
# where the driver refuses, and the runtime's own build ignores it. On KGSL Turnip (Mesa 26.2) it