progs/perf: break up long runs of fullscreen quads

Not all drivers cope gracefully with command-buffers with zillions of
fullscreen quads.
This commit is contained in:
Keith Whitwell
2009-09-22 11:01:53 +01:00
parent a7b2659f02
commit ac6a5107e2
+18 -1
View File
@@ -169,14 +169,31 @@ static void
DrawQuad(unsigned count)
{
unsigned i;
glClear(GL_COLOR_BUFFER_BIT);
for (i = 0; i < count; i++) {
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
/* Avoid sending command buffers with huge numbers of fullscreen
* quads. Graphics schedulers don't always cope well with
* this...
*/
if (i % 128 == 0) {
PerfSwapBuffers();
glClear(GL_COLOR_BUFFER_BIT);
}
}
glFinish();
if (0)
if (1)
PerfSwapBuffers();
}
void
PerfNextRound(void)
{
}
/** Called from test harness/main */
void