diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-22 17:38:34 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-11-09 11:50:55 +0100 |
commit | 8d20c660a9831c367d98ed2fea25e5276e6466f2 (patch) | |
tree | afff3de5f94881690804b2eac6ba0646d7f887a7 /src/mesa/state_tracker/st_manager.c | |
parent | 0dcf30e55091a0c78fc84d98f5ea36286f3f1961 (diff) |
st/mesa: re-arrange st_finalize_texture
Move the early-out for surface-based textures earlier. This narrows the
scope of the locking added in a follow-up commit.
Fix one remaining case of initializing a surface-based texture
without properly finalizing it.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 48260df0c34..d27727ae8fb 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -48,6 +48,7 @@ #include "st_cb_fbo.h" #include "st_cb_flush.h" #include "st_manager.h" +#include "st_sampler_view.h" #include "state_tracker/st_gl_api.h" @@ -734,6 +735,8 @@ st_context_teximage(struct st_context_iface *stctxi, width = height = depth = 0; } + pipe_resource_reference(&stObj->pt, tex); + st_texture_release_all_sampler_views(st, stObj); pipe_resource_reference(&stImage->pt, tex); stObj->surface_format = pipe_format; |