summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-07-28 01:52:13 +0200
committerMarek Olšák <[email protected]>2017-07-28 08:03:24 +0200
commit5c1241268ba9b240cb79ab9a30c5255b176c83c9 (patch)
treec946ff0ddff9110d73ee3588623a831dd018b8b5 /src/mesa
parent800d1622096ca52b955bdfc20eb770b80ef15221 (diff)
st/mesa: release sampler views when redefining a texture in st_context_teximage
Noticed randomly. Cc: 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 62924b099e9..4b4d4ac86e4 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"
@@ -735,6 +736,7 @@ st_context_teximage(struct st_context_iface *stctxi,
pipe_resource_reference(&stImage->pt, tex);
stObj->surface_format = pipe_format;
+ st_texture_release_all_sampler_views(st, stObj);
stObj->needs_validation = true;
_mesa_dirty_texobj(ctx, texObj);