[Vm-dev] linux thread priorities
andreas.raab at gmx.de
Thu Feb 4 05:56:52 UTC 2010
Igor Stasenko wrote:
> Wow.. 100ms? Sounds like you can't have more than 10 frames per
> second. Weird. Can it be because it waits for vsync?
No it's because it got stuff queued up that the GPU hasn't processed
yet. SwapBuffers() forces it to process the pending stuff. What we've
done to fix this is to issue a fence and a flush to let the GPU tell us
when it's done processing without blocking. This brings the time in
SwapBuffers() down but it requires that your GPU and drivers support the
fence instructions (not all do; in particular Intel doesn't). I have no
clue what the situation on Linux is but I expect the worst.
More information about the Vm-dev