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;
}
}
}