diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp index 650d58aa7c..1e72f300ee 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp @@ -61,6 +61,9 @@ void ExecuteDisplayList(u32 address, u32 size) // temporarily swap dl and non-dl(small "hack" for the stats) Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims); + Xchg(stats.thisFrame.numXFLoadsInDL,stats.thisFrame.numXFLoads); + Xchg(stats.thisFrame.numCPLoadsInDL,stats.thisFrame.numCPLoads); + Xchg(stats.thisFrame.numBPLoadsInDL,stats.thisFrame.numBPLoads); while((memoryReader.GetReadAddress() - address) < size) { @@ -70,6 +73,9 @@ void ExecuteDisplayList(u32 address, u32 size) // un-swap Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims); + Xchg(stats.thisFrame.numXFLoadsInDL,stats.thisFrame.numXFLoads); + Xchg(stats.thisFrame.numCPLoadsInDL,stats.thisFrame.numCPLoads); + Xchg(stats.thisFrame.numBPLoadsInDL,stats.thisFrame.numBPLoads); // reset to the old reader g_pDataReader = pOldReader; @@ -200,6 +206,7 @@ void Decode(void) u32 SubCmd = g_pDataReader->Read8(); u32 Value = g_pDataReader->Read32(); VertexManager::LoadCPReg(SubCmd,Value); + INCSTAT(stats.thisFrame.numCPLoads); } break; @@ -213,6 +220,7 @@ void Decode(void) for (int i=0; iRead32(); VertexShaderMngr::LoadXFReg(dwTransferSize,dwAddress,pData); + INCSTAT(stats.thisFrame.numXFLoads); } break; @@ -249,6 +257,7 @@ void Decode(void) { u32 cmd = g_pDataReader->Read32(); LoadBPReg(cmd); + INCSTAT(stats.thisFrame.numBPLoads); } break; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index e333f6f6f5..3a430a42fc 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -679,13 +679,12 @@ void Renderer::Swap(const TRectangle& rc) p+=sprintf(p,"Num primitives: %i\n",stats.thisFrame.numPrims); p+=sprintf(p,"Num primitives (DL): %i\n",stats.thisFrame.numDLPrims); p+=sprintf(p,"Num bad commands: %i%s\n",stats.thisFrame.numBadCommands,stats.thisFrame.numBadCommands?"!!!":""); - // not used. - //p+=sprintf(p,"Num XF loads: %i\n",stats.thisFrame.numXFLoads); - //p+=sprintf(p,"Num XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); - //p+=sprintf(p,"Num CP loads: %i\n",stats.thisFrame.numCPLoads); - //p+=sprintf(p,"Num CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); - //p+=sprintf(p,"Num BP loads: %i\n",stats.thisFrame.numBPLoads); - //p+=sprintf(p,"Num BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); + p+=sprintf(p,"Num XF loads: %i\n",stats.thisFrame.numXFLoads); + p+=sprintf(p,"Num XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); + p+=sprintf(p,"Num CP loads: %i\n",stats.thisFrame.numCPLoads); + p+=sprintf(p,"Num CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); + p+=sprintf(p,"Num BP loads: %i\n",stats.thisFrame.numBPLoads); + p+=sprintf(p,"Num BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); Renderer::DrawText(st, 20, 20, 0xFF00FFFF); }