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

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Thu, Aug 29, 2013 at 08:41:57PM +0000, Henry (Yu) Song - SISA wrote:
> From 73c77248ed95b3f9f6a777d86c368e464f3b49bb Mon Sep 17 00:00:00 2001
> From: Henry Song <[email protected]>
> Date: Thu, 29 Aug 2013 13:35:11 -0700
> Subject: [PATCH] boilerplate/gl: use glFlush instead of glFinish for
>  synchronization
> 
> Use glFlush () is a proper way to indicate a surface/frame finish
> instead of a glFinish. Applications very rarely use glFinish ().
> For offscreen, a glFlush () should be used to indicate finish drawings
> onto a surface.  For onscreen, an eglSwapBuffers/glXSwapBuffers should
> be used (internal, it calls glFlush).
> 
> Using glFlush () computes performance more accurately folllowing app
> usage model.

glFinish is required for an accurate timing here of the complete
rendering (which is many, many, many frames long). The readback overhead
should be insignificant, just the cost of serialisation which is exactly
the amount of time it takes to finish the rendering.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.