summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Fifo.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-05-13 19:30:30 +0200
committerJosJuice <josjuice@gmail.com>2021-05-15 09:52:04 +0200
commit8a0f5ea04a276afcf3f76a038b0d3d88415ecad9 (patch)
tree3a2a9ac84b155626d4e6a30c988d932ef592ed0d /Source/Core/VideoCommon/Fifo.cpp
parent41befc21cd1124fc8e1e47aeeb8c02d0e110be9b (diff)
Remove all remaining volatile qualifiers
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index f12776449c..cfc126cfc1 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -139,7 +139,7 @@ void Shutdown()
void ExitGpuLoop()
{
// This should break the wait loop in CPU thread
- CommandProcessor::fifo.bFF_GPReadEnable = false;
+ CommandProcessor::fifo.bFF_GPReadEnable.store(0, std::memory_order_relaxed);
FlushGpu();
// Terminate GPU thread loop
@@ -327,7 +327,8 @@ void RunGpuLoop()
CommandProcessor::SetCPStatusFromGPU();
// check if we are able to run this buffer
- while (!CommandProcessor::IsInterruptWaiting() && fifo.bFF_GPReadEnable &&
+ while (!CommandProcessor::IsInterruptWaiting() &&
+ fifo.bFF_GPReadEnable.load(std::memory_order_relaxed) &&
fifo.CPReadWriteDistance.load(std::memory_order_relaxed) && !AtBreakpoint())
{
if (param.bSyncGPU && s_sync_ticks.load() < param.iSyncGpuMinDistance)
@@ -415,8 +416,9 @@ void GpuMaySleep()
bool AtBreakpoint()
{
CommandProcessor::SCPFifoStruct& fifo = CommandProcessor::fifo;
- return fifo.bFF_BPEnable && (fifo.CPReadPointer.load(std::memory_order_relaxed) ==
- fifo.CPBreakpoint.load(std::memory_order_relaxed));
+ return fifo.bFF_BPEnable.load(std::memory_order_relaxed) &&
+ (fifo.CPReadPointer.load(std::memory_order_relaxed) ==
+ fifo.CPBreakpoint.load(std::memory_order_relaxed));
}
void RunGpu()
@@ -446,8 +448,9 @@ static int RunGpuOnCpu(int ticks)
CommandProcessor::SCPFifoStruct& fifo = CommandProcessor::fifo;
bool reset_simd_state = false;
int available_ticks = int(ticks * SConfig::GetInstance().fSyncGpuOverclock) + s_sync_ticks.load();
- while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance.load(std::memory_order_relaxed) &&
- !AtBreakpoint() && available_ticks >= 0)
+ while (fifo.bFF_GPReadEnable.load(std::memory_order_relaxed) &&
+ fifo.CPReadWriteDistance.load(std::memory_order_relaxed) && !AtBreakpoint() &&
+ available_ticks >= 0)
{
if (s_use_deterministic_gpu_thread)
{