Browse Source

gallium: fixup register indexes for fog/frontface/point coord

tags/intel_2009q2_rc3
Zack Rusin 16 years ago
parent
commit
7b861b9b9e
1 changed files with 12 additions and 3 deletions
  1. 12
    3
      src/mesa/state_tracker/st_atom_shader.c

+ 12
- 3
src/mesa/state_tracker/st_atom_shader.c View File

@@ -142,9 +142,18 @@ find_translated_vp(struct st_context *st,
if ((fragInputsRead & FRAG_BIT_FOGC)) {
/* leave placeholders for the
* extra registers we extract from fog */
if (stfp->Base.UsesFrontFacing ||
stfp->Base.UsesPointCoord) {
numIn += 2;
if (stfp->Base.UsesFrontFacing) {
if (!stfp->Base.UsesFogFragCoord)
--stfp->input_to_slot[inAttr];
else
++numIn;
}
if (stfp->Base.UsesPointCoord) {
if (!stfp->Base.UsesFrontFacing &&
!stfp->Base.UsesFogFragCoord)
stfp->input_to_slot[inAttr] -= 2;
else
++numIn;
}
}
}

Loading…
Cancel
Save