Add some GPU related reporting.

This commit is contained in:
Unknown W. Brackets 2013-04-05 01:13:54 -07:00
parent ef1086413c
commit 028cdbea43

View File

@ -7,6 +7,7 @@
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/MemMap.h" #include "Core/MemMap.h"
#include "Core/Host.h" #include "Core/Host.h"
#include "Core/Reporting.h"
#include "Core/HLE/sceKernelInterrupt.h" #include "Core/HLE/sceKernelInterrupt.h"
#include "Core/HLE/sceKernelMemory.h" #include "Core/HLE/sceKernelMemory.h"
#include "Core/HLE/sceKernelThread.h" #include "Core/HLE/sceKernelThread.h"
@ -147,7 +148,7 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, bool head)
} }
if (id < 0) if (id < 0)
{ {
ERROR_LOG(G3D, "No DL ID available to enqueue"); ERROR_LOG_REPORT(G3D, "No DL ID available to enqueue");
for(auto it = dlQueue.begin(); it != dlQueue.end(); ++it) { for(auto it = dlQueue.begin(); it != dlQueue.end(); ++it) {
DisplayList &dl = dls[*it]; DisplayList &dl = dls[*it];
DEBUG_LOG(G3D, "DisplayList %d status %d pc %08x stall %08x", *it, dl.state, dl.pc, dl.stall); DEBUG_LOG(G3D, "DisplayList %d status %d pc %08x stall %08x", *it, dl.state, dl.pc, dl.stall);
@ -299,7 +300,7 @@ u32 GPUCommon::Break(int mode)
{ {
if (currentList->signal == PSP_GE_SIGNAL_HANDLER_PAUSE) if (currentList->signal == PSP_GE_SIGNAL_HANDLER_PAUSE)
{ {
ERROR_LOG(G3D, "sceGeBreak: can't break signal-pausing list"); ERROR_LOG_REPORT(G3D, "sceGeBreak: can't break signal-pausing list");
} }
else else
return 0x80000020; return 0x80000020;
@ -342,14 +343,14 @@ bool GPUCommon::InterpretList(DisplayList &list)
gstate_c.offsetAddr = 0; gstate_c.offsetAddr = 0;
if (!Memory::IsValidAddress(list.pc)) { if (!Memory::IsValidAddress(list.pc)) {
ERROR_LOG(G3D, "DL PC = %08x WTF!!!!", list.pc); ERROR_LOG_REPORT(G3D, "DL PC = %08x WTF!!!!", list.pc);
return true; return true;
} }
#if defined(USING_QT_UI) #if defined(USING_QT_UI)
if(host->GpuStep()) if(host->GpuStep())
{ {
host->SendGPUStart(); host->SendGPUStart();
} }
#endif #endif
cycleLastPC = list.pc; cycleLastPC = list.pc;
@ -457,7 +458,7 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
UpdateCycles(currentList->pc, target - 4); UpdateCycles(currentList->pc, target - 4);
currentList->pc = target - 4; // pc will be increased after we return, counteract that currentList->pc = target - 4; // pc will be increased after we return, counteract that
} else { } else {
ERROR_LOG(G3D, "JUMP to illegal address %08x - ignoring! data=%06x", target, data); ERROR_LOG_REPORT(G3D, "JUMP to illegal address %08x - ignoring! data=%06x", target, data);
} }
} }
break; break;
@ -468,9 +469,9 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
u32 retval = currentList->pc + 4; u32 retval = currentList->pc + 4;
u32 target = gstate_c.getRelativeAddress(data); u32 target = gstate_c.getRelativeAddress(data);
if (currentList->stackptr == ARRAY_SIZE(currentList->stack)) { if (currentList->stackptr == ARRAY_SIZE(currentList->stack)) {
ERROR_LOG(G3D, "CALL: Stack full!"); ERROR_LOG_REPORT(G3D, "CALL: Stack full!");
} else if (!Memory::IsValidAddress(target)) { } else if (!Memory::IsValidAddress(target)) {
ERROR_LOG(G3D, "CALL to illegal address %08x - ignoring! data=%06x", target, data); ERROR_LOG_REPORT(G3D, "CALL to illegal address %08x - ignoring! data=%06x", target, data);
} else { } else {
currentList->stack[currentList->stackptr++] = retval; currentList->stack[currentList->stackptr++] = retval;
UpdateCycles(currentList->pc, target - 4); UpdateCycles(currentList->pc, target - 4);
@ -482,14 +483,14 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
case GE_CMD_RET: case GE_CMD_RET:
{ {
if (currentList->stackptr == 0) { if (currentList->stackptr == 0) {
ERROR_LOG(G3D, "RET: Stack empty!"); ERROR_LOG_REPORT(G3D, "RET: Stack empty!");
} else { } else {
u32 target = (currentList->pc & 0xF0000000) | (currentList->stack[--currentList->stackptr] & 0x0FFFFFFF); u32 target = (currentList->pc & 0xF0000000) | (currentList->stack[--currentList->stackptr] & 0x0FFFFFFF);
//target = (target + gstate_c.originAddr) & 0xFFFFFFF; //target = (target + gstate_c.originAddr) & 0xFFFFFFF;
UpdateCycles(currentList->pc, target - 4); UpdateCycles(currentList->pc, target - 4);
currentList->pc = target - 4; currentList->pc = target - 4;
if (!Memory::IsValidAddress(currentList->pc)) { if (!Memory::IsValidAddress(currentList->pc)) {
ERROR_LOG(G3D, "Invalid DL PC %08x on return", currentList->pc); ERROR_LOG_REPORT(G3D, "Invalid DL PC %08x on return", currentList->pc);
gpuState = GPUSTATE_ERROR; gpuState = GPUSTATE_ERROR;
} }
} }
@ -530,16 +531,16 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
ERROR_LOG(G3D, "Signal with Sync UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata); ERROR_LOG(G3D, "Signal with Sync UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata);
break; break;
case PSP_GE_SIGNAL_JUMP: case PSP_GE_SIGNAL_JUMP:
ERROR_LOG(G3D, "Signal with Jump UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata); ERROR_LOG_REPORT(G3D, "Signal with Jump UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata);
break; break;
case PSP_GE_SIGNAL_CALL: case PSP_GE_SIGNAL_CALL:
ERROR_LOG(G3D, "Signal with Call UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata); ERROR_LOG_REPORT(G3D, "Signal with Call UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata);
break; break;
case PSP_GE_SIGNAL_RET: case PSP_GE_SIGNAL_RET:
ERROR_LOG(G3D, "Signal with Return UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata); ERROR_LOG_REPORT(G3D, "Signal with Return UNIMPLEMENTED! signal/end: %04x %04x", signal, enddata);
break; break;
default: default:
ERROR_LOG(G3D, "UNKNOWN Signal UNIMPLEMENTED %i ! signal/end: %04x %04x", behaviour, signal, enddata); ERROR_LOG_REPORT(G3D, "UNKNOWN Signal UNIMPLEMENTED %i ! signal/end: %04x %04x", behaviour, signal, enddata);
break; break;
} }
if (interruptsEnabled_) { if (interruptsEnabled_) {