agx: Use textures_used, not num_textures

The latter doesn't account for holes. Fixes regression in Neverball on Asahi.

Fixes: e607a89f ("mesa/main: ff-fragshader to nir")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23480>
This commit is contained in:
Alyssa Rosenzweig 2023-05-25 13:22:42 -04:00 committed by Marge Bot
parent f1c2ea99e2
commit 70b8babe3c

View file

@ -2405,7 +2405,7 @@ agx_compile_shader_nir(nir_shader *nir, struct agx_shader_key *key,
out->depth_layout = layout;
}
out->nr_bindful_textures = nir->info.num_textures;
out->nr_bindful_textures = BITSET_LAST_BIT(nir->info.textures_used);
/* Late clip plane lowering created discards */
if (nir->info.stage == MESA_SHADER_FRAGMENT) {