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. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. MSAA RadeonSI Gallium3D Performance Preview
  2. Intel Core i7 5960X CPU Core Scaling Under Linux
  3. AMD RadeonSI Gallium3D Performance For 4K Linux Gaming
  4. 9-Way File-System Comparison With A SSD On The Linux 3.17 Kernel
Latest Linux News
  1. Nouveau For Linux 3.18 Gains DP Audio, More Re-Clocking
  2. SUSE Gets Bought Out Again
  3. Enlightenment E19 Officially Released With Its Own Wayland Compositor
  4. OpenMediaVault 1.0 Released As New Linux NAS Alternative
  5. VESA Releases DisplayPort 1.3, Pushes 32.4 Gbits/sec
  6. Opera 25 Beta Has Bookmarks & Linux Support
  7. LLVM Clang Now Builds Even More Debian Packages
  8. Pyston 0.2 Is A Heck Of A Lot Better At Running Python Programs
  9. Linux 3.17-rc5 Kernel Released
  10. FreeBSD 10.1 In Beta Ahead Of Planned Release Next Month
Latest Forum Discussions
  1. Updated and Optimized Ubuntu Free Graphics Drivers
  2. support for first generation UVD blocks (RV6xx, RS780, RS880 and RV790)
  3. New Group Calls For Boycotting Systemd
  4. Nvidia joins the ranks of Apple and Microsoft
  5. Hd 6850
  6. nv and xorg.conf under Debian PPC
  7. X.Org Is Looking For Some Female Help
  8. FSF Issues Their Rebuttal To Apple's New iPhone, Watch & Apple Pay