feat(vkbridge): run the bridge server inside the app's process

Android picks the GPU driver (Samsung's updatable one included) while the app
starts, only for the app's process. The server as a separate executable got the
plain /vendor driver: on the Tab S10+ it saw no VK_EXT_robustness2 or
mutable_descriptor_type, which the capability viewer (an app) listed. Winlator's
Vortek runs its server in-process for the same reason.

- libvkbridge_jni.so: the same server built as a JNI library; nativeStart runs
  the self-test once, serves on a thread for the app's life, and points the log
  at each new session's folder (with the self-test summary).
- VkBridgeNative / VkBridgeComponent: in-process first, the executable as the
  fallback; the in-app server's socket is kept between sessions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1U9H1evGNjHRQ3wRUdv5V
This commit is contained in:
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 committed 2026-10-10 16:47:03 +03:00
1 parent af5098e699
commit 8c050f43b6
6 files changed
+182 -24

No files matched your search

+10 -1
View File
@@ -18,4 +18,13 @@ mkdir -p "$out"
"$srv"/*.c "$here/common/vkb_wire.c" "$here/common/gen/vkb_gen_structs.c" "$here/common/gen/vkb_gen_server.c" \
-ldl -llog -lm
"$(dirname "$cc")/llvm-strip" --strip-unneeded "$out/libvkbridge_server.so"
echo "built $out/libvkbridge_server.so"
# The same server as a JNI library the app loads into its own process (the default): only there
# does Android hand it the driver the app gets (VkBridgeNative, server_main.c).
"$cc" -O2 -g0 -fPIC -shared -DVKB_JNI -Wall -Wno-unused-parameter -Wno-missing-field-initializers \
-I"$here/third_party/Vulkan-Headers-1.4.341/include" -I"$here/common" -I"$here/common/gen" -I"$srv" \
-Wl,-z,max-page-size=16384 -Wl,--build-id=none -Wl,--no-undefined -Wl,-soname,libvkbridge_jni.so \
-o "$out/libvkbridge_jni.so" \
"$srv"/*.c "$here/common/vkb_wire.c" "$here/common/gen/vkb_gen_structs.c" "$here/common/gen/vkb_gen_server.c" \
-ldl -llog -lm
"$(dirname "$cc")/llvm-strip" --strip-unneeded "$out/libvkbridge_jni.so"
echo "built $out/libvkbridge_server.so and libvkbridge_jni.so"