mesa: merge gallium-0.2 into gallium-master-merge
[mesa.git] / src / mesa / main / state.c
index 0d452fd8791e66da4c0fcad2f01c52a013bc1b36..718cd9984767653dbc657df3c628a00f45a64122 100644 (file)
@@ -190,8 +190,8 @@ update_program(GLcontext *ctx)
 
    /*
     * Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
-    * pointers to the programs that should be enabled/used.  These will only
-    * be NULL if we need to use the fixed-function code.
+    * pointers to the programs that should be used for rendering.  If either
+    * is NULL, use fixed-function code paths.
     *
     * These programs may come from several sources.  The priority is as
     * follows:
@@ -204,8 +204,6 @@ update_program(GLcontext *ctx)
     * come up, or matter.
     */
 
-   _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
-
    if (shProg && shProg->LinkStatus && shProg->FragmentProgram) {
       /* Use shader programs */
       _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
@@ -256,17 +254,6 @@ update_program(GLcontext *ctx)
       _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
    }
 
-   /* XXX: get rid of _Active flag.
-    */
-#if 1
-   ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled;
-   if (ctx->FragmentProgram._MaintainTexEnvProgram &&
-       !ctx->FragmentProgram._Enabled) {
-      if (ctx->FragmentProgram._UseTexEnvProgram)
-        ctx->FragmentProgram._Active = GL_TRUE;
-   }
-#endif
-
    /* Let the driver know what's happening:
     */
    if (ctx->FragmentProgram._Current != prevFP && ctx->Driver.BindProgram) {