diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 6806f455f28..18d97ecea17 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -5345,8 +5345,7 @@ emit_instructions(struct ir3_context *ctx) * it is write-only we don't have to count it, but after lowering derefs * is too late to compact indices for that. */ - ctx->so->num_samp = - BITSET_LAST_BIT(ctx->s->info.textures_used) + ctx->s->info.num_images; + ctx->so->num_samp = BITSET_LAST_BIT(ctx->s->info.textures_used); /* Save off clip+cull information. Note that in OpenGL clip planes may * be individually enabled/disabled, and some gens handle lowering in