From 460b6be75f25b974632c84fe511346f1c3d1dfab Mon Sep 17 00:00:00 2001
From: Alessio <alessio1989@outlook.com>
Date: Mon, 18 Mar 2024 23:23:57 +0000
Subject: [PATCH] Radeon gpu profiler detection support

---
 src/video_core/vulkan_common/vulkan_device.cpp | 1 +
 src/video_core/vulkan_common/vulkan_device.h   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 5d2e684441..fda4465a95 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -1364,6 +1364,7 @@ void Device::CollectToolingInfo() {
         LOG_INFO(Render_Vulkan, "Attached debugging tool: {}", name);
         has_renderdoc = has_renderdoc || name == "RenderDoc";
         has_nsight_graphics = has_nsight_graphics || name == "NVIDIA Nsight Graphics";
+        has_radeon_gpu_profiler = has_radeon_gpu_profiler || name == "Radeon GPU Profiler";
     }
 }
 
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 25c2a9f406..79f62b9241 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -592,7 +592,7 @@ public:
 
     /// Returns true when a known debugging tool is attached.
     bool HasDebuggingToolAttached() const {
-        return has_renderdoc || has_nsight_graphics;
+        return has_renderdoc || has_nsight_graphics || has_radeon_gpu_profiler;
     }
 
     /// @returns True if compute pipelines can cause crashing.
@@ -821,6 +821,7 @@ private:
     bool has_broken_parallel_compiling{};      ///< Has broken parallel shader compiling.
     bool has_renderdoc{};                      ///< Has RenderDoc attached
     bool has_nsight_graphics{};                ///< Has Nsight Graphics attached
+    bool has_radeon_gpu_profiler{};            ///< Has Radeon GPU Profiler attached.
     bool supports_d24_depth{};                 ///< Supports D24 depth buffers.
     bool cant_blit_msaa{};                     ///< Does not support MSAA<->MSAA blitting.
     bool must_emulate_scaled_formats{};        ///< Requires scaled vertex format emulation
-- 
GitLab