summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 91466842c2e..dda3c205e22 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1187,11 +1187,12 @@ cso_set_sampler_views(struct cso_context *ctx,
pipe_sampler_view_reference(&info->views[i], NULL);
}
- info->nr_views = count;
-
/* bind the new sampler views */
- ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count,
+ ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0,
+ MAX2(info->nr_views, count),
info->views);
+
+ info->nr_views = count;
}