main
1#ifndef GOG_INSTANCE_H
2#define GOG_INSTANCE_H
3
4#include <vulkan/vulkan_core.h>
5#include "gogerr.h"
6
7typedef struct {
8 VkPhysicalDevice physical;
9 VkDevice logical;
10 struct {
11 uint32_t performance;
12 uint32_t vram_mb;
13 } specs;
14 struct {
15 uint32_t graphics;
16 uint32_t compute;
17 uint32_t present;
18 VkQueue graphics_q;
19 VkQueue compute_q;
20 VkQueue present_q;
21 } queues;
22
23 VkPhysicalDeviceProperties props;
24 VkPhysicalDeviceFeatures features;
25} gog_device;
26
27typedef struct {
28 VkInstance vk_instance;
29 VkSurfaceKHR vk_surface;
30
31 gog_device* devices;
32 uint32_t device_c;
33} gog_instance;
34
35gog_result gog_instance_audit(gog_instance* gog);
36gog_result gog_device_open(gog_device* dev, VkSurfaceKHR surface);
37void gog_instance_destroy(gog_instance* gog);
38
39#endif