From 19a4653203e9459bb43607a1656194c9601f96d0 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Thu, 27 Oct 2022 21:25:32 +0200 Subject: VideoBackends:Vulkan: Replace debug_report with debug_utils The former is deprecated and pretty much all modern drivers support VK_EXT_debug_utils. Android drivers dont support it. On those drivers, we use the implementation provided by the validation layers. --- Source/Core/VideoBackends/Vulkan/VKMain.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoBackends/Vulkan/VKMain.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/VKMain.cpp b/Source/Core/VideoBackends/Vulkan/VKMain.cpp index e81c5d066b..46d535ce75 100644 --- a/Source/Core/VideoBackends/Vulkan/VKMain.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKMain.cpp @@ -84,13 +84,13 @@ static bool IsHostGPULoggingEnabled() Common::Log::LogLevel::LERROR); } -// Helper method to determine whether to enable the debug report extension. -static bool ShouldEnableDebugReports(bool enable_validation_layers) +// Helper method to determine whether to enable the debug utils extension. +static bool ShouldEnableDebugUtils(bool enable_validation_layers) { - // Enable debug reports if the Host GPU log option is checked, or validation layers are enabled. + // Enable debug utils if the Host GPU log option is checked, or validation layers are enabled. // The only issue here is that if Host GPU is not checked when the instance is created, the debug // report extension will not be enabled, requiring the game to be restarted before any reports - // will be logged. Otherwise, we'd have to enable debug reports on every instance, when most + // will be logged. Otherwise, we'd have to enable debug utils on every instance, when most // users will never check the Host GPU logging category. return enable_validation_layers || IsHostGPULoggingEnabled(); } @@ -114,10 +114,10 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) // Create Vulkan instance, needed before we can create a surface, or enumerate devices. // We use this instance to fill in backend info, then re-use it for the actual device. bool enable_surface = wsi.type != WindowSystemType::Headless; - bool enable_debug_reports = ShouldEnableDebugReports(enable_validation_layer); + bool enable_debug_utils = ShouldEnableDebugUtils(enable_validation_layer); u32 vk_api_version = 0; VkInstance instance = VulkanContext::CreateVulkanInstance( - wsi.type, enable_debug_reports, enable_validation_layer, &vk_api_version); + wsi.type, enable_debug_utils, enable_validation_layer, &vk_api_version); if (instance == VK_NULL_HANDLE) { PanicAlertFmt("Failed to create Vulkan instance."); @@ -174,8 +174,8 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) // Now we can create the Vulkan device. VulkanContext takes ownership of the instance and surface. g_vulkan_context = - VulkanContext::Create(instance, gpu_list[selected_adapter_index], surface, - enable_debug_reports, enable_validation_layer, vk_api_version); + VulkanContext::Create(instance, gpu_list[selected_adapter_index], surface, enable_debug_utils, + enable_validation_layer, vk_api_version); if (!g_vulkan_context) { PanicAlertFmt("Failed to create Vulkan device"); -- cgit v1.2.3