mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
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.
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/* 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
|