From: Marek Olšák Date: Sun, 1 Feb 2015 12:16:06 +0000 (+0100) Subject: radeonsi: fix a crash when binding a NULL sampler view list X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=82f64a68a4a621252111ff62fce4e85e14cdc822;p=mesa.git radeonsi: fix a crash when binding a NULL sampler view list Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 15b4da1e8c1..372782f49d9 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -404,7 +404,7 @@ static void si_set_sampler_views(struct pipe_context *ctx, for (i = 0; i < count; i++) { unsigned slot = start + i; - if (!views[i]) { + if (!views || !views[i]) { samplers->depth_texture_mask &= ~(1 << slot); samplers->compressed_colortex_mask &= ~(1 << slot); si_set_sampler_view(sctx, shader, slot, NULL, NULL);