st/mesa: fix mipmap generation for immutable textures with incomplete pyramids