summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/prog_cache.c1
-rw-r--r--src/mesa/shader/program.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_cache.c b/src/mesa/shader/prog_cache.c
index d97e27dd6b..dd0241ef24 100644
--- a/src/mesa/shader/prog_cache.c
+++ b/src/mesa/shader/prog_cache.c
@@ -143,6 +143,7 @@ _mesa_delete_program_cache(GLcontext *ctx, struct gl_program_cache *cache)
{
clear_cache(ctx, cache);
_mesa_free(cache->items);
+ _mesa_free(cache);
}
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index f13aa18e95..fc53b5737c 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -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