[Mesa-dev] [PATCH 3/8] i965: Add performance debug for register spilling.

Eric Anholt eric at anholt.net
Tue Aug 7 11:04:11 PDT 2012


---
 src/mesa/drivers/dri/i965/brw_vs.c |    4 ++++
 src/mesa/drivers/dri/i965/brw_wm.c |    4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index b1b073e..5120167 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -254,6 +254,10 @@ do_vs_prog(struct brw_context *brw,
 
    /* Scratch space is used for register spilling */
    if (c.last_scratch) {
+      perf_debug("Vertex shader triggered register spilling.  "
+                 "Try reducing the number of live vec4 values to "
+                 "improve performance.\n");
+
       c.prog_data.total_scratch = brw_get_scratch_size(c.last_scratch);
 
       brw_get_scratch_bo(intel, &brw->vs.scratch_bo,
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 5ab0547..3abc696 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -321,6 +321,10 @@ bool do_wm_prog(struct brw_context *brw,
 
    /* Scratch space is used for register spilling */
    if (c->last_scratch) {
+      perf_debug("Fragment shader triggered register spilling.  "
+                 "Try reducing the number of live scalar values to "
+                 "improve performance.\n");
+
       c->prog_data.total_scratch = brw_get_scratch_size(c->last_scratch);
 
       brw_get_scratch_bo(intel, &brw->wm.scratch_bo,
-- 
1.7.10.4



More information about the mesa-dev mailing list