llvmpipe: Factor out and optimize the input interpolation.