From e8c14fe0372f2ab4e2971e305aab0d7b32dae008 Mon Sep 17 00:00:00 2001 From: gigaherz Date: Fri, 8 Aug 2008 23:39:48 +0000 Subject: [PATCH] Added a new statistic value: dlist calls for current frame. Sorry for the commit spam, but this way each commit is a different thing. also the ideas for the next thing came to me after commiting, so I didn't know I'd commit again. :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@160 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Globals.h | 2 ++ Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp | 1 + Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h index eaafee05ee..dda0104203 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h @@ -227,6 +227,8 @@ struct Statistics int numPrims; int numShaderChanges; int numBadCommands; //hope this always is zero ;) + + int numDListsCalled; }; ThisFrame thisFrame; void ResetFrame(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp index 1e72f300ee..29d69fc0ed 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp @@ -70,6 +70,7 @@ void ExecuteDisplayList(u32 address, u32 size) Decode(); } INCSTAT(stats.numDListsCalled); + INCSTAT(stats.thisFrame.numDListsCalled); // un-swap Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 3a430a42fc..75fb92a618 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -671,7 +671,8 @@ void Renderer::Swap(const TRectangle& rc) p+=sprintf(p,"Num pshaders alive: %i\n",stats.numPixelShadersAlive); p+=sprintf(p,"Num vshaders created: %i\n",stats.numVertexShadersCreated); p+=sprintf(p,"Num vshaders alive: %i\n",stats.numVertexShadersAlive); - p+=sprintf(p,"Num dlists called: %i\n",stats.numDListsCalled); + p+=sprintf(p,"Num dlists called: %i\n",stats.numDListsCalled); + p+=sprintf(p,"Num dlists called (frame): %i\n",stats.thisFrame.numDListsCalled); // not used. //p+=sprintf(p,"Num dlists created: %i\n",stats.numDListsCreated); //p+=sprintf(p,"Num dlists alive: %i\n",stats.numDListsAlive);