1 #ifndef MSP_GRAPHICS_VULKANCONTEXT_PLATFORM_H_
2 #define MSP_GRAPHICS_VULKANCONTEXT_PLATFORM_H_
4 #define VK_USE_PLATFORM_XLIB_KHR
5 #include <vulkan/vulkan.h>
6 #include "vulkancontext.h"
11 struct VulkanFunctions
13 PFN_vkCreateInstance vkCreateInstance;
14 PFN_vkDestroyInstance vkDestroyInstance;
15 PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
16 PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
17 PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupport;
18 PFN_vkCreateDevice vkCreateDevice;
19 PFN_vkDestroyDevice vkDestroyDevice;
20 PFN_vkGetDeviceQueue vkGetDeviceQueue;
21 PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurface;
22 PFN_vkDestroySurfaceKHR vkDestroySurface;
23 PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallback;
24 PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback;
27 struct VulkanContext::Private
29 VulkanFunctions functions;
31 VkPhysicalDevice physical_device;
33 unsigned graphics_queue_family;
34 VkQueue graphics_queue;
36 VkDebugReportCallbackEXT debug_report_callback;
40 static VkBool32 debug_report_func(VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *, const char *, void *);
43 } // namespace Graphics