From 5d50cd562f54ea44790d550e89d5597e951f41fe Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 15 May 2024 08:19:14 +1000 Subject: [PATCH] MTGS: Eliminate redundant SynchronousMTGS checks in Release build --- pcsx2/MTGS.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index 31e8784784..757025af86 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -551,7 +551,7 @@ void MTGS::MainLoop() uint newringpos = (s_ReadPos.load(std::memory_order_relaxed) + ringposinc) & RingBufferMask; - if (EmuConfig.GS.SynchronousMTGS) + if (IsDevBuild && EmuConfig.GS.SynchronousMTGS) [[unlikely]] { pxAssert(s_WritePos == newringpos); } @@ -675,7 +675,7 @@ void MTGS::SendDataPacket() s_WritePos.store(s_packet_writepos, std::memory_order_release); - if (EmuConfig.GS.SynchronousMTGS) + if (IsDevBuild && EmuConfig.GS.SynchronousMTGS) [[unlikely]] { WaitGS(); } @@ -815,7 +815,7 @@ __fi void MTGS::_FinishSimplePacket() pxAssert(future_writepos != s_ReadPos.load(std::memory_order_acquire)); s_WritePos.store(future_writepos, std::memory_order_release); - if (EmuConfig.GS.SynchronousMTGS) + if (IsDevBuild && EmuConfig.GS.SynchronousMTGS) [[unlikely]] WaitGS(); else ++s_CopyDataTally; @@ -840,7 +840,7 @@ void MTGS::SendSimpleGSPacket(Command type, u32 offset, u32 size, GIF_PATH path) { SendSimplePacket(type, (int)offset, (int)size, (int)path); - if (!EmuConfig.GS.SynchronousMTGS) + if (!IsDevBuild || !EmuConfig.GS.SynchronousMTGS) [[likely]] { s_CopyDataTally += size / 16; if (s_CopyDataTally > 0x2000)