mesa: Reuse _mesa_max_texture_levels() instead of open-coding it.