summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar LC2021-01-23 05:40:50 -0500
committerGravatar GitHub2021-01-23 05:40:50 -0500
commit65f821850ec4fb479d5640d7c75b0d2cf5f9f1d4 (patch)
tree6ad2d4d89416fff72320b6fb1ca05f0794517ff6 /src
parentMerge pull request #5776 from ogniK5377/lbl (diff)
parentvideo_core/cmake: Properly generate fatal errors on Aftermath (diff)
downloadyuzu-65f821850ec4fb479d5640d7c75b0d2cf5f9f1d4.tar.gz
yuzu-65f821850ec4fb479d5640d7c75b0d2cf5f9f1d4.tar.xz
yuzu-65f821850ec4fb479d5640d7c75b0d2cf5f9f1d4.zip
Merge pull request #5797 from ReinUsesLisp/nsight-aftermath-build
nsight_aftermath_tracker: Fix build issues when enabled
Diffstat (limited to 'src')
-rw-r--r--src/video_core/CMakeLists.txt4
-rw-r--r--src/video_core/vulkan_common/nsight_aftermath_tracker.cpp13
-rw-r--r--src/video_core/vulkan_common/nsight_aftermath_tracker.h8
3 files changed, 7 insertions, 18 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index e01ea55ab..bb1f8491f 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -288,10 +288,10 @@ target_link_libraries(video_core PRIVATE sirit)
288 288
289if (ENABLE_NSIGHT_AFTERMATH) 289if (ENABLE_NSIGHT_AFTERMATH)
290 if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK}) 290 if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
291 message(ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided") 291 message(FATAL_ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided")
292 endif() 292 endif()
293 if (NOT WIN32) 293 if (NOT WIN32)
294 message(ERROR "Nsight Aftermath doesn't support non-Windows platforms") 294 message(FATAL_ERROR "Nsight Aftermath doesn't support non-Windows platforms")
295 endif() 295 endif()
296 target_compile_definitions(video_core PRIVATE HAS_NSIGHT_AFTERMATH) 296 target_compile_definitions(video_core PRIVATE HAS_NSIGHT_AFTERMATH)
297 target_include_directories(video_core PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include") 297 target_include_directories(video_core PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include")
diff --git a/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp b/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp
index 8d10ac29e..7a9d00d4f 100644
--- a/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp
+++ b/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp
@@ -12,21 +12,12 @@
12 12
13#include <fmt/format.h> 13#include <fmt/format.h>
14 14
15#define VK_NO_PROTOTYPES
16#include <vulkan/vulkan.h>
17
18#include <GFSDK_Aftermath.h>
19#include <GFSDK_Aftermath_Defines.h>
20#include <GFSDK_Aftermath_GpuCrashDump.h>
21#include <GFSDK_Aftermath_GpuCrashDumpDecoding.h>
22
23#include "common/common_paths.h" 15#include "common/common_paths.h"
24#include "common/common_types.h" 16#include "common/common_types.h"
25#include "common/file_util.h" 17#include "common/file_util.h"
26#include "common/logging/log.h" 18#include "common/logging/log.h"
27#include "common/scope_exit.h" 19#include "common/scope_exit.h"
28 20#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
29#include "video_core/renderer_vulkan/nsight_aftermath_tracker.h"
30 21
31namespace Vulkan { 22namespace Vulkan {
32 23
@@ -53,7 +44,7 @@ NsightAftermathTracker::NsightAftermathTracker() {
53 !dl.GetSymbol("GFSDK_Aftermath_GpuCrashDump_GetJSON", 44 !dl.GetSymbol("GFSDK_Aftermath_GpuCrashDump_GetJSON",
54 &GFSDK_Aftermath_GpuCrashDump_GetJSON)) { 45 &GFSDK_Aftermath_GpuCrashDump_GetJSON)) {
55 LOG_ERROR(Render_Vulkan, "Failed to load Nsight Aftermath function pointers"); 46 LOG_ERROR(Render_Vulkan, "Failed to load Nsight Aftermath function pointers");
56 return false; 47 return;
57 } 48 }
58 dump_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir) + "gpucrash"; 49 dump_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir) + "gpucrash";
59 50
diff --git a/src/video_core/vulkan_common/nsight_aftermath_tracker.h b/src/video_core/vulkan_common/nsight_aftermath_tracker.h
index cee3847fb..1ce8d4e8e 100644
--- a/src/video_core/vulkan_common/nsight_aftermath_tracker.h
+++ b/src/video_core/vulkan_common/nsight_aftermath_tracker.h
@@ -8,8 +8,9 @@
8#include <string> 8#include <string>
9#include <vector> 9#include <vector>
10 10
11#define VK_NO_PROTOTYPES 11#include "common/common_types.h"
12#include <vulkan/vulkan.h> 12#include "common/dynamic_library.h"
13#include "video_core/vulkan_common/vulkan_wrapper.h"
13 14
14#ifdef HAS_NSIGHT_AFTERMATH 15#ifdef HAS_NSIGHT_AFTERMATH
15#include <GFSDK_Aftermath_Defines.h> 16#include <GFSDK_Aftermath_Defines.h>
@@ -17,9 +18,6 @@
17#include <GFSDK_Aftermath_GpuCrashDumpDecoding.h> 18#include <GFSDK_Aftermath_GpuCrashDumpDecoding.h>
18#endif 19#endif
19 20
20#include "common/common_types.h"
21#include "common/dynamic_library.h"
22
23namespace Vulkan { 21namespace Vulkan {
24 22
25class NsightAftermathTracker { 23class NsightAftermathTracker {