summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-01-17 17:16:29 +1100
committerTimothy Arceri <[email protected]>2019-01-19 13:12:25 +1100
commit6ca652faf368427e3e6d57ef5456f78203b8207e (patch)
treeb13c969393f98398857d17201c296750e35687b0 /src/intel/vulkan
parentc84ec70b3a72a3640a40e72689d72da8337e9801 (diff)
glsl: be much more aggressive when skipping shader compilation
Currently we only add a cache key for a shader once it is linked. However games like Team Fortress 2 compile a whole bunch of shaders which are never actually linked. These compiled shaders can take up a bunch of memory. This patch changes things so that we add the key for the shader to the cache as soon as it is compiled. This means on a warm cache we can avoid the wasted memory from these shaders. Worst case scenario is we need to compile the shaders at link time but this can happen anyway if the shader has been evicted from the cache. Reduces memory use in Team Fortress 2 from 1.3GB -> 770MB on a warm cache from start up to the game menu. V2: only add key to cache when compilation is successful. Acked-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
0 files changed, 0 insertions, 0 deletions