From d0279fc4b38c72356a341173317bcd45d9093f45 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 6 May 2008 12:24:04 +0100 Subject: gallium: Make sure to release texture surfaces (at the right time). --- src/mesa/state_tracker/st_cb_drawpixels.c | 3 ++- src/mesa/state_tracker/st_cb_texture.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 8c775ad8864..6ec3c343cda 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1038,12 +1038,13 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, } } + pipe_surface_reference(&psTex, NULL); + /* draw textured quad */ draw_textured_quad(ctx, dstx, dsty, ctx->Current.RasterPos[2], width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY, pt, stvp, stfp, color, GL_TRUE); - pipe_surface_reference(&psTex, NULL); pipe_texture_reference(&pt, NULL); } diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 2b587a08481..1a1ab99f238 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1095,6 +1095,8 @@ fallback_copy_texsubimage(GLcontext *ctx, pipe_put_tile_rgba(pipe, dest_surf, destX, destY, width, 1, data); } } + + screen->tex_surface_release(screen, &dest_surf); } -- cgit v1.2.3