[cairo] [patch] boilerplate/gl: use glFlush instead of glFinish

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 29 15:41:27 PDT 2013


On Thu, Aug 29, 2013 at 08:57:30PM +0000, Henry (Yu) Song - SISA wrote:
> Hi, Chris
> 
> There is no indication there are many frames (e.g, in cairo micro per test).  I can either interpret the test as one drawing per frame, or many drawings per frame.  In the former case, then after each loop, a glFlush () should be called, or the later case, a glFlush () should be called after all loops.
> 
> Essentially, I found ,at least micro tests, do not model real performance accurately.

The microbenchmarks are not intended to model application performance.
They are meant to answer the question of "exactly how long does it take
to do <n> operations?" That has to include the rendering pipeline for us
to understand and model it accurately, hence glFinish.

The other benchmarking example are the traces which span multiple
rendering events and queue up many seconds of work by the time the trace
finishes - which is not as real as one would like, but again the
glFinish is required to make sure the rendering is complete before
finishing the timer.

The demos on the other handle, simply use the driver synchronisation
through swapbuffers and measure fps. These are real applications, and do
not require or use glFinish.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list