mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
feat(vkbridge): Vulkan bridge core - codegen, wire runtime, server, client ICD, WSI
Generated from vk.xml 1.3.247; server shares host-visible memory via a self-tested strategy (hostptr/dmabuf/ahb). vulkaninfo runs through it on host. 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
8ac555664a
commit
a8fd343fc1
67 files changed
+82811
No files matched your search
@@ -0,0 +1 @@
|
||||
out/
|
||||
@@ -0,0 +1,39 @@
|
||||
# Host (x86_64 Linux) build of both bridge halves, for testing against the desktop's own Vulkan
|
||||
# driver: the server loads libvulkan.so.1 (pick a driver with VK_DRIVER_FILES in ITS environment),
|
||||
# the client ICD is what test programs load (VK_DRIVER_FILES=$(OUT)/vkbridge_icd.json).
|
||||
# make -C tools/vkbridge/host build
|
||||
# make -C tools/vkbridge/host test vulkaninfo + vkcube-headless smoke tests
|
||||
ROOT := $(abspath ../../..)
|
||||
VKB := $(ROOT)/tools/vkbridge
|
||||
SRV := $(ROOT)/app/src/main/cpp/vkbridge
|
||||
OUT ?= $(VKB)/host/out
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -O1 -g
|
||||
WARN := -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
|
||||
INC := -I$(VKB)/third_party/Vulkan-Headers-1.3.247/include -I$(VKB)/common -I$(VKB)/common/gen
|
||||
COMMON_SRC := $(VKB)/common/vkb_wire.c $(VKB)/common/gen/vkb_gen_structs.c
|
||||
SERVER_SRC := $(wildcard $(SRV)/*.c) $(VKB)/common/gen/vkb_gen_server.c $(COMMON_SRC)
|
||||
CLIENT_SRC := $(wildcard $(VKB)/client/*.c) $(VKB)/common/gen/vkb_gen_client.c $(COMMON_SRC)
|
||||
|
||||
all: $(OUT)/vkbridge-server $(OUT)/libvulkan_droidbridge.so $(OUT)/vkbridge_icd.json
|
||||
|
||||
$(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
|
||||
|
||||
$(OUT)/libvulkan_droidbridge.so: $(CLIENT_SRC) $(wildcard $(VKB)/client/*.h $(VKB)/common/*.h $(VKB)/common/gen/*.h)
|
||||
@mkdir -p $(OUT)
|
||||
$(CC) $(CFLAGS) $(WARN) -fPIC -shared -fvisibility=hidden -DVKB_CLIENT $(INC) -I$(VKB)/client -I$(VKB)/client/compat \
|
||||
-o $@ $(CLIENT_SRC) -ldl -lpthread -Wl,--no-undefined
|
||||
|
||||
$(OUT)/vkbridge_icd.json:
|
||||
@mkdir -p $(OUT)
|
||||
printf '{"file_format_version":"1.0.0","ICD":{"library_path":"%s","api_version":"1.3.247"}}\n' "$(OUT)/libvulkan_droidbridge.so" > $@
|
||||
|
||||
test: all
|
||||
$(VKB)/host/run_tests.sh $(OUT)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT)
|
||||
|
||||
.PHONY: all test clean
|
||||
Reference in new issue
Block a user