From 9e74f458a8ae91ddc0e7d2e2f04e039a0a44dd7a Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 23 Aug 2021 17:18:57 -0700 Subject: [PATCH] freedreno: Handle cso==NULL in bind_sampler_states This is a thing that comes up with clover. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 9aa9cdd..0c2edd2 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -56,7 +56,7 @@ bind_sampler_states(struct fd_texture_stateobj *tex, unsigned start, for (i = 0; i < nr; i++) { unsigned p = i + start; - tex->samplers[p] = hwcso[i]; + tex->samplers[p] = hwcso ? hwcso[i] : NULL; if (tex->samplers[p]) tex->valid_samplers |= (1 << p); else -- 2.7.4