summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-08 19:29:37 -0600
committerBrian Paul <[email protected]>2009-04-08 19:37:33 -0600
commit42cd3014f86e19e8156bea3439839dc0ed34aa83 (patch)
tree4a0fb7601a9b38fa7f372ab8affd4ec495e3dba2 /src/mesa/drivers/dri
parented9ba19bbbcdbf864b39da21c314073c1b5462db (diff)
i965: init current_const[i].index = -1
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c7
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 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);