Valve Sponsors Work To Greatly Speed-Up Linux OpenGL Game Load Times
An anonymous reader writes "Valve Software has sponsored some interesting improvements developed by LunarG for the Mesa OpenGL library on Linux for deferred and threaded GLSL shader compilation. What these changes mean for users of the open-source Linux graphics drivers when running their favorite games is that OpenGL games now load a lot faster. As an example, the time from starting Dota 2 until the time actually being within the game is reduced by about 20 seconds on an Intel system. While Direct3D has offered similar functionality for a while, OpenGL has not, which has given it a bad reputation with regard to game load times until all shaders are compiled and cached — fortunately it's now addressed for OpenGL if using the Mesa Linux graphics drivers on a supported game."
This won't affect Tux Racer's FPS. This will affect the load time on DotA 2, as well as other games which compile many shaders during load time.
Caching of compiled shaders is supported by the OpenCL spec, and I presume by GLSL as well (I've not looked, but they generally use more or less the same code paths). The application is responsible for asking the driver for the cacheable version and then loading it again later. The problem is that, on first load, the game is effectively doing ahead-of-time compilation of all of its shaders and, previously, these were all done in a single thread. The multithreading part is a bit odd, because most DRI GPU drivers use LLVM on the back end and LLVM has supported multithreaded compilation for a few years.
I am TheRaven on Soylent News
An IR doesn't buy you much. The time taken for clang to compile OpenCL C to SPIR is about 10% of the time required for LLVM to optimise and codegen the resulting SPIR into native code. The driving force behind SPIR comes from developers who don't want their shader source code embedded in their binary source.
I am TheRaven on Soylent News
I think you miss something:
On Windows, OpenGL already competes with DirectX. Especially with the indie-game revolution of the last 10 years.
On Linux, OpenGL wins 100% complete, hands-down. Because DirectX can't even run, let alone come close on performance.
On Mac, OpenGL wins 100% complete, hands-down. Unless you count boot-camp, which is really just Windows.
You can try to paint a different picture all you like - fact is that OpenGL is not only "the same" as DirectX when you're on Windows, but also runs in a ton of other places. That fact that it has slightly less performance than the ideal scenario on one of those (it has to be said) more obscure platforms is pretty inconsequential (and now fixed). I haven't seen anyone complain about the OpenGL performance on those millions of smartphones that run it. I haven't heard much about DirectX on smartphones, however.
Cherry-picking the battlefield for a comparison is no worse than cheating because you know you're going to lose.
Even on windows, OpenGL is not that much slower, on the order of 10% for 'normal' 3D game code. With a modern video card that difference almost doesnt matter.
Drivers to be renamed "Black Mesa OpenGL Library"?
I doubt people are using Windows because of the deferred and threaded GLSL shader compilation. I think it has more to do with the fact games are barely available for Linux at all. And that also has little do with how shaders are precompiled I think.
This feature just shaves off a few seconds during load time. That's great of course, but by no means a killer feature that previously has been a real problem for anyone. That's why the feature is late to the party and it is a gaming company who comes up with the patch, as they want their games to load faster. Makes sense, right? In no way I see how this makes Linux look bad.
Pretty good is actually pretty bad.
And that's just the desktop. On phones, OpenGL wins all. On tablets, OpenGL wins all. On consoles, DirectX is only relevant for the Xbox, the rest runs OpenGL.
The sphere of influence Microsoft has on the computing industry as a whole has been shrinking with each passing year for at least a decade now. The diminishing relevance of DirectX is yet another proof of this.
Pretty good is actually pretty bad.
The problem with OpenGL isn't speed or load times. Microsoft made directx so 3D programming in windows would be easier. It's just like C# or VBA. They made it much easier to use, and therefore much cheaper to hire for. If you're hiring people to write a new 3D engine using OpenGL you need people at the top of their field... If you're hiring for DirectX there are dozens of local tech colleges filled with mediocre talent that will fit the bill. Now, you could argue that you should be getting top talent anyways, but that's why you don't run a major game producers.
OpenGL. Just like WiiU, Android, iOS, and every other platform that isn't Microsoft.
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
FWIW, the Nvidia proprietary drivers have had a shader cache on Linux since the 290.03 release in late 2011 (search for GLShaderDiskCache). It probably helps Mass Effect 2 under Wine somewhat (here's a bug report from before the cache was added to the driver: http://bugs.winehq.org/show_bu... )