summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-01-13 11:36:10 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:12 -0800
commit15341778ba3b3eaffc43b033f8240ffd99c48379 (patch)
tree8a25f17b0d92df87b6249bfaefed1ea189be8860 /src/gallium/drivers/iris/iris_state.c
parent974229df46b611b741e7b6f0c0f4d0c7bcfe7c14 (diff)
iris: rework num textures to util_lastbit
Diffstat (limited to 'src/gallium/drivers/iris/iris_state.c')
-rw-r--r--src/gallium/drivers/iris/iris_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index e7801a698dc..2cf9c62587e 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3719,9 +3719,11 @@ iris_populate_binding_table(struct iris_context *ice,
}
}
- bt_assert(texture_start, info->num_textures > 0);
+ unsigned num_textures = util_last_bit(info->textures_used);
- for (int i = 0; i < info->num_textures; i++) {
+ bt_assert(texture_start, num_textures > 0);
+
+ for (int i = 0; i < num_textures; i++) {
struct iris_sampler_view *view = shs->textures[i];
uint32_t addr = view ? use_sampler_view(batch, view)
: use_null_surface(batch, ice);