[Mesa-dev] [PATCH v2] i965: Issue performance warnings when growing the program cache

Kenneth Graunke kenneth at whitecape.org
Tue Aug 22 20:47:54 UTC 2017


This involves a bunch of unnecessary copying, a batch flush, and
state re-emission.
---
 src/mesa/drivers/dri/i965/brw_program_cache.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 4dcfd5234df..e9706be8961 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: %zu kB -> %u kB\n",
+              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;
-- 
2.14.1



More information about the mesa-dev mailing list