1 #ifndef __HARDWARE_HWVULKAN_H__
2 #define __HARDWARE_HWVULKAN_H__
3 
4 #include <hardware/hardware.h>
5 #include <vulkan/vulkan.h>
6 
7 #define HWVULKAN_HARDWARE_MODULE_ID "vulkan"
8 #define HWVULKAN_MODULE_API_VERSION_0_1 0
9 #define HWVULKAN_DEVICE_API_VERSION_0_1 0
10 
11 #define HWVULKAN_DEVICE_0 "vk0"
12 
13 typedef struct hwvulkan_module_t {
14     struct hw_module_t common;
15 } hwvulkan_module_t;
16 
17 #define HWVULKAN_DISPATCH_MAGIC 0x01CDC0DE
18 typedef union {
19     uintptr_t magic;
20     const void* vtbl;
21 } hwvulkan_dispatch_t;
22 
23 typedef struct hwvulkan_device_t {
24     struct hw_device_t common;
25 
26     PFN_vkEnumerateInstanceExtensionProperties
27         EnumerateInstanceExtensionProperties;
28     PFN_vkCreateInstance CreateInstance;
29     PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
30 } hwvulkan_device_t;
31 
32 #endif
33