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

Eric Anholt eric at anholt.net
Wed May 28 11:37:36 PDT 2014


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(-)

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, " ");
-- 
2.0.0.rc2



More information about the mesa-dev mailing list