summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-07-24 16:11:37 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:07 -0800
commitfd5ed7b46bb256ea6e1d0754c959fbf12ac7e39f (patch)
tree55c12680bc7501fc0374b8e90395d79bf0345ccf /src
parentbf795b024495831858082cd7bc714fe02b989068 (diff)
iris: shorten loop
num_ubos doesn't include Tim's magic UBO for regular uniforms, so +1
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index d75babee0d4..bc27de8f7d8 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -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;