13 changes: 7 additions & 6 deletions Source/Core/VideoBackends/Vulkan/VulkanContext.h
Expand Up @@ -25,7 +25,7 @@ class VulkanContext
static bool CheckValidationLayerAvailablility();

// Helper method to create a Vulkan instance.
static VkInstance CreateVulkanInstance(WindowSystemType wstype, bool enable_debug_report,
static VkInstance CreateVulkanInstance(WindowSystemType wstype, bool enable_debug_utils,
bool enable_validation_layer, u32* out_vk_api_version);

// Returns a list of Vulkan-compatible GPUs.
Expand All @@ -46,12 +46,12 @@ class VulkanContext
// This assumes that PopulateBackendInfo and PopulateBackendInfoAdapters has already
// been called for the specified VideoConfig.
static std::unique_ptr<VulkanContext> Create(VkInstance instance, VkPhysicalDevice gpu,
VkSurfaceKHR surface, bool enable_debug_reports,
VkSurfaceKHR surface, bool enable_debug_utils,
bool enable_validation_layer, u32 api_version);

// Enable/disable debug message runtime.
bool EnableDebugReports();
void DisableDebugReports();
bool EnableDebugUtils();
void DisableDebugUtils();

// Global state accessors
VkInstance GetVulkanInstance() const { return m_instance; }
Expand Down Expand Up @@ -115,7 +115,8 @@ class VulkanContext

private:
static bool SelectInstanceExtensions(std::vector<const char*>* extension_list,
WindowSystemType wstype, bool enable_debug_report);
WindowSystemType wstype, bool enable_debug_utils,
bool validation_layer_enabled);
bool SelectDeviceExtensions(bool enable_surface);
bool SelectDeviceFeatures();
bool CreateDevice(VkSurfaceKHR surface, bool enable_validation_layer);
Expand All @@ -134,7 +135,7 @@ class VulkanContext
u32 m_present_queue_family_index = 0;
VkQueueFamilyProperties m_graphics_queue_properties = {};

VkDebugReportCallbackEXT m_debug_report_callback = VK_NULL_HANDLE;
VkDebugUtilsMessengerEXT m_debug_utils_messenger = VK_NULL_HANDLE;

VkPhysicalDeviceFeatures m_device_features = {};
VkPhysicalDeviceProperties m_device_properties = {};
Expand Down
13 changes: 10 additions & 3 deletions Source/Core/VideoBackends/Vulkan/VulkanEntryPoints.inl
Expand Up @@ -57,9 +57,16 @@ VULKAN_INSTANCE_ENTRY_POINT(vkCreateAndroidSurfaceKHR, false)
VULKAN_INSTANCE_ENTRY_POINT(vkCreateMetalSurfaceEXT, false)
#endif

VULKAN_INSTANCE_ENTRY_POINT(vkCreateDebugReportCallbackEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkDestroyDebugReportCallbackEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkDebugReportMessageEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkCmdBeginDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkCmdEndDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkCmdInsertDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkDestroyDebugUtilsMessengerEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkCreateDebugUtilsMessengerEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkQueueBeginDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkQueueEndDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkQueueInsertDebugUtilsLabelEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkSetDebugUtilsObjectTagEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkSubmitDebugUtilsMessageEXT, false)
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceProperties2, false)
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceSurfaceCapabilities2KHR, false)
VULKAN_INSTANCE_ENTRY_POINT(vkSetDebugUtilsObjectNameEXT, false)
Expand Down