Series is: Reviewed-by: Chris Forbes <chr...@ijw.co.nz>
On Fri, May 16, 2014 at 6:19 PM, Kenneth Graunke <kenn...@whitecape.org> wrote: > The if (!allocated_without_spills) block is an obvious spot for this > performance warning message. > > In the Vec4 backend, scratch is also used for indirect access of > temporary arrays. The FS backend doesn't implement that yet, but > if it did, this message would be inaccurate, since scratch access > wouldn't necessarily mean spilling. Moving it preemptively fixes that. > > Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++++ > src/mesa/drivers/dri/i965/brw_wm.c | 4 ---- > 2 files changed, 4 insertions(+), 4 deletions(-) > > I went to do some work on fs_visitor and ended up cleaning house a bit. > Suddenly there were 17 patches, and...sorry for the churn. :) > > Available on the 'compile-kill-c' branch of ~kwg/mesa. > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 6b1b866..ed5bb07 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -3064,6 +3064,10 @@ fs_visitor::run() > if (dispatch_width == 16) { > fail("Failure to register allocate. Reduce number of " > "live scalar values to avoid this."); > + } else { > + perf_debug("Fragment shader triggered register spilling. " > + "Try reducing the number of live scalar values to " > + "improve performance.\n"); > } > > /* Since we're out of heuristics, just go spill registers until we > diff --git a/src/mesa/drivers/dri/i965/brw_wm.c > b/src/mesa/drivers/dri/i965/brw_wm.c > index 8530f4f..cda8689 100644 > --- a/src/mesa/drivers/dri/i965/brw_wm.c > +++ b/src/mesa/drivers/dri/i965/brw_wm.c > @@ -186,10 +186,6 @@ 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(brw, &brw->wm.base.scratch_bo, > -- > 1.9.2 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev