mesa: use fp pointer in _tnl_InvalidateState()
authorBrian Paul <brianp@vmware.com>
Fri, 27 Feb 2009 22:42:35 +0000 (15:42 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 28 Feb 2009 18:09:13 +0000 (11:09 -0700)
src/mesa/tnl/t_context.c

index f0d31fdac3558196229a5380715c6eaf7beb6f32..f69b12204611b9ee1be18eb3b56406acf2bf3eb1 100644 (file)
@@ -149,13 +149,10 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
       /* fixed-function fog */
       RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
    }
-   else if (ctx->FragmentProgram._Current) {
-      struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
-      if (fp) {
-         if (fp->FogOption != GL_NONE || (fp->Base.InputsRead & FRAG_BIT_FOGC)) {
-            /* fragment program needs fog coord */
-            RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
-         }
+   else if (fp) {
+      if (fp->FogOption != GL_NONE || (fp->Base.InputsRead & FRAG_BIT_FOGC)) {
+         /* fragment program needs fog coord */
+         RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
       }
    }