View Single Post
Old 04-15-09, 04:11 PM   #6
bearoso
Registered User
 
Join Date: Sep 2003
Posts: 57
Default Re: Bug: glFinish and glXWaitGL busy-wait for vsync buffer swap

Quote:
Originally Posted by etherfish View Post
You know, I spoke too fast, I just enabled that option myself and ran your test to find the same behavior. I must admit my na´vete, however; I added a call to glXWaitVideoSyncSGI(1, 0, .. ) between glXSwapBuffers and glWaitGL() and glbusy no longer consumed 100% CPU. Placing glXWaitVideoSyncSGI() before the glXSwapBuffers() or after the glWaitGL() glbusy only consumed 50% CPU. To be perfectly honest, I don't know where the glXWaitVideoSyncSGI() call belongs.

Also, I'm too inexperienced to divine if this information is actually helpful to you or not. I apologise.
glXWaitVideoSyncSGI is an very archaically-designed extension for its purpose and shouldn't be needed if glFinish/WaitGL operated correctly. Not to mention that placing it after the buffer swap would have the effect of forcing a horribly mistimed application-side vsync even when the swap doesn't want to use it. The solution for this problem needs to happen in the driver.
bearoso is offline   Reply With Quote