i965: Double the size of the state cache.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 26 Aug 2012 07:07:56 +0000 (00:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 27 Aug 2012 21:23:39 +0000 (14:23 -0700)
We probably want to do something more sophisticated here, but this at
least makes it through L4D2 without dumping the program cache.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_state_cache.c

index 57a5ee9..8823b22 100644 (file)
@@ -372,10 +372,10 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
 void
 brw_state_cache_check_size(struct brw_context *brw)
 {
-   /* un-tuned guess.  Each object is generally a page, so 1000 of them is 4 MB of
+   /* un-tuned guess.  Each object is generally a page, so 2000 of them is 8 MB of
     * state cache.
     */
-   if (brw->cache.n_items > 1000) {
+   if (brw->cache.n_items > 2000) {
       perf_debug("Exceeded state cache size limit.  Clearing the set "
                  "of compiled programs, which will trigger recompiles\n");
       brw_clear_cache(brw, &brw->cache);