Mesa EGL X11/Wayland Code Receives Optimization For Multi-GPU/PRIME Systems

Written by Michael Larabel in Mesa on 30 January 2023 at 09:30 AM EST. 9 Comments
MESA
Code merged last week to Mesa 23.1 by AMD ensures that a linear copy buffer is made on the display/scanout GPU when dealing with EGL contexts under Wayland or X11. This follows an optimization made last year to Mesa's GLX code within X.Org environments for enhancing the PRIME/multi-GPU support.

Last year saw a Mesa GLX change to ensure that a linear buffer is allocated on the display/scanout GPU rather than of the render GPU in PRIME/multi-GPU configurations. This is for optimizing peer-to-peer DMA usage between multiple GPUs. In non-optimal configurations where the linear buffer for scanout is allocated by the render GPU, it can't be moved to the video memory of the scanout GPU without an extra copy. With the prior change to GLX and now in place for EGL, it's ensured that the linear buffer is allocated on the scanout GPU and then accessed by the render GPU to avoid the overhead/cost of the extra kernel copy.


This merge request by AMD engineer Yogesh Mohan Marmithu had been opened last year for this change to ensure the allocation happens on the scanout GPU. Finally last week it crossed the finish line with entering Mesa 23.1. The change affects Mesa's common platform/EGL code and thus not tied to one particular (AMD) GPU driver in this case.
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week