Some more changes to the statistics. Commented out all currently unused stats, and implemented counting primitives in DL in a "hacky" way.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@158 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
gigaherz
2008-08-08 23:22:27 +00:00
parent 8731021466
commit b12621e3f0
2 changed files with 32 additions and 15 deletions

View File

@ -43,6 +43,14 @@ extern int FAKE_GetFifoSize();
CDataReader_Fifo g_fifoReader;
template <class T>
void Xchg(T& a, T&b)
{
T c = a;
a = b;
b = c;
}
void ExecuteDisplayList(u32 address, u32 size)
{
IDataReader* pOldReader = g_pDataReader;
@ -51,11 +59,18 @@ void ExecuteDisplayList(u32 address, u32 size)
CDataReader_Memory memoryReader(address);
g_pDataReader = &memoryReader;
// temporarily swap dl and non-dl(small "hack" for the stats)
Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims);
while((memoryReader.GetReadAddress() - address) < size)
{
Decode();
}
INCSTAT(stats.numDListsAlive);
INCSTAT(stats.numDListsCalled);
// un-swap
Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims);
// reset to the old reader
g_pDataReader = pOldReader;
}