Mesa Receives MESA_multithread_makecurrent
The Mesa code-base now has patches for supporting the new MESA_multithread_makecurrent GLX extension. This extension was originally proposed in 2009 at the Cairo and GStreamer Hackfest but more than a year later it's now only materializing within Mesa and first within Intel's driver.
This GLX extension is designed around the needs of some applications, such as GStreamer and Cairo, with their threading model so that a single GLX context can be shared between multiple threads. By sharing the same context, this can allow for performance increases and can be even simpler from an implementation perspective too for the application developer.
Here's an overview from the GLX specification:
The patch set where Intel's Eric Anholt is currently seeking feedback can be found in this Mesa mailing list series.
In terms of performance improvements thanks to this patch-set, Eric is reporting an approximate 35% boost in performance thanks to this yet-to-be-merged code.
This GLX extension is designed around the needs of some applications, such as GStreamer and Cairo, with their threading model so that a single GLX context can be shared between multiple threads. By sharing the same context, this can allow for performance increases and can be even simpler from an implementation perspective too for the application developer.
Here's an overview from the GLX specification:
The GLX context setup encourages multithreaded applications to create a context per thread which each operate on their own objects in parallel, and leaves synchronization for shared objects up to the application.
For some applications, maintaining per-thread contexts and ensuring that the glFlush happens in one thread before another thread starts working on that object is difficult. For them, using the same context across multiple threads and protecting its usage with a global lock is both higher performance and easier to implement. This extension gives those applications that option by relaxing the context binding requirements.
The patch set where Intel's Eric Anholt is currently seeking feedback can be found in this Mesa mailing list series.
In terms of performance improvements thanks to this patch-set, Eric is reporting an approximate 35% boost in performance thanks to this yet-to-be-merged code.
3 Comments