I have a program that calls glFinish after every glXSwapBuffers. It uses 100% CPU when it is running at the maximum frame rate possible (60hz, because I have vsync).
perf shows it spend majority of its time calling sched_yield, and that call seems to originate from glFinish.
So, is glFinish busy waiting? Is there an alternative that doesn’t?