summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2014-06-01 01:56:09 -0700
committermagumagu <magumagu9@gmail.com>2014-06-01 01:56:09 -0700
commit0aecd9504e8ccbf52b89032be9d15b25ff14543d (patch)
tree3ce101b78355d1b3e45bfda58497aab5f1882b30 /Source/Core
parent31eedb2f79318002a4772087f96eb034f94787a1 (diff)
Video backends: remove dead code.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp10
-rw-r--r--Source/Core/VideoBackends/Software/VideoBackend.h2
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.cpp45
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.h4
-rw-r--r--Source/Core/VideoCommon/MainBase.cpp10
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp31
-rw-r--r--Source/Core/VideoCommon/PixelEngine.h2
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.h7
8 files changed, 2 insertions, 109 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 318c69f365..08c955abdb 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -362,16 +362,6 @@ bool VideoSoftware::Video_IsPossibleWaitingSetDrawDone(void)
return false;
}
-bool VideoSoftware::Video_IsHiWatermarkActive(void)
-{
- return false;
-}
-
-
-void VideoSoftware::Video_AbortFrame(void)
-{
-}
-
void VideoSoftware::RegisterCPMMIO(MMIO::Mapping* mmio, u32 base)
{
SWCommandProcessor::RegisterMMIO(mmio, base);
diff --git a/Source/Core/VideoBackends/Software/VideoBackend.h b/Source/Core/VideoBackends/Software/VideoBackend.h
index 3529e65342..4694945a5c 100644
--- a/Source/Core/VideoBackends/Software/VideoBackend.h
+++ b/Source/Core/VideoBackends/Software/VideoBackend.h
@@ -43,9 +43,7 @@ class VideoSoftware : public VideoBackend
void Video_SetRendering(bool bEnabled) override;
void Video_GatherPipeBursted() override;
- bool Video_IsHiWatermarkActive() override;
bool Video_IsPossibleWaitingSetDrawDone() override;
- void Video_AbortFrame() override;
void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) override;
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp
index e92e3560f5..22af52cfad 100644
--- a/Source/Core/VideoCommon/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/CommandProcessor.cpp
@@ -40,12 +40,7 @@ u16 m_bboxright;
u16 m_bboxbottom;
u16 m_tokenReg;
-static bool bProcessFifoToLoWatermark = false;
-static bool bProcessFifoAllDistance = false;
-
volatile bool isPossibleWaitingSetDrawDone = false;
-volatile bool isHiWatermarkActive = false;
-volatile bool isLoWatermarkActive = false;
volatile bool interruptSet= false;
volatile bool interruptWaiting= false;
volatile bool interruptTokenWaiting = false;
@@ -75,10 +70,6 @@ void DoState(PointerWrap &p)
p.Do(m_tokenReg);
p.Do(fifo);
- p.Do(bProcessFifoToLoWatermark);
- p.Do(bProcessFifoAllDistance);
- p.Do(isHiWatermarkActive);
- p.Do(isLoWatermarkActive);
p.Do(isPossibleWaitingSetDrawDone);
p.Do(interruptSet);
p.Do(interruptWaiting);
@@ -110,8 +101,6 @@ void Init()
m_tokenReg = 0;
memset(&fifo,0,sizeof(fifo));
- fifo.CPCmdIdle = 1;
- fifo.CPReadIdle = 1;
fifo.bFF_Breakpoint = 0;
fifo.bFF_HiWatermark = 0;
fifo.bFF_HiWatermarkInt = 0;
@@ -123,11 +112,7 @@ void Init()
interruptFinishWaiting = false;
interruptTokenWaiting = false;
- bProcessFifoToLoWatermark = false;
- bProcessFifoAllDistance = false;
isPossibleWaitingSetDrawDone = false;
- isHiWatermarkActive = false;
- isLoWatermarkActive = false;
et_UpdateInterrupts = CoreTiming::RegisterEvent("CPInterrupt", UpdateInterrupts_Wrapper);
}
@@ -365,12 +350,6 @@ void UpdateInterruptsFromVideoBackend(u64 userdata)
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
}
-// This is called by the ProcessorInterface when PI_FIFO_RESET is written to.
-void AbortFrame()
-{
-
-}
-
void SetCpStatus(bool isCPUThread)
{
// overflow & underflow check
@@ -411,9 +390,6 @@ void SetCpStatus(bool isCPUThread)
bool interrupt = (bpInt || ovfInt || undfInt) && m_CPCtrlReg.GPReadEnable;
- isHiWatermarkActive = ovfInt && m_CPCtrlReg.GPReadEnable;
- isLoWatermarkActive = undfInt && m_CPCtrlReg.GPReadEnable;
-
if (interrupt != interruptSet && !interruptWaiting)
{
u64 userdata = interrupt?1:0;
@@ -443,17 +419,6 @@ void SetCpStatus(bool isCPUThread)
}
}
-void ProcessFifoToLoWatermark()
-{
- if (IsOnThread())
- {
- while (!CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable &&
- fifo.CPReadWriteDistance > fifo.CPLoWatermark && !AtBreakpoint())
- Common::YieldCPU();
- }
- bProcessFifoToLoWatermark = false;
-}
-
void ProcessFifoAllDistance()
{
if (IsOnThread())
@@ -462,7 +427,6 @@ void ProcessFifoAllDistance()
fifo.CPReadWriteDistance && !AtBreakpoint())
Common::YieldCPU();
}
- bProcessFifoAllDistance = false;
}
void ProcessFifoEvents()
@@ -538,15 +502,10 @@ void SetCpControlRegister()
}
-// NOTE: The implementation of this function should be correct, but we intentionally aren't using it at the moment.
-// We don't emulate proper GP timing anyway at the moment, so this code would just slow down emulation.
+// NOTE: We intentionally don't emulate this function at the moment.
+// We don't emulate proper GP timing anyway at the moment, so it would just slow down emulation.
void SetCpClearRegister()
{
- // if (IsOnThread())
- // {
- // if (!m_CPClearReg.ClearFifoUnderflow && m_CPClearReg.ClearFifoOverflow)
- // bProcessFifoToLoWatermark = true;
- // }
}
void Update()
diff --git a/Source/Core/VideoCommon/CommandProcessor.h b/Source/Core/VideoCommon/CommandProcessor.h
index 09a5f454ca..300893d755 100644
--- a/Source/Core/VideoCommon/CommandProcessor.h
+++ b/Source/Core/VideoCommon/CommandProcessor.h
@@ -17,8 +17,6 @@ namespace CommandProcessor
extern SCPFifoStruct fifo; //This one is shared between gfx thread and emulator thread.
extern volatile bool isPossibleWaitingSetDrawDone; //This one is used for sync gfx thread and emulator thread.
-extern volatile bool isHiWatermarkActive;
-extern volatile bool isLoWatermarkActive;
extern volatile bool interruptSet;
extern volatile bool interruptWaiting;
extern volatile bool interruptTokenWaiting;
@@ -147,10 +145,8 @@ bool AllowIdleSkipping();
void SetCpClearRegister();
void SetCpControlRegister();
void SetCpStatusRegister();
-void ProcessFifoToLoWatermark();
void ProcessFifoAllDistance();
void ProcessFifoEvents();
-void AbortFrame();
void Update();
extern volatile u32 VITicks;
diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp
index b6fec113ed..f3c916e047 100644
--- a/Source/Core/VideoCommon/MainBase.cpp
+++ b/Source/Core/VideoCommon/MainBase.cpp
@@ -302,16 +302,6 @@ bool VideoBackendHardware::Video_IsPossibleWaitingSetDrawDone()
return CommandProcessor::isPossibleWaitingSetDrawDone;
}
-bool VideoBackendHardware::Video_IsHiWatermarkActive()
-{
- return CommandProcessor::isHiWatermarkActive;
-}
-
-void VideoBackendHardware::Video_AbortFrame()
-{
- CommandProcessor::AbortFrame();
-}
-
void VideoBackendHardware::RegisterCPMMIO(MMIO::Mapping* mmio, u32 base)
{
CommandProcessor::RegisterMMIO(mmio, base);
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index 4d913dd836..531ef21df6 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -328,37 +328,6 @@ void SetFinish()
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
}
-//This function is used in CommandProcessor when write CTRL_REGISTER and the new fifo is attached.
-void ResetSetFinish()
-{
- //if SetFinish happened but PE_CTRL_REGISTER not, I reset the interrupt else
- //remove event from the queue
- if (g_bSignalFinishInterrupt)
- {
- UpdateFinishInterrupt(false);
- g_bSignalFinishInterrupt = false;
- }
- else
- {
- CoreTiming::RemoveEvent(et_SetFinishOnMainThread);
- }
- CommandProcessor::interruptFinishWaiting = false;
-}
-
-void ResetSetToken()
-{
- if (g_bSignalTokenInterrupt)
- {
- UpdateTokenInterrupt(false);
- g_bSignalTokenInterrupt = 0;
- }
- else
- {
- CoreTiming::RemoveEvent(et_SetTokenOnMainThread);
- }
- CommandProcessor::interruptTokenWaiting = false;
-}
-
UPEAlphaReadReg GetAlphaReadMode()
{
return m_AlphaRead;
diff --git a/Source/Core/VideoCommon/PixelEngine.h b/Source/Core/VideoCommon/PixelEngine.h
index d021859cd6..815f870ae5 100644
--- a/Source/Core/VideoCommon/PixelEngine.h
+++ b/Source/Core/VideoCommon/PixelEngine.h
@@ -61,8 +61,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
// gfx backend support
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
void SetFinish(void);
-void ResetSetFinish(void);
-void ResetSetToken(void);
UPEAlphaReadReg GetAlphaReadMode();
// Bounding box functionality. Paper Mario (both) are a couple of the few games that use it.
diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h
index f355f8a80d..ddd71b033c 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.h
+++ b/Source/Core/VideoCommon/VideoBackendBase.h
@@ -51,9 +51,6 @@ struct SCPFifoStruct
volatile u32 bFF_BPInt;
volatile u32 bFF_Breakpoint;
- volatile u32 CPCmdIdle;
- volatile u32 CPReadIdle;
-
volatile u32 bFF_LoWatermarkInt;
volatile u32 bFF_HiWatermarkInt;
@@ -105,8 +102,6 @@ public:
virtual void Video_GatherPipeBursted() = 0;
virtual bool Video_IsPossibleWaitingSetDrawDone() = 0;
- virtual bool Video_IsHiWatermarkActive() = 0;
- virtual void Video_AbortFrame() = 0;
// Registers MMIO handlers for the CommandProcessor registers.
virtual void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) = 0;
@@ -154,8 +149,6 @@ class VideoBackendHardware : public VideoBackend
void Video_GatherPipeBursted() override;
bool Video_IsPossibleWaitingSetDrawDone() override;
- bool Video_IsHiWatermarkActive() override;
- void Video_AbortFrame() override;
void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) override;