diff options
author | Rob Clark <robdclark@chromium.org> | 2021-08-23 17:18:57 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-10-04 15:10:07 +0000 |
commit | 9e74f458a8ae91ddc0e7d2e2f04e039a0a44dd7a (patch) | |
tree | 6a3916d6a0d3ce35eda1c869dec508c37d13c944 | |
parent | 96b37b9546fb6189b1e79599519eb7d2a3dc6125 (diff) |
freedreno: Handle cso==NULL in bind_sampler_states
This is a thing that comes up with clover.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_texture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 9aa9cddce61..0c2edd2f858 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 |