19:36 adavy: q4a: here is an easy task: compile on demand for shaders
19:37 adavy: basically (see bug reports for example a Hat In Time) some games compile a LOT of shaders they don't end up using. And unfortunately with nir it uses a lot of ram and on 32 bit apps it can explore what is available
19:37 adavy: when we get a shader we compile it for the shader key 0
19:37 adavy: that does two things: check the compilation works and get a version of the shader
19:38 adavy: however in practice we might never use that version because in practice the shader key would never be 0 (the shader key describes specific behaviours that need to be encoded in the shader)
19:40 adavy: The idea is to introduce a drirc env var (see my last pull request for an example), and if it is set, we stop the compilation of the shader for the first time at the TGSI conversion step. Basically all the fields that we need for later compilation and key computation are filled, etc but we don't really send to the driver. And if we get key=0 we need to compile.
19:40 adavy: we need to do the conversion to TGSI to ensure we don't need to return an error for the shader (wine tests check some shaders return error), and also because we need some info to compute the shader keys later
19:48 adavy: For most games that use a reasonable number of shaders the current behaviour is better, because most likely you won't have shader compilation (which introduce stutter) during gameplay
19:49 adavy: But for those like a Hat in time it would be much better that way. You can add by default the option for an exe that match its name