summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/CommandProcessor.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-06-03 23:21:46 +0200
committerdegasus <wickmarkus@web.de>2015-06-08 23:16:24 +0200
commitd31bed8b79a1266d7ac9c7c6f0e45c20d36aaf4c (patch)
treed62725f9a66b002847be97155c7c69036e341230 /Source/Core/VideoCommon/CommandProcessor.cpp
parent5a0daef7f0b3e05612674d359cce036511164ca5 (diff)
Fifo: Rewrite SyncGpu
The new implementation has 3 options: SyncGpuMaxDistance SyncGpuMinDistance SyncGpuOverclock The MaxDistance controlls how many CPU cycles the CPU is allowed to be in front of the GPU. Too low values will slow down extremly, too high values are as unsynchronized and half of the games will crash. The -MinDistance (negative) set how many cycles the GPU is allowed to be in front of the CPU. As we are used to emulate an infinitiv fast GPU, this may be set to any high (negative) number. The last parameter is to hack a faster (>1.0) or slower(<1.0) GPU. As we don't emulate GPU timing very well (eg skip the timings of the pixel stage completely), an overclock factor of ~0.5 is often much more accurate than 1.0
Diffstat (limited to 'Source/Core/VideoCommon/CommandProcessor.cpp')
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp
index 88b16afe7e..e16484de4d 100644
--- a/Source/Core/VideoCommon/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/CommandProcessor.cpp
@@ -16,7 +16,6 @@
#include "Core/HW/Memmap.h"
#include "Core/HW/MMIO.h"
#include "Core/HW/ProcessorInterface.h"
-#include "Core/HW/SystemTimers.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/PixelEngine.h"
@@ -47,8 +46,6 @@ static std::atomic<bool> s_interrupt_waiting;
static std::atomic<bool> s_interrupt_token_waiting;
static std::atomic<bool> s_interrupt_finish_waiting;
-static std::atomic<u32> s_vi_ticks(CommandProcessor::m_cpClockOrigin);
-
static bool IsOnThread()
{
return SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
@@ -546,30 +543,4 @@ void SetCpClearRegister()
{
}
-void Update()
-{
- while (s_vi_ticks.load() > m_cpClockOrigin && fifo.isGpuReadingData && IsOnThread())
- Common::YieldCPU();
-
- if (fifo.isGpuReadingData)
- s_vi_ticks.fetch_add(SystemTimers::GetTicksPerSecond() / 10000);
-
- RunGpu();
-}
-
-u32 GetVITicks()
-{
- return s_vi_ticks.load();
-}
-
-void SetVITicks(u32 ticks)
-{
- s_vi_ticks.store(ticks);
-}
-
-void DecrementVITicks(u32 ticks)
-{
- s_vi_ticks.fetch_sub(ticks);
-}
-
} // end of namespace CommandProcessor