Mesa (master): i965: init current_const[i].index = -1

Brian Paul brianp at kemper.freedesktop.org
Thu Apr 9 01:40:27 UTC 2009


Module: Mesa
Branch: master
Commit: 42cd3014f86e19e8156bea3439839dc0ed34aa83
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=42cd3014f86e19e8156bea3439839dc0ed34aa83

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr  8 19:29:37 2009 -0600

i965: init current_const[i].index = -1

---

 src/mesa/drivers/dri/i965/brw_wm_glsl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 3d360d5..c609256 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -254,9 +254,10 @@ static void prealloc_reg(struct brw_wm_compile *c)
      * XXX alloc these on demand!
      */
     if (c->use_const_buffer) {
-       c->current_const[0].reg = alloc_tmp(c);
-       c->current_const[1].reg = alloc_tmp(c);
-       c->current_const[2].reg = alloc_tmp(c);
+       for (i = 0; i < 3; i++) {
+          c->current_const[i].index = -1;
+          c->current_const[i].reg = alloc_tmp(c);
+       }
     }
     /*
     printf("USE CONST BUFFER? %d\n", c->use_const_buffer);




More information about the mesa-commit mailing list