summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/CommandProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/CommandProcessor.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/CommandProcessor.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/Src/CommandProcessor.cpp b/Source/Core/VideoCommon/Src/CommandProcessor.cpp
index eb03730fc3..21bfaa5f7e 100644
--- a/Source/Core/VideoCommon/Src/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/Src/CommandProcessor.cpp
@@ -468,7 +468,7 @@ void STACKALIGN GatherPipeBursted()
}
if (IsOnThread())
- SetCpStatus();
+ SetCpStatus(true);
// update the fifo-pointer
if (fifo.CPWritePointer >= fifo.CPEnd)
@@ -518,14 +518,14 @@ void AbortFrame()
}
-void SetCpStatus()
+void SetCpStatus(bool isCPUThread)
{
// overflow & underflow check
fifo.bFF_HiWatermark = (fifo.CPReadWriteDistance > fifo.CPHiWatermark);
fifo.bFF_LoWatermark = (fifo.CPReadWriteDistance < fifo.CPLoWatermark);
-
+
// breakpoint
- if (Core::IsGPUThread())
+ if (!isCPUThread)
{
if (fifo.bFF_BPEnable)
{
@@ -556,7 +556,7 @@ void SetCpStatus()
bool bpInt = fifo.bFF_Breakpoint && fifo.bFF_BPInt;
bool ovfInt = fifo.bFF_HiWatermark && fifo.bFF_HiWatermarkInt;
bool undfInt = fifo.bFF_LoWatermark && fifo.bFF_LoWatermarkInt;
-
+
bool interrupt = (bpInt || ovfInt || undfInt) && m_CPCtrlReg.GPReadEnable;
isHiWatermarkActive = ovfInt && m_CPCtrlReg.GPReadEnable;
@@ -567,15 +567,17 @@ void SetCpStatus()
u64 userdata = interrupt?1:0;
if (IsOnThread())
{
- if(!interrupt || bpInt || undfInt || ovfInt)
+ if (!interrupt || bpInt || undfInt || ovfInt)
{
- if (Core::IsGPUThread())
+ if (!isCPUThread)
{
+ // GPU thread:
interruptWaiting = true;
CommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
}
- else if (Core::IsCPUThread())
+ else
{
+ // CPU thread:
interruptSet = interrupt;
INFO_LOG(COMMANDPROCESSOR,"Interrupt set");
ProcessorInterface::SetInterrupt(INT_CAUSE_CP, interrupt);