summaryrefslogtreecommitdiffstats
path: root/src/mesa
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/mesa
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/mesa')
-rw-r--r--src/mesa/main/mtypes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e5f7cbaa5bc..c4fab9dbac2 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2504,7 +2504,8 @@ enum gl_compile_status
{
compile_failure = 0,
compile_success,
- compile_skipped
+ compile_skipped,
+ compiled_no_opts
};
/**