mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
Mali bridge (#517, by ASEbrahim) on the non-Adreno test branch
Squash of Droid-Deck/DroidDeck#517 (ASEbrahim/DroidDeck mali-bridge @ 6b823341): the Vulkan
bridge (tools/vkbridge) that runs the guest's Vulkan on the phone's own driver, with BC1-BC7,
clip/cull distance, vertex-divisor and depth-clip emulation and dma-heap memory sharing for Mali.
All of the bridge is ASEbrahim's work; squashed only to carry it on this test branch.
Combined with #570 on this branch, a device draws through exactly one path:
- Adreno: Turnip, unchanged (checked first; the bridge setting is ignored there).
- PowerVR / Xclipse with the system HAL and a render node: the system-Vulkan path (#570).
- Anything else with the Setup toggle on (Mali): the bridge.
This commit is contained in:
1 parent
cf06f89c11
commit
ee0fb08268
125 files changed
+119982
-12
No files matched your search
@@ -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.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 -rdynamic
|
||||
|
||||
$(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
|
||||
Reference in new issue
Block a user