iris: fix for disabling ssbos
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 25 Jul 2018 03:57:02 +0000 (20:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 13371908e3eab05205a40b9629dd6e44301c7199..c325d1e89f6f5fe0e2ccb35e9a829f179a831873 100644 (file)
@@ -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);