summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-27 15:02:08 +0200
committerMarek Olšák <[email protected]>2010-06-27 15:13:14 +0200
commit57c3f70018bc7cd44eafd55d8147691a3c109b91 (patch)
treeb7983a31027294d61b23e1f0d362bc727819d006 /src/gallium/auxiliary/util/u_blitter.c
parent0a19d57b845b269601c862193ed801b19aa4c2f1 (diff)
util: fix a memory leak in blitter
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 42d37ccfd6d..98d5a25a3f8 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -97,8 +97,6 @@ struct blitter_context_priv
/* Rasterizer state. */
void *rs_state;
- struct pipe_sampler_view *sampler_view;
-
/* Viewport state. */
struct pipe_viewport_state viewport;
@@ -260,8 +258,6 @@ void util_blitter_destroy(struct blitter_context *blitter)
if (ctx->sampler_state[i])
pipe->delete_sampler_state(pipe, ctx->sampler_state[i]);
- pipe_sampler_view_reference(&ctx->sampler_view, NULL);
-
pipe_resource_reference(&ctx->vbuf, NULL);
FREE(ctx);
}
@@ -734,8 +730,6 @@ void util_blitter_copy_region(struct blitter_context *blitter,
u_sampler_view_default_template(&viewTempl, src, src->format);
view = pipe->create_sampler_view(pipe, src, &viewTempl);
- pipe_sampler_view_reference(&ctx->sampler_view, view);
-
/* Set rasterizer state, shaders, and textures. */
pipe->bind_rasterizer_state(pipe, ctx->rs_state);
pipe->bind_vs_state(pipe, ctx->vs_tex);
@@ -771,6 +765,7 @@ void util_blitter_copy_region(struct blitter_context *blitter,
blitter_restore_CSOs(ctx);
pipe_surface_reference(&dstsurf, NULL);
+ pipe_sampler_view_reference(&view, NULL);
}
/* Clear a region of a color surface to a constant value. */