summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-12-02 02:57:30 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:12 +0000
commit1e8eb3ef80d07986738a33f599248e08fb78b2cf (patch)
tree51d1bb4d3f8985fd945a4417e6a8bad16f558157
parent27a11b6d26e4058ea16cdb25844982ab90d09877 (diff)
downloadexternal_mesa3d-1e8eb3ef80d07986738a33f599248e08fb78b2cf.zip
external_mesa3d-1e8eb3ef80d07986738a33f599248e08fb78b2cf.tar.gz
external_mesa3d-1e8eb3ef80d07986738a33f599248e08fb78b2cf.tar.bz2
radeonsi: fix incorrect FMASK checking in bind_sampler_states
Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 38d4859b9465146189c234cd372de9d3eee86a92)
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 9cc3f58..5ec9881 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -808,10 +808,10 @@ static void si_bind_sampler_states(struct pipe_context *ctx,
/* If FMASK is bound, don't overwrite it.
* The sampler state will be set after FMASK is unbound.
*/
- if (samplers->views.views[i] &&
- samplers->views.views[i]->texture &&
- samplers->views.views[i]->texture->target != PIPE_BUFFER &&
- ((struct r600_texture*)samplers->views.views[i]->texture)->fmask.size)
+ if (samplers->views.views[slot] &&
+ samplers->views.views[slot]->texture &&
+ samplers->views.views[slot]->texture->target != PIPE_BUFFER &&
+ ((struct r600_texture*)samplers->views.views[slot]->texture)->fmask.size)
continue;
memcpy(desc->list + slot * 16 + 12, sstates[i]->val, 4*4);