mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user