iris: Use program's num textures not the state tracker's bound
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 23 Nov 2018 19:47:55 +0000 (11:47 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
the state tracker might bind more textures than the program is using.

src/gallium/drivers/iris/iris_state.c

index a13e6cd0b0e41d5f134a6b76fb9c21f5cd8f2171..635d2d60ed60b3302f6e3c20c222527ab420f1e8 100644 (file)
@@ -3637,7 +3637,7 @@ iris_populate_binding_table(struct iris_context *ice,
    //assert(prog_data->binding_table.texture_start ==
           //(ice->state.num_textures[stage] ? s : 0xd0d0d0d0));
 
-   for (int i = 0; i < shs->num_textures; i++) {
+   for (int i = 0; i < info->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);