From e63fec29a1bde71a707ee6ac89763896e33e3c0c Mon Sep 17 00:00:00 2001 From: Serge Martin Date: Sun, 6 Dec 2015 15:32:15 +0100 Subject: freedreno: fix bind_sampler_states when hwcso is NULL src/gallium/tests/trivial/compute.c expects samplers to be cleaned when the samplers list is NULL. Like in radeon, the function behave like when the number of samplers parameter is set to 0. [small s/hwsco/hwcso/ typo fix] Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/freedreno/a3xx') diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 99ae99ea0c1..9d54d41e1ad 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -149,6 +149,9 @@ fd3_sampler_states_bind(struct pipe_context *pctx, uint16_t saturate_s = 0, saturate_t = 0, saturate_r = 0; unsigned i; + if (!hwcso) + nr = 0; + for (i = 0; i < nr; i++) { if (hwcso[i]) { struct fd3_sampler_stateobj *sampler = -- cgit v1.2.3