[Mesa-dev] [PATCH 05/10] radeonsi: fix a crash when binding a NULL sampler view list

Marek Olšák maraeo at gmail.com
Sun Feb 1 09:37:02 PST 2015


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_descriptors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 15b4da1..372782f 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);
-- 
2.1.0



More information about the mesa-dev mailing list