Some shaders use N textures but not bind these in consecutive
slots, so then we find texture accesses to indices that exceed the
number of textures and we assert crash. This happens with various
shaders from shader-db.
Fix that by looking at the largest binding used in the shader
and using that as the number of textures used.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28978>