diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 9793131d4f1..97b4da0afdb 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -325,7 +325,8 @@ void cso_unbind_context(struct cso_context *ctx) break; } - int maxsam = ctx->max_fs_samplerviews; + int maxsam = scr->get_shader_param(scr, sh, + PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS); int maxview = scr->get_shader_param(scr, sh, PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS); int maxssbo = scr->get_shader_param(scr, sh,