mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs

Previously, the FOGC attribute contained the fragment fog coord, front/back-
face flag and the gl_PointCoord.xy values.  Now each of those things are
separate fragment program attributes.  This simplifies quite a few things in
Mesa and gallium.

Need to test i965 driver and fix up point coord handling in the gallium/draw
module...
This commit is contained in:
Brian Paul
2009-07-29 20:07:41 -06:00
parent 0723cd1b0a
commit 9d0b8d72d8
11 changed files with 69 additions and 138 deletions

View File

@@ -139,23 +139,6 @@ find_translated_vp(struct st_context *st,
if (fragInputsRead & (1 << inAttr)) {
stfp->input_to_slot[inAttr] = numIn;
numIn++;
if (((1 << inAttr) & FRAG_BIT_FOGC)) {
/* leave placeholders for the
* extra registers we extract from fog */
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;
}
}
}
else {
stfp->input_to_slot[inAttr] = UNUSED;