Mesa 21.1.0 Is Released

From LinuxReviews
Jump to navigationJump to search
Glxgears.png

Mesa is a sniff army knife of graphics drivers and libraries that are used to provide graphics functionality on all the major GNU/Linux distributions. Mesa 21.1.0 brings Vulkan Variable Rate Shading support for AMD RX 6000 series GPUs, performance increasing graphics optimizations for the OpenGL and Vulkan drivers for both Intel and AMD GPUs, OpenGL 4.6 support in the Zink OpenGL-to-Vulkan translation layer, shader caching for the Lima driver for ARM Mali GPUs and a lot more.


Snubbelrisk.jpg
Warning: THIS IS A DRAFT. DO NOT ADD CATEGORIES, DO NOT PUT ON FRONT PAGE, DO NOT SHARE LINKS TO IT. IT'S JUST A DRAFT. DON'T EXPECT IT TO BE ACCURATE, FINISHED OR USEFUL!


The GNU/Linux Flatpak version of the "Aurora by Excess" PC scene demo from 2018. One of the core Mesa developers is secretly a key member of the Norwegian PC scene demo group "Excess". The demo uses the Vulkan graphics API, through drivers like the Mesa RADV and ANV drivers for AMD and Intel GPUs, to make the graphics appear.

It is almost certain that you are using the Mesa graphics library to render everything graphical if you are using a GNU/Linux distribution with everything other than a Nvidia graphics card. It provides the Vulkan and OpenGL drivers for Intel and AMD graphics cards on x86-64 hardware and a wide variety of other drivers for non-x86 hardware. The latest release is a big one that is packed with interesting features.

The Contributors[edit]

135 different people from Valve, Google, AMD, Intel, Redhat, Collabora and other corporations contributed to this release. The joint efforts of Mike Blumenkrantz, Samuel Pitoiset, Rhys Perry, Connor Abbott and Daniel Schürmann made the Valve corporation the by-far biggest contributor to Mesa 21.1.0. The top 20 contributors were:

The above list is just the top 20 contributors, they do not make the 115 other people made code commits less important.

New Vulkan Features[edit]

The perhaps most interesting feature in this Mesa release is Variable Rate Shading support for those with the very latest AMD graphics technology. This new Mesa feature depends on hardware support that is only found in the very latest RX 6000 series GPUs from AMD.

Variable Rate Shading is a magic trick that decreases GPU load, thus increasing the frame rate, by doing shader operations in pixels blocks of 2x2, 1x2 or 2x1 instead of doing them one pixel at a time. This magic trick isn't as magic as it may sound, there is a noticeable visual impact if you do this across the board. The Mesa developers have therefore come up with some trickery that decides when variable rate shading is enabled if the feature, which is optional, is enabled with RADV_FORCE_VRS=value (RADV_FORCE_VRS=2x2, RADV_FORCE_VRS=1x2, etc). The goal of their trickery is to boost performance with variable rate shading when it is possible to do so without any very apparent loss of quality while temporarily (or in some games, permanently) disabling the feature when the RADV driver thinks the visual quality is reduced to a point where it would be very apparent. The end-result is that some games get a 30% performance boost all the the time, some get a performance boost some of the time and some games won't see much of a benefit at all. Variable rate shading is not enabled by default and it is still considered to be a somewhat experimental features. You can enable it and try it with the RADV_FORCE_VRS=value is you have a shiny new AMD RX 6000 series GPU. The hardware support this feature requires is simply not there in older AMD graphics chips, so there will be no such support "back-ported" to older AMD graphics cards.

Both the RADV and ANV Vulkan drivers for AMD and Intel graphics chips have gained support for the VK_KHR_workgroup_memory_explicit_layout and VK_KHR_zero_initialize_workgroup_memory Vulkan extensions.

Vulkan Performance[edit]

VTV3D Radeon HD-7850 VChamp-2GB-on-a-table.jpg
A VTX3D Radeon HD 7850 Vchamp 2GB GDDR5 on a MSI AM3 motherboard.

The AMD RADV driver got 320 code commits since the Mesa 21.0 release in March. Bas Nieuwenhuizen, Daniel Schürmann, Dave Airlie, David McFarland, Hans-Kristian Arntzen, James Park, Jason Ekstrand , Mike Blumenkrantz, Rhys Perry, Samuel Pitoiset, Timur Kristóf , Tony Wasserka and Marek Olšák were among the contributors. The result of those efforts is that the AMD RADV now performs about 2% better, and the RADV driver now lists conformanceVersion = 1.2.3.0 and apiVersion 1.2.177.

Stormblood Final Fantasy XIV Benchmark, 1080p
Ryzen 5 2600, MSI RX 470

Vulkan Compute[edit]

The Mesa RADV Vulkan for AMD graphics cards driver finished our RealSR 20 anime girls with questionmarks four seconds faster than Mesa 21.0.1 did while AMDVLK 2021.Q2.2, released slightly more than a week ago, finished the test 9 seconds slower than AMDVLK 2021.Q2.1. There was no change in Mesa RADV performance in the waifu2x-ncnn-vulkan image up-scaling test, it performed about the same. AMDVLK 2021.Q2.2 showed a performance regression in that one as well.

