quakeforge/include/QF/Vulkan/device.h

37 lines
961 B
C
Raw Normal View History

#ifndef __QF_Vulkan_device_h
#define __QF_Vulkan_device_h
typedef struct qfv_devfuncs_s {
#define DEVICE_LEVEL_VULKAN_FUNCTION(name) PFN_##name name;
#define DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION(name,ext) PFN_##name name;
#include "QF/Vulkan/funclist.h"
} qfv_devfuncs_t;
2019-07-23 03:37:47 +00:00
struct qfv_device_s;
typedef struct qfv_queue_s {
VkDevice dev;
qfv_devfuncs_t *funcs;
int32_t queueFamily;
VkQueue queue;
} qfv_queue_t;
struct qfv_instance_s;
typedef struct qfv_device_s {
VkDevice dev;
VkPhysicalDevice physDev;
qfv_devfuncs_t *funcs;
2019-07-23 03:37:47 +00:00
qfv_queue_t queue;
struct strset_s *enabled_extensions;
int (*extension_enabled) (struct qfv_device_s *inst,
const char *ext);
} qfv_device_t;
struct vulkan_ctx_s;
2019-07-12 15:36:21 +00:00
qfv_device_t *QFV_CreateDevice (struct vulkan_ctx_s *ctx,
const char **extensions);
void QFV_DestroyDevice (qfv_device_t *device);
int QFV_DeviceWaitIdle (qfv_device_t *device);
2019-07-23 03:27:57 +00:00
#endif//__QF_Vulkan_device_h