From: Brian Paul Date: Tue, 6 Jul 2010 19:22:54 +0000 (-0600) Subject: gallivm: use trunc, not round in lp_build_nearest_mip_level() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e503af4baa2c709ae5743bb278b277d3faaba076;p=mesa.git gallivm: use trunc, not round in lp_build_nearest_mip_level() Fixes fd.o bug 28036 (piglit fbo-cubemap.c regression) --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index b8c1a7234bc..7baf5b6b15e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -961,7 +961,7 @@ lp_build_nearest_mip_level(struct lp_build_sample_context *bld, bld->builder, unit); /* convert float lod to integer */ - level = lp_build_iround(float_bld, lod); + level = lp_build_itrunc(float_bld, lod); /* clamp level to legal range of levels */ *level_out = lp_build_clamp(int_bld, level, zero, last_level);