Display device does not dictate the refresh rate/fps, what do Panda and GPU do in this case?

I know, typically monitors specify to the GPU their max refresh rates. Well, in my extraordinary situation I have a HDMI display device that does not do that. All I know is it supports an arbitrary refresh rate up to 103.4Hz.
In this case, is it sufficient to tell Panda to lock its framerate to 103, or does the GPU need to know this as well?

When you set sync-video 1 in Config.prc, Panda will ask the driver to wait when swapping the buffers (presenting the rendered result to the monitor) until the vertical blanking interval, which is the interval in which the monitor is not refreshing the screen. To prevent tearing (seeing half of one frame and half of the other), we need to make sure we swap the buffers during this interval.

If the driver doesn’t support doing this, locking Panda’s frame rate to the refresh rate may not be sufficient: it offers no guarantee that the swap happens during the blanking interval, just that if there’s tearing, the tear it will be (roughly) at the same height on the screen every frame.

If there’s no sync information at all, or the driver is simply uncooperative, this is tricky. The only thing that comes to mind is a “calibration” routine wherein a tear is generated (by cycling rapidly back-and-forth between two alternate frames) and the user is asked to adjust the timing so that the tear disappears from the screen, but I would worry about drift over time.

1 Like