Merge Jose's documentation and core Mesa changes from embedded branch
[mesa.git] / src / mesa / tnl / t_vb_normals.c
index 4cf4bb65c78df3d5b951e7aa38f993cf66708816..22c97291435652cedd6004c88e00f6f3aefcba7a 100644 (file)
@@ -87,7 +87,6 @@ static GLboolean run_validate_normal_stage( GLcontext *ctx,
 {
    struct normal_stage_data *store = NORMAL_STAGE_DATA(stage);
 
-   ASSERT(ctx->_NeedNormals);
 
    if (ctx->_NeedEyeCoords) {
       GLuint transform = NORM_TRANSFORM_NO_ROT;
@@ -136,7 +135,9 @@ static GLboolean run_validate_normal_stage( GLcontext *ctx,
 static void check_normal_transform( GLcontext *ctx,
                                    struct gl_pipeline_stage *stage )
 {
-   stage->active = ctx->_NeedNormals && !ctx->VertexProgram.Enabled;
+   stage->active = !ctx->VertexProgram.Enabled &&
+      (ctx->Light.Enabled || (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS));
+
    /* Don't clobber the initialize function:
     */
    if (stage->privatePtr)