aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_program_cache.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-08-17 21:23:25 -0700
committerKenneth Graunke <[email protected]>2017-08-29 16:45:07 -0700
commit9a09e4684d64fe31682b5c6db9a07bf1337a9b02 (patch)
tree8125563059f18237830992c9c95c717ed007e82f /src/mesa/drivers/dri/i965/brw_program_cache.c
parentf6d38785e8b28a6dd303884798b823e289817741 (diff)
i965: Issue performance warnings when growing the program cache
This involves a bunch of unnecessary copying, a batch flush, and state re-emission. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_program_cache.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 4dcfd5234df..907150f507e 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -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;