From: Zou Nan hai Date: Tue, 19 Feb 2008 06:47:57 +0000 (+0800) Subject: [i965] fix broken glsl texdemo1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=689ff273d18528ec12817124cfbc6a8159cd8497;p=mesa.git [i965] fix broken glsl texdemo1 --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c b/src/mesa/drivers/dri/i965/brw_wm_pass2.c index 8541cbcbec0..766edc8dacc 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c +++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c @@ -86,8 +86,15 @@ static void init_registers( struct brw_wm_compile *c ) for (j = 0; j < FRAG_ATTRIB_MAX; j++) if (inputs & (1< FRAG_ATTRIB_VAR0) + index = j - (VERT_RESULT_VAR0 - FRAG_ATTRIB_VAR0) + else + index = j; nr_interp_regs++; - prealloc_reg(c, &c->payload.input_interp[j], i++); + prealloc_reg(c, &c->payload.input_interp[index], i++); } assert(nr_interp_regs >= 1);