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:
The412Banner committed 2026-10-12 18:34:49 -04:00
1 parent cf06f89c11
commit ee0fb08268
125 files changed
+119982 -12

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Minimal Xlib declarations for the bridge ICD: it never links libX11, it only needs the types
* vulkan_xlib.h names and looks up XGetXCBConnection at run time. */
#ifndef VKB_COMPAT_XLIB_H
#define VKB_COMPAT_XLIB_H
typedef struct _XDisplay Display;
typedef unsigned long XID;
typedef XID Window;
typedef unsigned long VisualID;
#endif
+37
View File
@@ -0,0 +1,37 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
* Minimal xcb declarations for the bridge ICD: libxcb is opened at run time (dlopen), so only the
* types and the few request/reply layouts the software present path uses are declared here. */
#ifndef VKB_COMPAT_XCB_H
#define VKB_COMPAT_XCB_H
#include <stdint.h>
typedef struct xcb_connection_t xcb_connection_t;
typedef uint32_t xcb_window_t;
typedef uint32_t xcb_visualid_t;
typedef uint32_t xcb_drawable_t;
typedef uint32_t xcb_gcontext_t;
typedef uint32_t xcb_pixmap_t;
typedef struct { unsigned int sequence; } xcb_void_cookie_t;
typedef struct { unsigned int sequence; } xcb_get_geometry_cookie_t;
typedef struct {
uint8_t response_type;
uint8_t depth;
uint16_t sequence;
uint32_t length;
xcb_window_t root;
int16_t x, y;
uint16_t width, height, border_width;
uint8_t pad0[2];
} xcb_get_geometry_reply_t;
typedef struct {
uint8_t response_type;
uint8_t error_code;
uint16_t sequence;
uint32_t resource_id;
uint16_t minor_code;
uint8_t major_code;
uint8_t pad0;
uint32_t pad[5];
uint32_t full_sequence;
} xcb_generic_error_t;
#define XCB_IMAGE_FORMAT_Z_PIXMAP 2
#endif