PixelEngine: Drop write-only variables.
This commit is contained in:
parent
7e3c04f069
commit
367e1b4d4c
|
@ -38,8 +38,6 @@ static u16 m_tokenReg;
|
||||||
|
|
||||||
static std::atomic<bool> s_interrupt_set;
|
static std::atomic<bool> s_interrupt_set;
|
||||||
static std::atomic<bool> s_interrupt_waiting;
|
static std::atomic<bool> s_interrupt_waiting;
|
||||||
static std::atomic<bool> s_interrupt_token_waiting;
|
|
||||||
static std::atomic<bool> s_interrupt_finish_waiting;
|
|
||||||
|
|
||||||
static bool IsOnThread()
|
static bool IsOnThread()
|
||||||
{
|
{
|
||||||
|
@ -65,8 +63,6 @@ void DoState(PointerWrap& p)
|
||||||
|
|
||||||
p.Do(s_interrupt_set);
|
p.Do(s_interrupt_set);
|
||||||
p.Do(s_interrupt_waiting);
|
p.Do(s_interrupt_waiting);
|
||||||
p.Do(s_interrupt_token_waiting);
|
|
||||||
p.Do(s_interrupt_finish_waiting);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void WriteLow(volatile u32& _reg, u16 lowbits)
|
static inline void WriteLow(volatile u32& _reg, u16 lowbits)
|
||||||
|
@ -112,8 +108,6 @@ void Init()
|
||||||
|
|
||||||
s_interrupt_set.store(false);
|
s_interrupt_set.store(false);
|
||||||
s_interrupt_waiting.store(false);
|
s_interrupt_waiting.store(false);
|
||||||
s_interrupt_finish_waiting.store(false);
|
|
||||||
s_interrupt_token_waiting.store(false);
|
|
||||||
|
|
||||||
et_UpdateInterrupts = CoreTiming::RegisterEvent("CPInterrupt", UpdateInterrupts_Wrapper);
|
et_UpdateInterrupts = CoreTiming::RegisterEvent("CPInterrupt", UpdateInterrupts_Wrapper);
|
||||||
}
|
}
|
||||||
|
@ -356,16 +350,6 @@ bool IsInterruptWaiting()
|
||||||
return s_interrupt_waiting.load();
|
return s_interrupt_waiting.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetInterruptTokenWaiting(bool waiting)
|
|
||||||
{
|
|
||||||
s_interrupt_token_waiting.store(waiting);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetInterruptFinishWaiting(bool waiting)
|
|
||||||
{
|
|
||||||
s_interrupt_finish_waiting.store(waiting);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetCPStatusFromGPU()
|
void SetCPStatusFromGPU()
|
||||||
{
|
{
|
||||||
// breakpoint
|
// breakpoint
|
||||||
|
|
|
@ -257,14 +257,12 @@ static void SetToken_OnMainThread(u64 userdata, s64 cyclesLate)
|
||||||
s_signal_token_interrupt.store(1);
|
s_signal_token_interrupt.store(1);
|
||||||
UpdateInterrupts();
|
UpdateInterrupts();
|
||||||
}
|
}
|
||||||
CommandProcessor::SetInterruptTokenWaiting(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetFinish_OnMainThread(u64 userdata, s64 cyclesLate)
|
static void SetFinish_OnMainThread(u64 userdata, s64 cyclesLate)
|
||||||
{
|
{
|
||||||
s_signal_finish_interrupt.store(1);
|
s_signal_finish_interrupt.store(1);
|
||||||
UpdateInterrupts();
|
UpdateInterrupts();
|
||||||
CommandProcessor::SetInterruptFinishWaiting(false);
|
|
||||||
|
|
||||||
Core::FrameUpdateOnCPUThread();
|
Core::FrameUpdateOnCPUThread();
|
||||||
}
|
}
|
||||||
|
@ -278,8 +276,6 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
||||||
s_signal_token_interrupt.store(1);
|
s_signal_token_interrupt.store(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandProcessor::SetInterruptTokenWaiting(true);
|
|
||||||
|
|
||||||
if (!SConfig::GetInstance().bCPUThread || Fifo::UseDeterministicGPUThread())
|
if (!SConfig::GetInstance().bCPUThread || Fifo::UseDeterministicGPUThread())
|
||||||
CoreTiming::ScheduleEvent(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
CoreTiming::ScheduleEvent(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
||||||
else
|
else
|
||||||
|
@ -291,8 +287,6 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
||||||
// THIS IS EXECUTED FROM VIDEO THREAD (BPStructs.cpp) when a new frame has been drawn
|
// THIS IS EXECUTED FROM VIDEO THREAD (BPStructs.cpp) when a new frame has been drawn
|
||||||
void SetFinish()
|
void SetFinish()
|
||||||
{
|
{
|
||||||
CommandProcessor::SetInterruptFinishWaiting(true);
|
|
||||||
|
|
||||||
if (!SConfig::GetInstance().bCPUThread || Fifo::UseDeterministicGPUThread())
|
if (!SConfig::GetInstance().bCPUThread || Fifo::UseDeterministicGPUThread())
|
||||||
CoreTiming::ScheduleEvent(0, et_SetFinishOnMainThread, 0);
|
CoreTiming::ScheduleEvent(0, et_SetFinishOnMainThread, 0);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue