With recent changes to support frontfacing in glsl, it is necessary
to ensure that the UsesFogFragCoord value is accurate in all shaders.
We were previously not setting it for fixed-function and ARB_fs shaders.
if (program->FogOption)
program->Base.InputsRead |= FRAG_BIT_FOGC;
+
+ /* XXX: assume that ARB fragment programs don't have access to the
+ * FrontFacing and PointCoord values stuffed into the fog
+ * coordinate in GLSL shaders.
+ */
+ if (program->Base.InputsRead & FRAG_BIT_FOGC)
+ program->UsesFogFragCoord = TRUE;
if (program->Base.Instructions)
_mesa_free(program->Base.Instructions);
fprog->Base.Instructions = newInst;
fprog->Base.NumInstructions = inst - newInst;
fprog->Base.InputsRead |= FRAG_BIT_FOGC;
+ fprog->UsesFogFragCoord = GL_TRUE;
/* XXX do this? fprog->FogOption = GL_NONE; */
}