1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

Valve-Sponsored Mesa Work Makes Games Load A Lot Faster

Mesa

Published on 04 May 2014 11:58 PM EDT
Written by Michael Larabel in Mesa
58 Comments

Improvements to Mesa done by LunarG and sponsored by Valve in a new open-source patch-set means that popular Linux games should take significantly less time to load -- including titles like Dota 2 and Counter-Strike: Global Offensive -- by speeding up the shader compilation process.

Chia-I Wu recently sent out a set of 21 patches for Mesa that add a thread pool to Mesa's GLSL compiler and a new DRI option for defering glCompileShader calls to this pool. These changes are to reduce start-up time of applications that can handle defered compilation of GLSL shaders. When going through this thread pool, the shader compilation process is much faster across multiple threads while returning asynchronously with the compile shader call.

Intel's Ian Romanick has begun reviewing the patches. Pierre-Loup A. Griffais followed-up to explain the benefits at length. Pierre-Loup says that the shader compilation time on OpenGL is a real problem for both developers and users while in the Direct3D world threaded shader compiles and lazy shader reflection have been around for a long time.

When testing the patches, Dota 2 is running with a 20 second reduction in loading times across the board for an Intel-powered Gigabyte Brix Pro system. Valve is already merging these patches into their SteamOS Mesa branch and will be shipping it as part of their next driver release cycle for SteamOS.

Aside from needing a patched version of Mesa, the DRIRC option also needs to be set for this deferred and threaded OpenGL shader compilation process, but Pierre-Loup also mentioned they are already working on updated builds of Counter-Strike: Global Offensive and Dota 2 for Linux to automatically take advantage of the feature. Valve is also encouraging other game developers to begin taking advantage of this feature. This statement is also very interesting since Valve hasn't publicly released Counter-Strike: Global Offensive to Linux gamers, but we know it's already been ported and Linux driver developers have been working to optimize CS:GO -- hopefully with a better open-source experience, CS:GO could be publicly released for Linux/SteamOS gamers.
Some more context on the intent: we're having this work done because shader compilation time on OpenGL is a real issue that both end-users and developers run into on a daily basis. Threaded compiles and lazy shader reflection have been part of the D3D ecosystem for a long while. Here's a sample that contains several data points to put this into perspective:

https://github.com/ValveSoftware/Dota-2/issues/661

I'm happy to say that when applying this patch series to my Mesa branch and changing ToGL in DOTA2 to perform lazy shader reflection, I'm seeing a 20s reduction in loading times across the board on a Brix Pro machine, from starting the client to getting in-game.

This is a very promising start and I will be merging this patch series to the SteamOS Mesa branch, and ship it as part of our next driver release cycle.

We will also be releasing updated builds of CS:GO and DOTA2 for Linux to take advantage of that feature; we encourage developers shipping on Linux to use that same pattern when compiling their shaders as well as enabling this new feature in their environment, as it's too good to pass on.

Thanks a lot,
- Pierre-Loup

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Btrfs On 4 x Intel SSDs In RAID 0/1/5/6/10
  2. AMD Radeon R9 290 On Ubuntu 14.10: RadeonSI Gallium3D vs. Catalyst
  3. MSI X99S SLI PLUS On Linux
  4. NVIDIA GeForce GTX 970 Offers Great Linux Performance
Latest Linux Articles
  1. Windows 8.1 vs. Ubuntu 14.10 With Intel HD Graphics
  2. 6-Way Ubuntu 14.10 Radeon Gallium3D vs. Catalyst Driver Comparison
  3. NVIDIA vs. Nouveau Drivers On Ubuntu 14.10
  4. Ubuntu 14.10 Offers AMD Radeon Driver Performance Improvements
Latest Linux News
  1. Wine 1.7.30 Continues Work On DirectWrite & Offers Regedit Fixes
  2. Has The Sky Fallen? Qualcomm Contributes To Freedreno's DRM/KMS Driver
  3. Manjaro Works To Make Calamares A Distribution-Independent Installer
  4. DisplayLink USB 3.0 Support Sounds Like A Mess
  5. PulseAudio Gains A Native Bluetooth Headset Backend
  6. X.Org Foundation Decides On Its Women Outreach Project
  7. GTK+ 3.16's New GtkGLArea Widget Gets Improved
  8. X.Org Server 1.17 ABI Bumped
  9. Fedora 21 Beta To Be Released Next Week
  10. Go 1.4 Beta Release Brings Big Runtime Changes
Latest Forum Discussions
  1. Closed source to opensource
  2. How to get rid of Linux
  3. Is foolish currently develop in machine code, hexadecimal and assembly?
  4. Reducing The CPU Usage In Mesa To Improve Performance
  5. Help diagnosing problems with a Readon HD 4670 on Mesa 10.3.2-1
  6. Advertisements On Phoronix
  7. nv and xorg.conf under Debian PPC
  8. Looking for a Open-Source AMD experienced Linux mentor