From: Eric Anholt Date: Thu, 12 Jul 2012 20:08:20 +0000 (-0700) Subject: i965: Add performance debug for register spilling. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4cfb9e30000eea9cb1f316ace9347083b619cdb0;p=mesa.git i965: Add performance debug for register spilling. Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 1e19183b4bf..2ad4134608c 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 5ab0547c1e6..3abc696b108 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,