gl render weirdness, fluctuating fps with 2 contexts & 2 screens

    Apr 02 2012 | 10:12 am
    This thing has been driving me nuts for a while and I decided to get to the bottom of it this morning. Problem is I'm seeing periodic fps fluctuations with my triplehead2go projection setup.
    I cut it down to the patch below. The red context is what displays via the triplehead, the green is monitoring on a regular lcd display. I estimate this is not triplehead specific and the window pos and size parameters can be changed for a regular external monitor.
    I have both the monitor and the triplehead set at 60hz refresh rate. I'd expect that by turning sync on on both windows I'd get clean 60 fps. But I don't, see graph in the screenshot.
    I've played with sync, floating and other parameters. Sometimes it disappears and stays steady at 60fps but never consistent and repeatable.
    What I did find out is that if I set the triplehead to 75hz refresh and turn off sync the oscillation goes away. The monitor only does 50 or 60hz so I leave it at 60.
    Is this expected behavior?
    I'm on a hackintosh i7-2600k CPU, XFX Radeon HD6870 2GB GPU, OSX Lion 10.7.2, Max 6.0.4. Using HDMI for the monitor, DVI for the triplehead.

    • Apr 03 2012 | 3:36 pm
    • Apr 03 2012 | 8:59 pm
      With multiple windows set @sync 1, you're going to see this kind of behavior. There's really no way around it as far as I know. Last time I looked into it, there didn't seem to be a decent solution to the problem. The cyclic behavior is periodic drift of the hardware sync getting out of sync with the events driving the OpenGL swapping.
      If only one windows is set to @sync 1, does the problem go away?
    • Apr 04 2012 | 4:45 pm
      when both screens are set at 60Hz: no. when triplehead is set higher: yes. regardless of which window is set to sync the framerate locks to the 60Hz lcd, not the triplehead.
      tanx for clarifying!