summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-07-12 13:08:20 -0700
committerEric Anholt <eric@anholt.net>2012-08-12 19:08:25 -0700
commit4cfb9e30000eea9cb1f316ace9347083b619cdb0 (patch)
tree0353923b8e621a115a29706c72a074d775a6c458 /src/mesa/drivers/dri
parentd72ff03e699e78381049e29d89163519e6730dd4 (diff)
i965: Add performance debug for register spilling.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 1e19183b4b..2ad4134608 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 5ab0547c1e..3abc696b10 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,