From c4ea8375c4061dfd6a72775bbb7614c0901e4ef8 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 26 Jul 2025 14:27:44 -0700 Subject: [PATCH] ir3: Don't count images in num_samp The new style reg packers noticed us overflowing SP_xS_CONFIG.num_samp. Even if we lower image loads to isam, they are using the bindless descriptors, so no reason to count them here. Fixes: spec@arb_shader_image_load_store@max-images Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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