From: Kenneth Graunke Date: Wed, 25 Jul 2018 03:57:02 +0000 (-0700) Subject: iris: fix for disabling ssbos X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0e9c5797ba430c3fa43b414f6ee338112ba4466;p=mesa.git iris: fix for disabling ssbos --- 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);