Video backends: remove dead code.

This commit is contained in:
magumagu 2014-06-01 01:56:09 -07:00
parent 31eedb2f79
commit 0aecd9504e
8 changed files with 2 additions and 109 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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()

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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.

View File

@ -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;