st/mesa: fix mipmap generation bug