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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user