Disjoint Timer Query Added To Mesa For Reporting Accurate OpenGL Timing Data
Written by Michael Larabel in Mesa on 15 December 2017 at 05:20 AM EST. Add A Comment
The latest OpenGL extension added to Mesa by Intel developers is the rather new EXT_disjoint_timer_query.

The function of EXT_disjoint_timer_query is to report accurate timing information about how long it takes to complete a set of OpenGL commands but without stalling the rendering pipeline or other interference. The OpenGL Registry does a good job explaining the impact of this extension:
Applications can benefit from accurate timing information in a number of different ways. During application development, timing information can help identify application or driver bottlenecks. At run time, applications can use timing information to dynamically adjust the amount of detail in a scene to achieve constant frame rates. OpenGL implementations have historically provided little to no useful timing information. Applications can get some idea of timing by reading timers on the CPU, but these timers are not synchronized with the graphics rendering pipeline. Reading a CPU timer does not guarantee the completion of a potentially large amount of graphics work accumulated before the timer is read, and will thus produce wildly inaccurate results. glFinish() can be used to determine when previous rendering commands have been completed, but will idle the graphics pipeline and adversely affect application performance.

This extension provides a query mechanism that can be used to determine the amount of time it takes to fully complete a set of GL commands, and without stalling the rendering pipeline. It uses the query object mechanisms first introduced in the occlusion query extension, which allow time intervals to be polled asynchronously by the application.

Tapani Pälli plumbed in the core Mesa changes needed for this 2016 OpenGL extension as well as wiring it into the i965 OpenGL driver. From here it's only a matter of time before RadeonSI and the other Mesa/Gallium3D drivers also pick up support for this extension, which at the moment isn't mandated by any released OpenGL version.

This new extension will be present in next year's Mesa 18.0 release.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week