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

How Valve Made L4D2 Faster On Linux Than Windows

Valve

Published on 09 August 2012 03:58 PM EDT
Written by Michael Larabel in Valve
103 Comments

Following this morning's Here Is Valve's Source Engine Left 4 Dead 2 On Linux article, here is most of the details that were shared during yesterday's SIGGRAPH presentation about Left 4 Dead 2 running natively on Linux with OpenGL and outperforming the Windows version.

Valve's big SIGGRAPH Linux presentation centered around their OpenGL work and how the Linux version is faster than the Windows version -- for both the OpenGL and Direct3D renderers.

Valve is supposed to be posting the slides (presumably on their blog) and hopefully a video will emerge, but since there's nothing yet, it will probably take until next week before they share anything. As a result, below are the pertinent details they shared from their slides that were presented last night at SIGGRAPH Los Angeles. With SIGGRAPH being an industry-leading graphics conference, most of the talk was filled with low-level technical details. Enjoy!

- The presentation was made by Rich Geldreich of Valve and entitled "Left 4 Dead 2 Linux: From 6 to 300 FPS in OpenGL."

- The Source Engine with OpenGL is on average about 11% faster with OpenGL than Direct3D 9 on a NVIDIA GeForce GTX 680. It's believed that another 5% higher performance for GL is still easily obtainable by reducing overhead in their Direct3D -> OpenGL layer.

- Yes, the way the Source Engine is hitting on OpenGL right now is through a non-deferring, locally-optimizing abstraction layer to basically convert their longstanding Direct3D calls into OpenGL. However, it's not the same way that Wine does Direct3D to OpenGL conversion. The Source Engine targets a D3D9-like API with extensions that translates GL calls dynamically. This also works for Shader Model 2.0b with Shader Model 3.0 support coming soon. Valve's implementation is nearly a 1:1 mapping between D3D and GL concepts.

- The overhead attributed to the Direct3D to OpenGL translation is about 50/50 split between CPU cycles spent calling GL vs. translation overhead. For single-threaded graphics drivers on the other hand, it's about 80% in GL and 20% translation overhead. But again, even with this extra layer, OpenGL is faster. NVIDIA's proprietary Linux team has done a lot of work with their driver's multi-threading abilities.

- Valve's worked with all major vendors (Intel, AMD, and NVIDIA) for improved driver support and optimizations. Valve's Linux team originally had "little practical OpenGL experience." Their process came down to devising/conducting experiments, test results with known workloads, refining/updating mental model of system's behavior, repeat. The goal was to account for every micro-second spent in the Direct3D to OpenGL layer and render thread.

- Interpreting the experimental results were a bit challenging with the game being multi-threaded, the driver's server thread is invisible to most profiling tool, and the Source Engine is extremely configurable/scalable.

- RAD Game Tools' Telemetry was used a lot plus a custom batch trace recording mode for analyzing their translation layer. Telemtry offers cross-platform performance visualization systems via a visualizer app, run-time component, and server.

- Some of Valve's optimizations made so far is multi-threading support with the GL mode, removing most calls to glXMakeCurrent, pthreads usage fixes, reducing translation overhead by rewriting the hottest D3D->GL code paths, improved dirty range tracking, added separate uniform array for bone matrices, dynamic buffer updating improvements, and compiler optimizations. The compiler improvements were building the game/engine with -ffast-math and removing -fPIC.

- Extra details not covered during the presentation will be shared via their Linux blog in the coming days.

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. SilverStone Precision PS10
  2. ASRock Z97 Extreme6
  3. Nouveau Re-Clocking Is Way Faster, Shows Much Progress For Open-Source NVIDIA
  4. NVIDIA Wins Over AMD For Linux Gaming Ultra HD 4K Performance
Latest Linux Articles
  1. Preview: Benchmarking CentOS 7.0 & Scientific Linux 7.0
  2. Linux 3.16 File-System Tests On A Hard Drive
  3. Benchmarking Deepin 2014 With DDE 2.0 Using Linux Games
  4. Testing Btrfs On The Linux 3.16 Kernel
Latest Linux News
  1. Khronos Updates Its OpenVX 1.0 Provisional Specification
  2. Phoronix Test Suite 5.2.1 Released With Minor Updates
  3. NVIDIA Contributes Re-Clocking Code To Nouveau For The GK20A
  4. KDE 4.14 Applications & Development Platform Beta Released
  5. AMD Publishes Open-Source Linux HSA Kernel Driver
  6. NVIDIA Updates Its Linux Legacy Driver For GeForce 6/7 GPUs
  7. CrossOver 13.2.0 Allows Easier Package Installation On Linux
  8. More "Mega Driver" Work Merged For Mesa
  9. The Beta To The Final Minor Release Of RHEL5 Is Out
  10. The Witcher 2 Works On Beta Improvements
Latest Forum Discussions
  1. Using Udev Without Systemd Is Going To Become Harder
  2. Updated and Optimized Ubuntu Free Graphics Drivers
  3. Some shady script in Phoronix opening shady ad in new tab
  4. Advertisements On Phoronix
  5. Glamor now enabled in Debian radeonsi
  6. Qualcomm DMCA Notice Takes Down 100+ Git Repositories
  7. Lennart: The State & Future Of Systemd
  8. Maker3D - create your 3D RPG

Close Advertisement

Close Advertisement