[cairo] [patch] boilerplate/gl: use glFlush instead of glFinish
Henry (Yu) Song - SISA
henry.song at samsung.com
Thu Aug 29 17:01:18 PDT 2013
I found glFlnish () takes way too long to complete - sometime up to 10x of actual drawing (e.g., cairo_paint).
It seems to me that without periodic pushing gl commands to pipeline loses the benefit of GPU/CPU parallel execution, and the end result for test performance is not that useful - both macro and micro tests.
From: Chris Wilson [chris at chris-wilson.co.uk]
Sent: Thursday, August 29, 2013 3:41 PM
To: Henry (Yu) Song - SISA
Cc: cairo at cairographics.org
Subject: Re: [cairo] [patch] boilerplate/gl: use glFlush instead of glFinish
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 Wilson, Intel Open Source Technology Centre
More information about the cairo