Files
DroidDeck/tools/vkbridge/host/Makefile
T
ahmadandClaude Opus 5.5 c3f02222fc feat(vkbridge): Vulkan 1.4.341 registry, stand-in DRM node for gamescope, test switches
- registry moved from 1.3.247 to 1.4.341: current Zink and DXVK need post-1.3.247
  extensions (maintenance5); the bridge only exposes what the driver reports
- gamescope on the bridge: Mali's device stands in as the render node, the ICD reports its
  numbers (VKBRIDGE_DRM_RENDER), the session shim answers PRIME on it - linux-dmabuf works
- host: gamescope (Arch, no GPU device) composites vkcube through the bridge, zero-copy;
  Zink 26.2 runs GL 4.6 on the bridge
- VKBRIDGE_TRACE / HIDE_EXTS / MAX_API for diagnosis and imitating Mali on the host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00

40 lines
1.8 KiB
Makefile

# 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.4.341/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.4.341"}}\n' "$(OUT)/libvulkan_droidbridge.so" > $@
test: all
$(VKB)/host/run_tests.sh $(OUT)
clean:
rm -rf $(OUT)
.PHONY: all test clean