demos: add a fence for presentation
authorChia-I Wu <olv@lunarg.com>
Fri, 7 Nov 2014 06:30:34 +0000 (14:30 +0800)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 21 Nov 2014 23:49:39 +0000 (16:49 -0700)
commitbb57f646f4ac300adbc0ffc2b6c5ab4a79fbcaa5
treedba6cb3f8a8f938a140fd6fe763ff8f4ad8875c9
parent087cfc24c89413967611af33e436137b9db191b8
demos: add a fence for presentation

After xglWsiX11QueuePresent(), the image is scheduled for copying.  We should
not render to it until the copying is done.  Otherwise, depending on how the
DDX works, flickering or GPU hangs may be expected.

Add and wait on the fence before submitting the command buffer.  This ensures
the DDX is done with the image.   Set async to true to run as fast as
possible.
demos/cube.c
demos/tri.c