i965: Issue performance warnings when growing the program cache
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Aug 2017 04:23:25 +0000 (21:23 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 29 Aug 2017 23:45:07 +0000 (16:45 -0700)
This involves a bunch of unnecessary copying, a batch flush, and
state re-emission.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_program_cache.c

index 4dcfd5234dfb31e3253342c84b54050f4cc270d7..907150f507eb4f67a1066a7dc29bde827e778177 100644 (file)
@@ -217,6 +217,9 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
    struct brw_context *brw = cache->brw;
    struct brw_bo *new_bo;
 
+   perf_debug("Copying to larger program cache: %u kB -> %u kB\n",
+              (unsigned) cache->bo->size / 1024, new_size / 1024);
+
    new_bo = brw_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
    if (can_do_exec_capture(brw->screen))
       new_bo->kflags = EXEC_OBJECT_CAPTURE;