iris: shorten loop
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 24 Jul 2018 23:11:37 +0000 (16:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
num_ubos doesn't include Tim's magic UBO for regular uniforms, so +1

src/gallium/drivers/iris/iris_state.c

index d75babee0d4867b2a879b8d46f31be03e91f35a5..bc27de8f7d84fc79ad5d9679e4ae44dad009bedc 100644 (file)
@@ -2672,8 +2672,7 @@ iris_populate_binding_table(struct iris_context *ice,
                          : use_null_surface(batch, ice);
    }
 
-   // XXX: want the number of BTE's to shorten this loop
-   for (int i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
+   for (int i = 0; i < 1 + info->num_ubos; i++) {
       struct iris_const_buffer *cbuf = &shs->constbuf[i];
       if (!cbuf->surface_state.res)
          break;