mirror of https://github.com/PCSX2/pcsx2.git
MTGS: Don't unlock mutex if you're just going to lock it again
Poor MTVU thread getting trolled by the GS thread. By the time it wakes up its lock is taken again. When under contention (GS thread behind the VU thread), this caused the GS thread to waste an additional 8% of its time pointlessly waking the VU thread
This commit is contained in:
parent
881b017606
commit
85f1acb7b7
|
@ -436,10 +436,13 @@ void SysMtgsThread::ExecuteTaskInThread()
|
|||
{
|
||||
MTVU_LOG("MTGS - Waiting on semaXGkick!");
|
||||
vu1Thread.KickStart(true);
|
||||
busy.PartialRelease();
|
||||
// Wait for MTVU to complete vu1 program
|
||||
vu1Thread.semaXGkick.WaitWithoutYield();
|
||||
busy.PartialAcquire();
|
||||
if (!vu1Thread.semaXGkick.TryWait())
|
||||
{
|
||||
busy.PartialRelease();
|
||||
// Wait for MTVU to complete vu1 program
|
||||
vu1Thread.semaXGkick.WaitWithoutYield();
|
||||
busy.PartialAcquire();
|
||||
}
|
||||
Gif_Path& path = gifUnit.gifPath[GIF_PATH_1];
|
||||
GS_Packet gsPack = path.GetGSPacketMTVU(); // Get vu1 program's xgkick packet(s)
|
||||
if (gsPack.size)
|
||||
|
|
Loading…
Reference in New Issue