From 3fe3598d41a1d673f917fa30bed04b2ed19e0c82 Mon Sep 17 00:00:00 2001 From: Wunk Date: Sat, 29 Oct 2022 10:09:25 -0700 Subject: Vulkan: Replace `VK_EXT_debug_report` usage with `VK_EXT_debug_utils` (#3802) * Vulkan: Replace `VK_EXT_debug_report` usage with `VK_EXT_debug_utils` [VK_EXT_debug_report](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_debug_report.html) has been depreciated for quite some time now in favor of the much more featureful [VK_EXT_debug_utils](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_debug_utils.html) extension. This PR converts our debug-report-callback into the newer debug-messenger pattern. `VK_EXT_debug_utils` adds some additional diagnostic tooling for marking debug-label scopes for queue-operations, command-buffers, and assigning name-labels to vulkan objects to aid in debugging(for a later PR). * Vulkan: Fix `DebugMessenger` severity-flag classification Extension bits between the two flags, for reference: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugUtilsMessageSeverityFlagBitsEXT.html https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDebugReportFlagBitsEXT.html --- Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Graphics.Vulkan/VulkanRenderer.cs') diff --git a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index 96c7da6c..ef089c32 100644 --- a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -33,7 +33,7 @@ namespace Ryujinx.Graphics.Vulkan internal KhrPushDescriptor PushDescriptorApi { get; private set; } internal ExtTransformFeedback TransformFeedbackApi { get; private set; } internal KhrDrawIndirectCount DrawIndirectCountApi { get; private set; } - internal ExtDebugReport DebugReportApi { get; private set; } + internal ExtDebugUtils DebugUtilsApi { get; private set; } internal uint QueueFamilyIndex { get; private set; } internal Queue Queue { get; private set; } @@ -57,7 +57,7 @@ namespace Ryujinx.Graphics.Vulkan private SyncManager _syncManager; private PipelineFull _pipeline; - private DebugReportCallbackEXT _debugReportCallback; + private DebugUtilsMessengerEXT _debugUtilsMessenger; internal HelperShader HelperShader { get; private set; } internal PipelineFull PipelineInternal => _pipeline; @@ -237,9 +237,9 @@ namespace Ryujinx.Graphics.Vulkan Api = api; - _instance = VulkanInitialization.CreateInstance(api, logLevel, _getRequiredExtensions(), out ExtDebugReport debugReport, out _debugReportCallback); + _instance = VulkanInitialization.CreateInstance(api, logLevel, _getRequiredExtensions(), out ExtDebugUtils debugUtils, out _debugUtilsMessenger); - DebugReportApi = debugReport; + DebugUtilsApi = debugUtils; if (api.TryGetInstanceExtension(_instance, out KhrSurface surfaceApi)) { @@ -584,9 +584,9 @@ namespace Ryujinx.Graphics.Vulkan MemoryAllocator.Dispose(); - if (_debugReportCallback.Handle != 0) + if (_debugUtilsMessenger.Handle != 0) { - DebugReportApi.DestroyDebugReportCallback(_instance, _debugReportCallback, null); + DebugUtilsApi.DestroyDebugUtilsMessenger(_instance, _debugUtilsMessenger, null); } foreach (var shader in Shaders) -- cgit v1.2.3