diff --git a/FEXCore/Source/Interface/Config/Config.json.in b/FEXCore/Source/Interface/Config/Config.json.in index 7bb03ad73..1ddd90b0b 100644 --- a/FEXCore/Source/Interface/Config/Config.json.in +++ b/FEXCore/Source/Interface/Config/Config.json.in @@ -338,6 +338,13 @@ "Enables FEX's low-overhead sampling profile statistics.", "Requires a supported version of Mangohud to see the results" ] + }, + "EnableGpuvisProfiling": { + "Type": "bool", + "Default": "false", + "Desc": [ + "Enables profiling when FEX was built with the gpuvis profiler backend." + ] } }, "Hacks": { diff --git a/FEXCore/Source/Utils/Profiler.cpp b/FEXCore/Source/Utils/Profiler.cpp index 6f290d30e..3240bdc74 100644 --- a/FEXCore/Source/Utils/Profiler.cpp +++ b/FEXCore/Source/Utils/Profiler.cpp @@ -70,6 +70,10 @@ static std::array TraceFSDirectories { }; void Init() { + FEX_CONFIG_OPT(EnableGpuvisProfiling, ENABLEGPUVISPROFILING); + if (!EnableGpuvisProfiling()) { + return; + } for (auto Path : TraceFSDirectories) { #ifdef _WIN32 constexpr auto flags = O_WRONLY;