diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/nsight_aftermath_tracker.cpp | 13 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/nsight_aftermath_tracker.h | 8 |
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 | ||
| 289 | if (ENABLE_NSIGHT_AFTERMATH) | 289 | if (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 | ||
| 31 | namespace Vulkan { | 22 | namespace 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 | |||
| 23 | namespace Vulkan { | 21 | namespace Vulkan { |
| 24 | 22 | ||
| 25 | class NsightAftermathTracker { | 23 | class NsightAftermathTracker { |