realsr-ncnn-vulkan, 20 anime girls with questionmarks,
in seconds (less is better)
MSI RX 470 8 GiB
waifu2x-ncnn-vulkan, 100 anime girls with questionmarks, in seconds
MSI RX 470 8 GiB

The Mesa RADV Vulkan driver has always been far superior to the AMDVLK driver in compute tasks and that's still the case. Mesa is the obvious choice if you want to do Vulkan compute on an AMD GPU.

OpenGL Performance[edit]

There is nothing groundbreaking for OpenGL applications in Mesa 21.1.0. There is a 0.5% performance-improvement on AMD box with a dedicated graphics card, mostly thanks to optimizations by Marek Olšák, and a 0.65% performance-improvement on an old Broadwell-powered Intel laptop we use to test the Intel Iris OpenGL driver.

UNIGINE Superposition 1.1, 1080p Medium
Ryzen 5 2600, MSI RX 470
UNIGINE Superposition 1.1, 720p Low
Intel i7-5500U

New OpenGL Features[edit]

The Nouveau nvc0 driver (for gm200+) has gained support for GL_EXT_texture_filter_minmax and GL_ARB_texture_filter_minmax.

Zink Is Now OpenGL 4.6 Compliant[edit]

Zink is a pretty neat technology that lets any graphics system capable of rendering Vulkan run OpenGL applications at a price. You can think of it as DXVK (a translation layer that allows Wine to render DirectX 9-11 with Vulkan) at a graphics stack level.

Mike Blumenkrantz, the top contributor to Mesa 21.1.0, made a long list of commits to the Mesa Zink driver during this release-cycle. He was not alone, Erik "Kusma" Faye-Lund, Adam Jackson, Antonio Caggiano, Bas Nieuwenhuizen, Dave Airlie, Eric Anholt, Hoe Hao Cheng and Michel Zou all contributed to bumping Zink OpenGL compliance from 4.1 to 4.6 in this release. It is now at a state where you can pretty much run any OpenGL game or application on any system with a feature-complete Vulkan driver.

Zink could potentially be very useful hardware vendors and others who would like to have OpenGL available on their shiny new platform without having to develop a specific driver for it, investing in a decent Vulkan driver would be enough now that Zink can provide OpenGL functionality "for free". It is not as free at is may sound, there is a heavy performance-penalty attached to Zink:

glmark2 --size 1920x1050 --benchmark terrain
Mesa 21.1, Radeon RX 470, Ryzen 2600
UNIGINE Superposition 1.1, 1080p Medium
Ryzen 5 2600, MSI RX 470

74.54% of the performance you get with the RadeonSI OpenGL driver on a AMD graphics card isn't bad, but it is 25.45% less performance than what a native OpenGL driver provides.

Lavapipe[edit]

Lavapipe is a software driver for Vulkan. 121 commits were added to it since since Mesa 21 was released in March.

"Lavapipe got a ton of work and is now credible enough that we test zink with it in ci. most of the arm drivers got a lot of internal work too. as did amd and intel."

Anonymous Mesa developer sources
May 6th, 2021

ARM[edit]

The Mesa Lima driver (docs.mesa3d.org/drivers/lima.html) for Mali-400 and Mali-450, but not Mali-470, got a big improvement that reduces the apparently previously very long waiting times in GTK applications by a lot.

"GTK doesn’t take 18s any more to display the first frame under Lima, that is my personal highlight in Mesa 21.1.0"

Anonymous sources familiar with the matter

Erico Nunes and Vasily Khoruzhick stood for most of the 26 new commits to the commits to the Lima driver. Eric Anholt contributed a few, Qiang Yu contributed one and Vinson Lee fixed some typographical errors. The most notable commits to Lima were "implement GL_EXT_texture_swizzle", "introduce fs and vs shader cache" and "implement shader disk cache". The two latter should improve performance in games since caches are faster.

The Road To Mesa 21.2.0[edit]

The Mesa developers have already begun developing the next major Mesa version and it could, possibly, have some interesting features.

"21.2 will be a new feature one for my drivers. 21.2 Will be Released With Apple M1 Support"

Anonymous source very familiar with the matter

Mesa 21.2 could be released with support for the new ARM based Apple M1 machines. She is a skilled ARM developer who has basically written entire graphics drivers for that platform all by herself, so it could be true. Then again, she might have been kidding around. There is no way to tell until Mesa 21.2 is released.



Snubbelrisk.jpg
Warning: THIS IS A DRAFT. DO NOT ADD CATEGORIES, DO NOT PUT ON FRONT PAGE, DO NOT SHARE LINKS TO IT. IT'S JUST A DRAFT. DON'T EXPECT IT TO BE ACCURATE, FINISHED OR USEFUL!