Skip to content

Implement GLX_EXT_swap_control and GLX_EXT_swap_control_tear

Adam Jackson requested to merge ajax/mesa:glx-ext-swap-control into master

GLX_EXT_swap_control is a slight generalization of the existing MESA and SGI swap control extensions, which threads the swap interval queries through glXQueryDrawable (slightly nicer than MESA) and allows you to set the swap interval for a non-current drawable. This is pretty much trivial, and is enabled for DRI2 and DRI3. DRI1 would be doable but frankly I feel ashamed even to mention it.

GLX_EXT_swap_control_tear is layered atop that, allowing negative values for the swap interval to mean "if we missed the frame the interval would have used, just go ahead and swap without waiting". This may increase tearing (hence the name) but reduces visual stutter when rendering happens to briefly exceed the frame time budget. This is enabled for DRI3 only because Present already has a way to ask for this; DRI2 support would require server support that I'm not especially interested in bothering with.

Future work here will probably involve adding a driconf option to enable the feature for apps that don't support the extension, and adding an equivalent extension to EGL.

Merge request reports

Loading