diff options
author | Christian König <[email protected]> | 2014-03-23 17:01:38 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2014-03-26 12:06:43 +0100 |
commit | d117ddbe31fdbe79c871343358e2551593a1b18c (patch) | |
tree | 4faaedc8f9f2b69cd6dd183d1e3ded084339fd17 /src/mesa/state_tracker/st_texture.c | |
parent | 3b421daf32e5941801e0efb162037de4d8ca1f1d (diff) |
st/mesa: fix sampler view handling with shared textures v4
Release the references to the sampler views before
destroying the pipe context.
v2: remove TODO and unrelated change
v3: move to st_texture.[ch], rename callback, add comment
v4: fix rebase mess up and add further cleanups
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Cc: "10.0 10.1" <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index b5ccc76d4b9..a3b345356e1 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -412,3 +412,10 @@ st_create_color_map_texture(struct gl_context *ctx) return pt; } +void +st_texture_release_sampler_view(struct st_context *st, + struct st_texture_object *stObj) +{ + if (stObj->sampler_view && stObj->sampler_view->context == st->pipe) + pipe_sampler_view_reference(&stObj->sampler_view, NULL); +} |