From 42cd3014f86e19e8156bea3439839dc0ed34aa83 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 8 Apr 2009 19:29:37 -0600 Subject: [PATCH] i965: init current_const[i].index = -1 --- src/mesa/drivers/dri/i965/brw_wm_glsl.c | 7 ++++--- 1 file 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 3d360d58d53..c609256b6f7 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); -- 2.30.2