From 9a3cc7546b11e68cd4919363cc6d2af1a374d2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 13 Dec 2024 19:35:40 +0100 Subject: [PATCH] One more bit of simplification --- GPU/GPUCommon.cpp | 24 +++++++++--------------- GPU/GPUCommon.h | 1 - 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index b3bd9bf034..66789af401 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -806,7 +806,6 @@ DLResult GPUCommon::ProcessDLQueue() { // TODO: Cycle counting might need some more care? FinishDeferred(); _dbg_assert_(!GPURecord::IsActive()); - gpuState = GPUSTATE_BREAK; return DLResult::Break; } } @@ -829,10 +828,15 @@ DLResult GPUCommon::ProcessDLQueue() { list.offsetAddr = gstate_c.offsetAddr; - if (gpuState == GPUSTATE_DONE || gpuState == GPUSTATE_ERROR) { - // return true - } else { - goto bail; + switch (gpuState) { + case GPUSTATE_DONE: + case GPUSTATE_ERROR: + // don't do anything - though dunno about error... + break; + case GPUSTATE_STALL: + return DLResult::Done; + default: + return DLResult::Error; } // Some other list could've taken the spot while we dilly-dallied around, so we need the check. @@ -855,16 +859,6 @@ DLResult GPUCommon::ProcessDLQueue() { __GeTriggerSync(GPU_SYNC_DRAW, 1, drawCompleteTicks); // Since the event is in CoreTiming, we're in sync. Just set 0 now. return DLResult::Done; - -bail: - switch (gpuState) { - case GPURunState::GPUSTATE_STALL: - return DLResult::Done; - case GPURunState::GPUSTATE_BREAK: - return DLResult::Break; - default: - return DLResult::Error; - } } bool GPUCommon::ShouldSplitOverGe() const { diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index c3b77e1a74..d45e7ca661 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -80,7 +80,6 @@ enum GPURunState { GPUSTATE_STALL = 2, GPUSTATE_INTERRUPT = 3, GPUSTATE_ERROR = 4, - GPUSTATE_BREAK = 5, }; enum GPUSyncType {