summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_state_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_sampler.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index 70d34ed790c..b6a97c13c41 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -100,6 +100,7 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
enum pipe_shader_type shader,
unsigned start,
unsigned num,
+ unsigned unbind_num_trailing_slots,
struct pipe_sampler_view **views)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -134,6 +135,12 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
memset(sp_sviewdst, 0, sizeof(*sp_sviewsrc));
}
}
+ for (; i < num + unbind_num_trailing_slots; i++) {
+ struct pipe_sampler_view **pview = &softpipe->sampler_views[shader][start + i];
+ pipe_sampler_view_reference(pview, NULL);
+ sp_tex_tile_cache_set_sampler_view(softpipe->tex_cache[shader][start + i],
+ NULL);
+ }
/* find highest non-null sampler_views[] entry */