st/mesa: fix mipmap generation for non-POW textures