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

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E59F11F26@sisaex01sj>
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.

Thanks

Henry

________________________________________
From: Chris Wilson [[email protected]]
Sent: Thursday, August 29, 2013 1:50 PM
To: Henry (Yu) Song - SISA
Cc: [email protected]
Subject: Re: [cairo] [patch] boilerplate/gl: use glFlush instead of glFinish

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.