RadeonSI Introduces A Live Shader Cache With Mesa 20.0
In addition to the AMD RadeonSI Gallium3D driver's on-disk shader cache and in-memory shader cache there is now a "live shader cache" to help with deduplication of compiled shader objects.
AMD's Marek Olšák landed this live shader cache on Friday. The introduction of this new caching level stems from the behavior of when games concert separate D3D shaders into linked GLSL shaders, the same vertex shader is often used with many different fragment shaders. In introducing this live shader cache of the compiled shader objects, for affected titles there should now be fewer resident shaders and fewer shader state changes.
More details on this RadeonSI live shader cache via this merge request. There was some interest in seeing this live cache added to the common Mesa state tracker code but ultimately Marek found it best implementing it within the Gallium3D driver (RadeonSI) code itself. The code has landed in time for next week's Mesa 20.0 feature freeze.
AMD's Marek Olšák landed this live shader cache on Friday. The introduction of this new caching level stems from the behavior of when games concert separate D3D shaders into linked GLSL shaders, the same vertex shader is often used with many different fragment shaders. In introducing this live shader cache of the compiled shader objects, for affected titles there should now be fewer resident shaders and fewer shader state changes.
More details on this RadeonSI live shader cache via this merge request. There was some interest in seeing this live cache added to the common Mesa state tracker code but ultimately Marek found it best implementing it within the Gallium3D driver (RadeonSI) code itself. The code has landed in time for next week's Mesa 20.0 feature freeze.
3 Comments