r300: Further reduced the radeon_span.c diff.
[mesa.git] / src / mesa / swrast / s_fragprog.c
index 882fec29efe5a076fed62e561b617303afe9043b..b1501221cadfa4ee7ee1b4c8d21ac1e611c62d21 100644 (file)
@@ -113,8 +113,14 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
    /* Setup pointer to input attributes */
    machine->Attribs = span->array->attribs;
 
-   /* Store front/back facing value in register FOGC.Y */
-   machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
+   machine->DerivX = (GLfloat (*)[4]) span->attrStepX;
+   machine->DerivY = (GLfloat (*)[4]) span->attrStepY;
+   machine->NumDeriv = FRAG_ATTRIB_MAX;
+
+   if (ctx->Shader.CurrentProgram) {
+      /* Store front/back facing value in register FOGC.Y */
+      machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
+   }
 
    machine->CurElement = col;