Valve’s new code cuts AMD GPU compile times by over 45% for Linux games

Valve is directly improving AMD Radeon gaming performance on the Linux platform


AMD graphics cards are getting some Linux love from what might seem like an unlikely source: Valve. Source. Valve. C’mon… Whatever. A team of software engineers in Valve has been working on a new shader compiler for AMD GPUs running on Linux operating systems, and it promises dramatically shorter time to compile metrics as well as a few cases where it’s making a positive difference to gaming frame rates on Linux too.

Currently the AMD OpenGL and Vulkan drivers both use a compiler that’s part of the LLVM project, but Valve says that this project is “massive,” that it has many different goals, and with the “online compilation of game shaders only being one of them.” It also mentions that, because of their focus on different things, sometimes shader compilation times can be accidentally broken by devs working on other LLVM purposes. So the Valve team is working on a gaming-specific compiler for the open source Mesa driver project as an alternative to LLVM.

The team has got to the point where the new ACO compiler is working across a broad cross-section of games without any problems and so it is moving on to an optimisation phase, as well as a more public testing phase. It has posted the ACO source tree for Mesa devs to start playing with and is looking for testing feedback from the Linux community.

The details of the new ACO compiler have been announced via a Steam Community post yesterday evening (via Phoronix) and the full run-down of the benchmarks have also been published on Github.

Read more: These are the best PC controllers around today

And while the actual gaming frame rate boosts maybe aren’t anything to really write home about the dramatic reduction in the time it takes to compile the shaders is massive. Changing from the RADV Mesa drivers using LLVM to the RADV drivers running ACO there is a decrease in compile time of over 45%.

But drilling deeper into the benchmark runs shows the ACO compiler to be sometimes more than seven times faster than the alternative LLVM compiler, and spends significantly less time occupying the CPU too.

AMD Radeon RX 5700

Across the board the frame rate increases only ever amounts to single digit percentage changes, and there are a few instances where there’s a one or two percent drop in frame rate too, but as Valve point out: “other games we’ve tested appear mostly unaffected in terms of runtime performance, but still benefit from the compilation time improvements.”

At the moment the ACO compiler only deals with pixel and compute shader stages, but Valve anticipates that when other stages are implemented the performance and compile times should only improve.

This is the early stages for the compiler, but it’s fascinating to see Valve putting so much into the deep layers of performance for both the Linux platform and specifically the AMD side of things. We could genuinely see this being of large benefit to AMD’s new graphics cards when they’re running the Vulkan API going forward.

I wonder how much impact it might then have on the new Radeon RX 5700 XT et al in the future.

Join the conversation about what this could mean for Linux gaming on AMD hardware in this article’s Twitter and Facebook threads.