swrast: move texture_slices() calls out of loops