summaryrefslogtreecommitdiff
path: root/progs/perf
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-09-22 11:01:53 +0100
committerKeith Whitwell <keithw@vmware.com>2009-09-22 11:21:10 +0100
commitac6a5107e2c005a7f57249d1836c43d0e1f8f496 (patch)
tree77436c309ce57c54e57689a46a3aef78a479a869 /progs/perf
parenta7b2659f02c503bd2110b9fd9799efc113807ad9 (diff)
progs/perf: break up long runs of fullscreen quads
Not all drivers cope gracefully with command-buffers with zillions of fullscreen quads.
Diffstat (limited to 'progs/perf')
-rw-r--r--progs/perf/fill.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/progs/perf/fill.c b/progs/perf/fill.c
index fb9fa2453f..279f2b5f18 100644
--- a/progs/perf/fill.c
+++ b/progs/perf/fill.c
@@ -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