void GPUCommon::SlowRunLoop(DisplayList &list) { const bool dumpThisFrame = dumpThisFrame_; while (downcount > 0) { u32 op = Memory::ReadUnchecked_U32(list.pc); u32 cmd = op >> 24; #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) { char temp[256]; u32 prev = Memory::ReadUnchecked_U32(list.pc - 4); GeDisassembleOp(list.pc, op, prev, temp); NOTICE_LOG(G3D, "%s", temp); } gstate.cmdmem[cmd] = op; ExecuteOp(op, diff); list.pc += 4; --downcount; } }
bool GPUCommon::InterpretList(DisplayList &list) { time_update(); double start = time_now_d(); currentList = &list; // Reset stackptr for safety stackptr = 0; u32 op = 0; prev = 0; finished = false; if (!Memory::IsValidAddress(list.pc)) { ERROR_LOG(G3D, "DL PC = %08x WTF!!!!", list.pc); return true; } while (!finished) { list.status = PSP_GE_LIST_DRAWING; if (list.pc == list.stall) { list.status = PSP_GE_LIST_STALL_REACHED; return false; } op = Memory::ReadUnchecked_U32(list.pc); //read from memory u32 cmd = op >> 24; u32 diff = op ^ gstate.cmdmem[cmd]; PreExecuteOp(op, diff); // TODO: Add a compiler flag to remove stuff like this at very-final build time. if (dumpThisFrame_) { char temp[256]; GeDisassembleOp(list.pc, op, prev, temp); NOTICE_LOG(G3D, "%s", temp); } gstate.cmdmem[cmd] = op; // crashes if I try to put the whole op there?? ExecuteOp(op, diff); list.pc += 4; prev = op; } time_update(); gpuStats.msProcessingDisplayLists += time_now_d() - start; return true; }
bool GPUCommon::InterpretList(DisplayList &list) { time_update(); double start = time_now_d(); currentList = &list; u32 op = 0; prev = 0; finished = false; // I don't know if this is the correct place to zero this, but something // need to do it. See Sol Trigger title screen. gstate_c.offsetAddr = 0; if (!Memory::IsValidAddress(list.pc)) { ERROR_LOG(G3D, "DL PC = %08x WTF!!!!", list.pc); return true; } #if defined(USING_QT_UI) if(host->GpuStep()) { host->SendGPUStart(); } #endif while (!finished) { list.status = PSP_GE_LIST_DRAWING; if (list.pc == list.stall) { list.status = PSP_GE_LIST_STALL_REACHED; return false; } op = Memory::ReadUnchecked_U32(list.pc); //read from memory u32 cmd = op >> 24; #if defined(USING_QT_UI) if(host->GpuStep()) { host->SendGPUWait(cmd, list.pc, &gstate); } #endif u32 diff = op ^ gstate.cmdmem[cmd]; PreExecuteOp(op, diff); // TODO: Add a compiler flag to remove stuff like this at very-final build time. if (dumpThisFrame_) { char temp[256]; GeDisassembleOp(list.pc, op, prev, temp); NOTICE_LOG(HLE, "%s", temp); } gstate.cmdmem[cmd] = op; // crashes if I try to put the whole op there?? ExecuteOp(op, diff); list.pc += 4; prev = op; } time_update(); gpuStats.msProcessingDisplayLists += time_now_d() - start; return true; }
bool GPUCommon::InterpretList(DisplayList &list) { // TODO: This has to be right... but it freezes right now? //if (list.state == PSP_GE_DL_STATE_PAUSED) // return false; time_update(); double start = time_now_d(); currentList = &list; u32 op = 0; prev = 0; gpuState = GPUSTATE_RUNNING; // I don't know if this is the correct place to zero this, but something // need to do it. See Sol Trigger title screen. gstate_c.offsetAddr = 0; if (!Memory::IsValidAddress(list.pc)) { ERROR_LOG_REPORT(G3D, "DL PC = %08x WTF!!!!", list.pc); return true; } #if defined(USING_QT_UI) if(host->GpuStep()) { host->SendGPUStart(); } #endif cycleLastPC = list.pc; list.state = PSP_GE_DL_STATE_RUNNING; list.interrupted = false; while (gpuState == GPUSTATE_RUNNING) { if (list.pc == list.stall) { gpuState = GPUSTATE_STALL; break; } op = Memory::ReadUnchecked_U32(list.pc); //read from memory u32 cmd = op >> 24; #if defined(USING_QT_UI) if(host->GpuStep()) { host->SendGPUWait(cmd, list.pc, &gstate); } #endif u32 diff = op ^ gstate.cmdmem[cmd]; PreExecuteOp(op, diff); // TODO: Add a compiler flag to remove stuff like this at very-final build time. if (dumpThisFrame_) { char temp[256]; GeDisassembleOp(list.pc, op, prev, temp); NOTICE_LOG(HLE, "%s", temp); } gstate.cmdmem[cmd] = op; ExecuteOp(op, diff); list.pc += 4; prev = op; } UpdateCycles(list.pc); time_update(); gpuStats.msProcessingDisplayLists += time_now_d() - start; return gpuState == GPUSTATE_DONE || gpuState == GPUSTATE_ERROR; }