Comparison and Combination

The main advantage offered by the shader cache is that it is handled automatically, without any application intervention. In addition, the driver sometimes needs to generate shaders internally for certain clear and copy operations. If the cache is enabled, these too will only be generated once, rather than every time the application is run.

Although the cache eliminates the need to recompile shaders, there is search and maintenance overhead. Applications can avoid this overhead by saving and loading programs directly. Furthermore, the cache files become invalid every time a new driver is installed. Saved binaries, on the other hand, only need to be replaced when the compiler portion of the driver is updated.

The shader cache and the functions to read and load binaries are not mutually exclusive. An application can make use of both. For instance, the most critical shader programs which must be available as soon as possible after startup could be manually saved, while less frequently used shaders rely on the cache.