diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-24 23:28:46 -0800 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-12-28 21:33:34 -0800 |
commit | 954341763a3d8e0b9734fc2234368c40d65bace4 (patch) | |
tree | 5c2196be6ebde55ae32fd0f17d1c110b373ac675 /src/video_core/gpu_thread.cpp | |
parent | 994a9fec4e8fb70df10ec7699c641db68d960795 (diff) |
gpu: gpu_thread: Ensure MicroProfile is shutdown on exit.
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
-rw-r--r-- | src/video_core/gpu_thread.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 1e95d80c3f..7e490bcc30 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp @@ -4,6 +4,7 @@ #include "common/assert.h" #include "common/microprofile.h" +#include "common/scope_exit.h" #include "common/thread.h" #include "core/core.h" #include "core/frontend/emu_window.h" @@ -21,6 +22,8 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer, SynchState& state, Tegra::CDmaPusher& cdma_pusher) { std::string name = "yuzu:GPU"; MicroProfileOnThreadCreate(name.c_str()); + SCOPE_EXIT({ MicroProfileOnThreadExit(); }); + Common::SetCurrentThreadName(name.c_str()); Common::SetCurrentThreadPriority(Common::ThreadPriority::High); system.RegisterHostThread(); |