From b0e9c5797ba430c3fa43b414f6ee338112ba4466 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 24 Jul 2018 20:57:02 -0700 Subject: [PATCH] iris: fix for disabling ssbos --- src/gallium/drivers/iris/iris_state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 13371908e3e..c325d1e89f6 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1504,9 +1504,8 @@ iris_set_shader_buffers(struct pipe_context *ctx, struct iris_shader_state *shs = &ice->shaders.state[stage]; for (unsigned i = 0; i < count; i++) { - const struct pipe_shader_buffer *buffer = buffers ? &buffers[i] : NULL; - - if (buffer) { + if (buffers && buffers[i].buffer) { + const struct pipe_shader_buffer *buffer = &buffers[i]; struct iris_resource *res = (void *) buffer->buffer; pipe_resource_reference(&shs->ssbo[start_slot + i], &res->base); -- 2.30.2