From a94431f4fa8f8a6fb435a4506cd2f90ba554586f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 6 Dec 2024 19:53:31 +0100 Subject: [PATCH] Remove an unnecessary wrapper function --- GPU/Debugger/Playback.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/GPU/Debugger/Playback.cpp b/GPU/Debugger/Playback.cpp index 41a14dc43e..11f8a81684 100644 --- a/GPU/Debugger/Playback.cpp +++ b/GPU/Debugger/Playback.cpp @@ -293,7 +293,6 @@ public: private: void SyncStall(); - bool SubmitCmds(const void *p, u32 sz); void SubmitListEnd(); void Init(u32 ptr, u32 sz); @@ -331,6 +330,7 @@ private: void DumpExecute::SyncStall() { if (execListBuf == 0) { + VERBOSE_LOG(Log::G3D, "SyncStall: No active display list"); return; } @@ -347,12 +347,11 @@ void DumpExecute::SyncStall() { currentMIPS->downcount -= listTicks - nowTicks; } } - // Make sure downcount doesn't overflow. CoreTiming::ForceCheck(); } -bool DumpExecute::SubmitCmds(const void *p, u32 sz) { +void DumpExecute::Registers(u32 ptr, u32 sz) { if (execListBuf == 0) { u32 allocSize = LIST_BUF_SIZE; execListBuf = userMemory.Alloc(allocSize, true, "List buf"); @@ -361,7 +360,7 @@ bool DumpExecute::SubmitCmds(const void *p, u32 sz) { } if (execListBuf == 0) { ERROR_LOG(Log::System, "Unable to allocate for display list"); - return false; + return; } execListPos = execListBuf; @@ -389,13 +388,15 @@ bool DumpExecute::SubmitCmds(const void *p, u32 sz) { lastBase_ = execListBuf & 0xFF000000; // Don't continue until we've stalled. + // TODO: Is this really needed? It seems fine without it. SyncStall(); } Memory::MemcpyUnchecked(execListPos, execListQueue.data(), pendingSize); execListPos += pendingSize; u32 writePos = execListPos; - Memory::MemcpyUnchecked(execListPos, p, sz); + void *srcData = (void *)(pushbuf_.data() + ptr); + Memory::MemcpyUnchecked(execListPos, srcData, sz); execListPos += sz; // TODO: Unfortunate. Maybe Texture commands should contain the bufw instead. @@ -431,8 +432,6 @@ bool DumpExecute::SubmitCmds(const void *p, u32 sz) { } execListQueue.clear(); - - return true; } void DumpExecute::SubmitListEnd() { @@ -464,10 +463,6 @@ void DumpExecute::Init(u32 ptr, u32 sz) { lastBase_ = 0xFFFFFFFF; } -void DumpExecute::Registers(u32 ptr, u32 sz) { - SubmitCmds(pushbuf_.data() + ptr, sz); -} - void DumpExecute::Vertices(u32 ptr, u32 sz) { u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this)); if (psp == 0) {