i965/fs: Move perf_debug about register spilling to a more obvious spot.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 14 May 2014 03:41:27 +0000 (20:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 May 2014 06:35:18 +0000 (23:35 -0700)
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 <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_wm.c

index 6b1b866fcc770d15c433e8cac2f8ba555a959dec..ed5bb0755f7a44092e65212d009e146eb3ee1e20 100644 (file)
@@ -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
index 8530f4fd454aabb111a82d3d05c3156a8e8b6071..cda86895bb59dda6aab6447fda0cdc62709a6faa 100644 (file)
@@ -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,