diff --git a/pcsx2/GS.h b/pcsx2/GS.h index 68d589483e..4fa4412bc9 100644 --- a/pcsx2/GS.h +++ b/pcsx2/GS.h @@ -340,7 +340,6 @@ public: std::atomic m_VsyncSignalListener; std::mutex m_mtx_RingBufferBusy2; // Gets released on semaXGkick waiting... - std::mutex m_mtx_WaitGS; Threading::WorkSema m_sem_event; Threading::UserspaceSemaphore m_sem_OnRingReset; Threading::UserspaceSemaphore m_sem_Vsync; diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index 8061b6fc65..2587773aa9 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -617,7 +617,7 @@ void SysMtgsThread::WaitGS(bool syncRegs, bool weakWait, bool isMTVU) // we don't want to access the content of the queue SetEvent(); - if (weakWait) + if (weakWait && isMTVU) { // On weakWait we will stop waiting on the MTGS thread if the // MTGS thread has processed a vu1 xgkick packet, or is pending on @@ -644,9 +644,10 @@ void SysMtgsThread::WaitGS(bool syncRegs, bool weakWait, bool isMTVU) pxFailRel("MTGS Thread Died"); } + assert(!(weakWait && syncRegs) && "No synchronization for this!"); + if (syncRegs) { - std::unique_lock lock(m_mtx_WaitGS); // Completely synchronize GS and MTGS register states. memcpy(RingBuffer.Regs, PS2MEM_GS, sizeof(RingBuffer.Regs)); }