The shader cache is a worthwhile thing as it improves performance, but now the management of that shader cache needs to be handled better for old, stale (and maybe bad) cache.
I agree with this. Could be very beneficial, but the way it is managed is problematic.
At some point I saw what looked like many gigabytes of downloads per game each time Steam was started. This was ludicruous as building them client-side would be much faster than huge downloads. And it would build them for correct GPU. Correct use of NIR intermediate language might cut down on the redownloads and rebuilds? Whatever top-level language is used the GPU driver in Mesa deals with NIR anyway so cutting down the other builds would make it more simple and efficient.
Many people are reporting crashes and out of memory problems that all seem to point to shader cache using 32-bit code.
There's often two major reasons why shader would need rebuilding: change in GPU drivers or a change in game code. Detecting these correctly might reduce some of the issues at least.
The download-thing is bonkers anyway. Using shaders would be tiered like this:
From the above tier2 has so much more latency it is pointless to use in pretty much every case: even slow systems can rebuild shaders (tier1) faster than downloading the huge blobs takes. Yes, download happens before launching the game but shader building is still so much faster locally that the benefit of a download is not there in most cases.
Nothing extracted yet.
Through multiple updates to STEAM over the years, I've found that wiping the shader cache folder(s) to be worthwhile. Sometimes when an update to the shader cache mechanism happens, and I don't clear the cache, the cache seems to try to re-generate every.single.time.i.log.in. And this is really annoying.
It's usually months between times I clear the cache, no real specific time, just arbitrary "feels like a good time to this" and it seems to solve it.
So I think this is a UX fail, in that keeping bad old cache can cause problems, and it's probably a good idea for the devs to figure out ways to deal with proper cache regeneration at key times (like when the cache generation algos get updated to be more efficient, or whatever). Since there's going to be people who keep the cache around for months to years, because they don't really seek out cleaning out that cache.
The shader cache is a worthwhile thing as it improves performance, but now the management of that shader cache needs to be handled better for old, stale (and maybe bad) cache.
This could be a button in the "Shader Pre-Caching" section where you can click to clear all cache, or maybe VALVe can intelligently just clear and regenerate it in full once a yearly quarter, or something like that.
It's also worth keeping in mind that if your library is on multiple different mount points (think, multiple storage drives), that the cache spans multiple different folders, and whatever is done about this takes that into consideration.