From ac09b0e0eb30f6691e35638f210c04ac0f867ea8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 May 2008 15:11:53 -0600 Subject: gallium: fix shader mem leak --- src/mesa/state_tracker/st_cb_bitmap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index edf4be172b..e95ff5e2e0 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -198,6 +198,10 @@ combined_bitmap_fragment_program(GLcontext *ctx) _mesa_combine_programs(ctx, &bitmap_prog->Base.Base, &stfp->Base.Base); stfp->bitmap_program->bitmap_sampler = sampler; + + /* done with this after combining */ + st_reference_fragprog(st, &bitmap_prog, NULL); + #if 0 { struct gl_program *p = &stfp->bitmap_program->Base.Base; -- cgit v1.2.3 From 7899ecdd6502a323b052f9ad4acd23cbb9ba88db Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 May 2008 15:12:26 -0600 Subject: gallium: replace assignment with pipe_texture_reference() --- src/mesa/state_tracker/st_gen_mipmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index 1a0e19c2f9..047743689d 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -197,6 +197,6 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->TexFormat = srcImage->TexFormat; stImage = (struct st_texture_image *) dstImage; - stImage->pt = pt; + pipe_texture_reference(&stImage->pt, pt); } } -- cgit v1.2.3