i965: Add performance debug for register spilling.
authorEric Anholt <eric@anholt.net>
Thu, 12 Jul 2012 20:08:20 +0000 (13:08 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 13 Aug 2012 02:08:25 +0000 (19:08 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c

index 1e19183b4bf78d4cb343952cc8ac0a42c5443ff9..2ad4134608c7a714963c45a7784fb4a23ba86216 100644 (file)
@@ -259,6 +259,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,
index 5ab0547c1e6e90bd5f751ded2b30e61cb44e0206..3abc696b108b80f5597ad8d996f735f0ca7db57f 100644 (file)
@@ -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,