free program caches
authorBrian <brian.paul@tungstengraphics.com>
Wed, 26 Dec 2007 13:57:24 +0000 (06:57 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 1 Jan 2008 17:21:21 +0000 (10:21 -0700)
src/mesa/shader/program.c

index f13aa18e9501d8076f369674f23d9e057d62ddaa..fc53b5737cb8a5df172d70e641f68f0d1cae6e63 100644 (file)
@@ -101,6 +101,7 @@ _mesa_free_program_data(GLcontext *ctx)
       if (ctx->VertexProgram.Current->Base.RefCount <= 0)
          ctx->Driver.DeleteProgram(ctx, &(ctx->VertexProgram.Current->Base));
    }
+   _mesa_delete_program_cache(ctx, ctx->VertexProgram.Cache);
 #endif
 #if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
    if (ctx->FragmentProgram.Current) {
@@ -108,6 +109,7 @@ _mesa_free_program_data(GLcontext *ctx)
       if (ctx->FragmentProgram.Current->Base.RefCount <= 0)
          ctx->Driver.DeleteProgram(ctx, &(ctx->FragmentProgram.Current->Base));
    }
+   _mesa_delete_program_cache(ctx, ctx->FragmentProgram.Cache);
 #endif
    /* XXX probably move this stuff */
 #if FEATURE_ATI_fragment_shader