From 9194ee90c8e9952e6e09741789c24711495e2a72 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 2 Sep 2021 17:13:52 -0700 Subject: [PATCH] cso: Revert using FS sampler count for other stages at context unbind. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You shouldn't be asking drivers without VS texturing to unbind VS textures, which was breaking i915g. Fixes: 802e43a6b587 ("gallium/cso: add unbind mask for cso restore") Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/cso_cache/cso_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,