Perftimer: Make GPU query count configurable
This commit is contained in:
		
							parent
							
								
									0038d27c11
								
							
						
					
					
						commit
						0b195cbffc
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -86,9 +86,11 @@ struct TimerQuery
 | 
			
		|||
 | 
			
		||||
bool TimerQuery::queryActive = false;
 | 
			
		||||
 | 
			
		||||
#define GPU_QUERIES 2
 | 
			
		||||
 | 
			
		||||
struct GPUTimerGLQuery : public PerfTimer
 | 
			
		||||
{
 | 
			
		||||
	TimerQuery queries[2];
 | 
			
		||||
	TimerQuery queries[GPU_QUERIES];
 | 
			
		||||
	const int iter;
 | 
			
		||||
 | 
			
		||||
	uint8_t ind;
 | 
			
		||||
| 
						 | 
				
			
			@ -138,7 +140,8 @@ struct GPUTimerGLQuery : public PerfTimer
 | 
			
		|||
 | 
			
		||||
	void swapInd()
 | 
			
		||||
	{
 | 
			
		||||
		ind = ind ? 0 : 1;
 | 
			
		||||
		if (++ind > GPU_QUERIES)
 | 
			
		||||
			ind = 0;
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue