Perftimer: Make GPU query count configurable

This commit is contained in:
Jonas Kulla 2013-11-30 11:47:03 +01:00
parent 0038d27c11
commit 0b195cbffc
1 changed files with 5 additions and 2 deletions

View File

@ -86,9 +86,11 @@ struct TimerQuery
bool TimerQuery::queryActive = false; bool TimerQuery::queryActive = false;
#define GPU_QUERIES 2
struct GPUTimerGLQuery : public PerfTimer struct GPUTimerGLQuery : public PerfTimer
{ {
TimerQuery queries[2]; TimerQuery queries[GPU_QUERIES];
const int iter; const int iter;
uint8_t ind; uint8_t ind;
@ -138,7 +140,8 @@ struct GPUTimerGLQuery : public PerfTimer
void swapInd() void swapInd()
{ {
ind = ind ? 0 : 1; if (++ind > GPU_QUERIES)
ind = 0;
} }
}; };