1
0
Fork 0
mirror of https://git.h3cjp.net/H3cJP/yuzu.git synced 2024-12-22 19:07:27 +00:00

gpu: gpu_thread: Ensure MicroProfile is shutdown on exit.

This commit is contained in:
bunnei 2020-12-24 23:28:46 -08:00
parent 994a9fec4e
commit 954341763a

View file

@ -4,6 +4,7 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/microprofile.h" #include "common/microprofile.h"
#include "common/scope_exit.h"
#include "common/thread.h" #include "common/thread.h"
#include "core/core.h" #include "core/core.h"
#include "core/frontend/emu_window.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) { SynchState& state, Tegra::CDmaPusher& cdma_pusher) {
std::string name = "yuzu:GPU"; std::string name = "yuzu:GPU";
MicroProfileOnThreadCreate(name.c_str()); MicroProfileOnThreadCreate(name.c_str());
SCOPE_EXIT({ MicroProfileOnThreadExit(); });
Common::SetCurrentThreadName(name.c_str()); Common::SetCurrentThreadName(name.c_str());
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
system.RegisterHostThread(); system.RegisterHostThread();