[Mesa-dev] [PATCH 00/21] deferred and threaded glCompileShader

Pierre-Loup A. Griffais pgriffais at valvesoftware.com
Fri May 2 16:34:06 PDT 2014


> This series adds a thread pool to the GLSL compiler, and a drirc option to
> defer glCompileShader calls to the pool.  The goal is to reduce the start-up
> time of applications that are aware of this feature.  That is, applications
> that compile shaders first and check the compile status later.
>
> I do not have numbers from real applications yet.

I believe I can help with that. 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


More information about the mesa-dev mailing list