Added Tracy profiler

This commit is contained in:
psucien 2024-06-10 17:20:49 +02:00
parent bff2f006fb
commit e89b2d1cdd
6 changed files with 16 additions and 1 deletions

3
.gitmodules vendored
View File

@ -55,3 +55,6 @@
[submodule "externals/xxhash"]
path = externals/xxhash
url = https://github.com/Cyan4973/xxHash.git
[submodule "externals/tracy"]
path = externals/tracy
url = https://github.com/shadps4-emu/tracy

View File

@ -34,5 +34,6 @@ Files: CMakeSettings.json
src/shadps4.rc
src/shadps4.qrc
externals/stb_image.h
externals/tracy/*
Copyright: shadPS4 Emulator Project
License: GPL-2.0-or-later

View File

@ -500,7 +500,7 @@ endif()
create_target_directory_groups(shadps4)
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak)
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak Tracy::TracyClient)
target_link_libraries(shadps4 PRIVATE discord-rpc boost vma sirit vulkan-headers xxhash Zydis SPIRV glslang SDL3-shared)
if (NOT ENABLE_QT_GUI)

View File

@ -93,3 +93,11 @@ add_subdirectory(sirit EXCLUDE_FROM_ALL)
if (WIN32)
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
endif()
# Tracy
option(TRACY_ENABLE "" ON)
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
option(TRACY_ON_DEMAND "" ON)
option(TRACY_NO_FRAME_IMAGE "" ON)
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
add_subdirectory(tracy EXCLUDE_FROM_ALL)

1
externals/tracy vendored Submodule

@ -0,0 +1 @@
Subproject commit ef96964f71885e9ff177253ce0465569787e4a4c

View File

@ -10,3 +10,5 @@
#else
#error What the fuck is this compiler
#endif
#include <tracy/Tracy.hpp>