From: Roland Scheidegger Date: Fri, 8 Oct 2010 16:43:49 +0000 (+0200) Subject: gallivm: replace sub/floor/ifloor combo with ifloor_fract X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e17e0c4ffc0f1d1b9170c5574606172998c8917;p=mesa.git gallivm: replace sub/floor/ifloor combo with ifloor_fract --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index b8cf938acfe..90fd99067b3 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -202,11 +202,7 @@ lp_build_coord_mirror(struct lp_build_sample_context *bld, struct lp_build_context *int_coord_bld = &bld->int_coord_bld; LLVMValueRef fract, flr, isOdd; - /* fract = coord - floor(coord) */ - fract = lp_build_sub(coord_bld, coord, lp_build_floor(coord_bld, coord)); - - /* flr = ifloor(coord); */ - flr = lp_build_ifloor(coord_bld, coord); + lp_build_ifloor_fract(coord_bld, coord, &flr, &fract); /* isOdd = flr & 1 */ isOdd = LLVMBuildAnd(bld->builder, flr, int_coord_bld->one, "");