RawSpu: Optimize START register/commands
START MFC proxy commands can be common even after their need, optimize their usage.
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
#include "Emu/Cell/RawSPUThread.h"
|
||||
|
||||
inline void try_start(spu_thread& spu)
|
||||
{
|
||||
bool notify = false;
|
||||
|
||||
if (~spu.status_npc.load().status & SPU_STATUS_RUNNING)
|
||||
{
|
||||
reader_lock lock(spu.run_ctrl_mtx);
|
||||
|
||||
@@ -21,6 +25,12 @@ inline void try_start(spu_thread& spu)
|
||||
}).second)
|
||||
{
|
||||
spu.state -= cpu_flag::stop;
|
||||
notify = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (notify)
|
||||
{
|
||||
spu.state.notify_one();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user