summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-10 11:48:48 +1000
committerTimothy Arceri <[email protected]>2017-04-15 11:36:44 +1000
commitc2bc0aa7b188708e702bc3eaac5389793cbb85a8 (patch)
treefd6eb5b1729e50ba6fe9593a539587a0b9bd2968 /src/compiler/glsl/linker.cpp
parentd2d6cf6c8387ac06c8559027f57683a61b48671b (diff)
glsl: delay optimisations on individual shaders when cache is available
Due to a max limit of 65,536 entries on the index table that we use to decide if we can skip compiling individual shaders, it is very likely we will have collisions. To avoid doing too much work when the linked program may be in the cache this patch delays calling the optimisations until link time. Improves cold cache start-up times on Deus Ex by ~20 seconds. When deleting the cache index to simulate a worst case scenario of collisions in the index, warm cache start-up time improves by ~45 seconds. V2: fix indentation, make sure to call optimisations on cache fallback, make sure optimisations get called for XFB. Tested-by: Grazvydas Ignotas <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 7bbffb7621f..7ace01dd9d3 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4641,9 +4641,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
bool skip_cache = false;
if (prog->TransformFeedback.NumVarying > 0) {
for (unsigned i = 0; i < prog->NumShaders; i++) {
- if (prog->Shaders[i]->ir) {
- continue;
- }
_mesa_glsl_compile_shader(ctx, prog->Shaders[i], false, false, true);
}
skip_cache = true;