AMD's Marek Has A Patch Helping To Reduce Gallium3D Input Lag

Written by Michael Larabel in Mesa on 27 April 2019 at 07:23 AM EDT. 59 Comments
In addition to the work this week on exposing EXT_gpu_shader4 / EXT_texture_buffer_object, well known AMD open-source developer Marek Olšák has also been working a patch to help lower the input lag with Mesa.

Marek posted a new patch on Friday that aims to decrease input lag via syncing sooner in the swap buffers code. The patch decreases the number of active frames in flight by one and flushes before throttling in the "SwapBuffers" code.

Marek noted:
The improvement is apparent with Unigine Heaven.

draw frame 2
wait frame 0
flush frame 2
present frame 2

The input lag is 2 frames.

draw frame 2
flush frame 2
wait frame 1
present frame 2

The input lag is 1 frame. Flushing is done before waiting, because otherwise the device would be idle after waiting.

The patch affects the common Gallium3D code as opposed to being RadeonSI-specific code. As of writing it hasn't been merged to Mesa Git but we'll see if it makes it in before next week's Mesa 19.1.0 code branching / feature freeze.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week