xbmc/xbmc — pull request #620 by FernetMenta (2012-01-11 20:15:26+00:00)
Title: fix VideoReferenceClock on ATI

This patch fixes two issues I have been observing on ATI.

1)
glXWaitVideoSyncSGI works most unreliable on ATi (fglrx). It misses almost every second vblank. I have tried with two trivial GL applications. As soon as I have started the second app, glXWaitVideoSyncSGI and glXSwapBuffers started to miss vblanks.

2)
Opening a second Window with an GL context causes screen corruption. For a few cycles some old pictures or garbage is displayed after the video ref clock was started.

The polling method puts no noticeable load on the system and seems to be very accurate. I am wondering if we should drop glXWaitVideoSyncSGI in general.