The ctx->_TexEnvProgram that's allocated in update_state() doesn't seem to
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 24 May 2006 03:34:17 +0000 (03:34 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 24 May 2006 03:34:17 +0000 (03:34 +0000)
be needed (it's set in texenvprogram.c) and is a memory leak according to
valgrind.
Disable with #if 0 / #endif

src/mesa/main/state.c

index 34eb2c3b8a105bc01e9793ef60bc1d0df4418fab..dbf0834df45ea2a5395a13bf3735d8893a793389 100644 (file)
@@ -946,11 +946,12 @@ update_program(GLcontext *ctx)
    ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled;
 
    if (ctx->_MaintainTexEnvProgram && !ctx->FragmentProgram._Enabled) {
+#if 0
       if (!ctx->_TexEnvProgram)
         ctx->_TexEnvProgram = (struct fragment_program *)
            ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
-
       ctx->FragmentProgram._Current = ctx->_TexEnvProgram;
+#endif
 
       if (ctx->_UseTexEnvProgram)
         ctx->FragmentProgram._Active = GL_TRUE;