From c0f57df4e67c41de1939fa6d505a12561c0c51bf Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:45:54 -0800 Subject: [PATCH] vk_instance: Enable additional debug tagging if crash diagnostics is enabled. (#2066) --- src/video_core/renderer_vulkan/vk_instance.cpp | 6 ++++-- src/video_core/renderer_vulkan/vk_instance.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_instance.cpp b/src/video_core/renderer_vulkan/vk_instance.cpp index 790e7640..9bc62783 100644 --- a/src/video_core/renderer_vulkan/vk_instance.cpp +++ b/src/video_core/renderer_vulkan/vk_instance.cpp @@ -92,13 +92,15 @@ std::string GetReadableVersion(u32 version) { Instance::Instance(bool enable_validation, bool enable_crash_diagnostic) : instance{CreateInstance(Frontend::WindowSystemType::Headless, enable_validation, enable_crash_diagnostic)}, - physical_devices{EnumeratePhysicalDevices(instance)} {} + physical_devices{EnumeratePhysicalDevices(instance)}, + crash_diagnostic{enable_crash_diagnostic} {} Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index, bool enable_validation /*= false*/, bool enable_crash_diagnostic /*= false*/) : instance{CreateInstance(window.GetWindowInfo().type, enable_validation, enable_crash_diagnostic)}, - physical_devices{EnumeratePhysicalDevices(instance)} { + physical_devices{EnumeratePhysicalDevices(instance)}, + crash_diagnostic{enable_crash_diagnostic} { if (enable_validation) { debug_callback = CreateDebugCallback(*instance); } diff --git a/src/video_core/renderer_vulkan/vk_instance.h b/src/video_core/renderer_vulkan/vk_instance.h index 62838140..4e091824 100644 --- a/src/video_core/renderer_vulkan/vk_instance.h +++ b/src/video_core/renderer_vulkan/vk_instance.h @@ -81,7 +81,7 @@ public: /// Returns true when a known debugging tool is attached. bool HasDebuggingToolAttached() const { - return has_renderdoc || has_nsight_graphics; + return crash_diagnostic || has_renderdoc || has_nsight_graphics; } /// Returns true if anisotropic filtering is supported @@ -338,6 +338,7 @@ private: u32 subgroup_size{}; bool tooling_info{}; bool debug_utils_supported{}; + bool crash_diagnostic{}; bool has_nsight_graphics{}; bool has_renderdoc{}; };