diff options
author | Younes Manton <[email protected]> | 2010-05-24 13:44:06 -0400 |
---|---|---|
committer | Younes Manton <[email protected]> | 2010-05-24 13:44:06 -0400 |
commit | 2798958d896dfc9dc6244bc3dce3db8a2f50b589 (patch) | |
tree | 22dfb4ca97729ac66019beb286d188df35f01325 /src/gallium | |
parent | 0a51e8633287b97b4d88e0cb553854535f2fa5e7 (diff) |
vl: Dec sampler view refs instead of destroying them.
Gets rid of a bunch of double frees and the crash at shutdown.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index b128af19ba3..8203bf79ee0 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -258,14 +258,14 @@ texview_map_delete(const struct keymap *map, const void *key, void *data, void *user) { - struct pipe_context *pipe = (struct pipe_context*)user; + struct pipe_sampler_view *sv = (struct pipe_sampler_view*)data; assert(map); assert(key); assert(data); assert(user); - pipe->sampler_view_destroy(pipe, data); + pipe_sampler_view_reference(&sv, NULL); } bool vl_compositor_init(struct vl_compositor *compositor, struct pipe_context *pipe) @@ -506,7 +506,7 @@ static void draw_layers(struct vl_compositor *c, c->pipe->draw_arrays(c->pipe, PIPE_PRIM_TRIANGLES, i * 6, 6); if (delete_view) { - c->pipe->sampler_view_destroy(c->pipe, surface_view); + pipe_sampler_view_reference(&surface_view, NULL); } } } diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c index 1e9a02c270d..bafe4861fa5 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c @@ -675,7 +675,7 @@ cleanup_buffers(struct vl_mpeg12_mc_renderer *r) pipe_resource_reference(&r->vs_const_buf, NULL); for (i = 0; i < 3; ++i) { - r->pipe->sampler_view_destroy(r->pipe, r->sampler_views.all[i]); + pipe_sampler_view_reference(&r->sampler_views.all[i], NULL); r->pipe->delete_vertex_elements_state(r->pipe, r->vertex_elems_state.all[i]); pipe_resource_reference(&r->vertex_bufs.all[i].buffer, NULL); pipe_resource_reference(&r->textures.all[i], NULL); @@ -1311,14 +1311,14 @@ texview_map_delete(const struct keymap *map, const void *key, void *data, void *user) { - struct pipe_context *pipe = (struct pipe_context*)user; + struct pipe_sampler_view *sv = (struct pipe_sampler_view*)data; assert(map); assert(key); assert(data); assert(user); - pipe->sampler_view_destroy(pipe, data); + pipe_sampler_view_reference(&sv, NULL); } bool |