From: Brian Paul Date: Thu, 9 Apr 2009 01:29:37 +0000 (-0600) Subject: i965: init current_const[i].index = -1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42cd3014f86e19e8156bea3439839dc0ed34aa83;p=mesa.git i965: init current_const[i].index = -1 --- 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);