[Mesa-dev,05/16] mesa: Fix debug printing of live ranges for dead values.

Submitted by Eric Anholt on May 28, 2014, 6:37 p.m.

Details

Message ID 1401302267-5038-6-git-send-email-eric@anholt.net
State New
Headers show

Not browsing as part of any series.

Commit Message

Eric Anholt May 28, 2014, 6:37 p.m.
We'd loop for approximately forever trying to get to (GLuint)-1.
---
 src/mesa/program/prog_optimize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c
index 1ab54ec..e877497 100644
--- a/src/mesa/program/prog_optimize.c
+++ b/src/mesa/program/prog_optimize.c
@@ -1088,7 +1088,7 @@  find_live_intervals(struct gl_program *prog,
          const struct interval *inv = liveIntervals->Intervals + i;
          fprintf(stderr, "Reg[%d] live [%d, %d]:",
                       inv->Reg, inv->Start, inv->End);
-         if (1) {
+         if (inv->Start != -1) {
             GLuint j;
             for (j = 0; j < inv->Start; j++)
                fprintf(stderr, " ");