Jump to content
  • Advertisement
Sign in to follow this  
RPTD

glXSwapBuffers requires 5.5ms ?!

This topic is 3670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Having done quite some optimizations on the rendering I noticed a whoopie 5.5ms ( roughly 50% of the overall rendering cost ) to be spend in one single line of code: glXSwapBuffers. This bothers me a lot. How is it possible this swap call takes nearly as long as the rendering itself? I've got better things to do than wasting 5.5ms idling waiting for this call to finish. Is there a way I can do this call asynch so I can continue doing all the game logic calculations for the next frame ( which takes longer than 5.5ms so I would start render once this call is done for )?

Share this post


Link to post
Share on other sites
Advertisement
Swapping buffers waits for all opengl calls to finish, same as glFinish(). You may also want to check if VSync is enabled as that would block to next sync.

Share this post


Link to post
Share on other sites
I checked already the settings. In the nVidia panel I tried with and without VSync but nothing changed. Can it be that the Linux version of the nVidia driver does block no matter if this enabled or not? If it's only a driver issue I can say "forget about it" and leave it to the player to have proper drivers. Just want to figure out if this is a problem on my end.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!