Use the newer interface for Qt's gpu debugging.

This commit is contained in:
Unknown W. Brackets 2013-10-20 00:14:39 -07:00
parent 40da2f7f5b
commit afb578a325
4 changed files with 24 additions and 17 deletions

View file

@ -72,10 +72,6 @@ public:
virtual void GPUNotifyTextureAttachment(u32 addr) {}
virtual bool GPUAllowTextureCache(u32 addr) { return true; }
virtual bool GpuStep() { return false; }
virtual void SendGPUStart() {}
virtual void SendGPUWait(u32 cmd, u32 addr, void* data) {}
virtual bool CanCreateShortcut() {return false;}
virtual bool CreateDesktopShortcut(std::string argumentPath, std::string title) {return false;}

View file

@ -477,13 +477,6 @@ bool GPUCommon::InterpretList(DisplayList &list) {
return true;
}
// TODO: Use new interface.
#if defined(USING_QT_UI)
if (host->GpuStep()) {
host->SendGPUStart();
}
#endif
cycleLastPC = list.pc;
cyclesExecuted += 60;
downcount = list.stall == 0 ? 0x0FFFFFFF : (list.stall - list.pc) / 4;
@ -544,12 +537,6 @@ void GPUCommon::SlowRunLoop(DisplayList &list)
u32 op = Memory::ReadUnchecked_U32(list.pc);
u32 cmd = op >> 24;
// TODO: Replace.
#if defined(USING_QT_UI)
if (host->GpuStep())
host->SendGPUWait(cmd, list.pc, &gstate);
#endif
u32 diff = op ^ gstate.cmdmem[cmd];
PreExecuteOp(op, diff);
if (dumpThisFrame) {

View file

@ -156,6 +156,27 @@ bool QtHost::IsDebuggingEnabled()
#endif
}
bool QtHost::GPUDebuggingActive()
{
auto dialogDisplayList = mainWindow->GetDialogDisplaylist();
if (dialogDisplayList && dialogDisplayList->isVisible())
{
if (GpuStep())
SendGPUStart();
return true;
}
return false;
}
void QtHost::GPUNotifyCommand(u32 pc)
{
u32 op = Memory::ReadUnchecked_U32(pc);
u32 cmd = op >> 24;
if (GpuStep())
SendGPUWait(cmd, pc, &gstate);
}
void QtHost::SendCoreWait(bool isWaiting)
{
mainWindow->CoreEmitWait(isWaiting);

View file

@ -44,11 +44,14 @@ public:
void ShutdownSound();
bool IsDebuggingEnabled();
bool GPUDebuggingActive();
void BootDone();
void PrepareShutdown();
bool AttemptLoadSymbolMap();
void SetWindowTitle(const char *message);
void GPUNotifyCommand(u32 pc);
void SendCoreWait(bool);
bool GpuStep();
void SendGPUWait(u32 cmd, u32 addr, void* data);