summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-05-13 18:44:59 +0200
committerJosJuice <josjuice@gmail.com>2021-05-13 18:56:27 +0200
commitb93983b50a8b2d50a2120601784aab022f46308c (patch)
treea169385d181f65ad39f47c6892fe2dc705233727 /Source/Core/VideoCommon/RenderBase.cpp
parent80ac36a712b80516f1708de56a5b6582127de2f4 (diff)
Remove Atomic.h
The STL has everything we need nowadays. I have tried to not alter any behavior or semantics with this change wherever possible. In particular, WriteLow and WriteHigh in CommandProcessor retain the ability to accidentally undo another thread's write to the upper half or lower half respectively. If that should be fixed, it should be done in a separate commit for clarity. One thing did change: The places where we were using += on a volatile variable (not an atomic operation) are now using fetch_add (actually an atomic operation). Tested with single core and dual core on x86-64 and AArch64.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 9eac785c5a..6162004127 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -889,7 +889,9 @@ void Renderer::CheckFifoRecording()
RecordVideoMemory();
}
- FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase, CommandProcessor::fifo.CPEnd);
+ FifoRecorder::GetInstance().EndFrame(
+ CommandProcessor::fifo.CPBase.load(std::memory_order_relaxed),
+ CommandProcessor::fifo.CPEnd.load(std::memory_order_relaxed));
}
void Renderer::RecordVideoMemory()