mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
core: Promote CPU/GPU threads to time critical
And also demote Audren and CoreTiming to High thread priority.
This commit is contained in:
parent
d718eab351
commit
3053a62375
4 changed files with 4 additions and 4 deletions
|
@ -135,7 +135,7 @@ void AudioRenderer::ThreadFunc() {
|
||||||
static constexpr char name[]{"AudioRenderer"};
|
static constexpr char name[]{"AudioRenderer"};
|
||||||
MicroProfileOnThreadCreate(name);
|
MicroProfileOnThreadCreate(name);
|
||||||
Common::SetCurrentThreadName(name);
|
Common::SetCurrentThreadName(name);
|
||||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
|
||||||
if (mailbox->ADSPWaitMessage() != RenderMessage::AudioRenderer_InitializeOK) {
|
if (mailbox->ADSPWaitMessage() != RenderMessage::AudioRenderer_InitializeOK) {
|
||||||
LOG_ERROR(Service_Audio,
|
LOG_ERROR(Service_Audio,
|
||||||
"ADSP Audio Renderer -- Failed to receive initialize message from host!");
|
"ADSP Audio Renderer -- Failed to receive initialize message from host!");
|
||||||
|
|
|
@ -53,7 +53,7 @@ void CoreTiming::ThreadEntry(CoreTiming& instance) {
|
||||||
static constexpr char name[] = "HostTiming";
|
static constexpr char name[] = "HostTiming";
|
||||||
MicroProfileOnThreadCreate(name);
|
MicroProfileOnThreadCreate(name);
|
||||||
Common::SetCurrentThreadName(name);
|
Common::SetCurrentThreadName(name);
|
||||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
|
||||||
instance.on_thread_init();
|
instance.on_thread_init();
|
||||||
instance.ThreadLoop();
|
instance.ThreadLoop();
|
||||||
MicroProfileOnThreadExit();
|
MicroProfileOnThreadExit();
|
||||||
|
|
|
@ -192,7 +192,7 @@ void CpuManager::RunThread(std::stop_token token, std::size_t core) {
|
||||||
}
|
}
|
||||||
MicroProfileOnThreadCreate(name.c_str());
|
MicroProfileOnThreadCreate(name.c_str());
|
||||||
Common::SetCurrentThreadName(name.c_str());
|
Common::SetCurrentThreadName(name.c_str());
|
||||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
|
||||||
auto& data = core_data[core];
|
auto& data = core_data[core];
|
||||||
data.host_context = Common::Fiber::ThreadToFiber();
|
data.host_context = Common::Fiber::ThreadToFiber();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
|
||||||
SCOPE_EXIT({ MicroProfileOnThreadExit(); });
|
SCOPE_EXIT({ MicroProfileOnThreadExit(); });
|
||||||
|
|
||||||
Common::SetCurrentThreadName(name.c_str());
|
Common::SetCurrentThreadName(name.c_str());
|
||||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
|
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
|
||||||
system.RegisterHostThread();
|
system.RegisterHostThread();
|
||||||
|
|
||||||
auto current_context = context.Acquire();
|
auto current_context = context.Acquire();
|
||||||
|
|
Loading…
Reference in a new issue