summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-06 18:31:36 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-06 18:47:01 +0100
commitaf05f6157668b3c5e6fd73c3d743b11e619b9067 (patch)
treee381775391a680707298c0668d1792df952401b0 /src/gallium/auxiliary/gallivm/lp_bld_sample.c
parent012d57737b1b4e4263aa3414abe433195ff8a713 (diff)
gallivm: Combined ifloor & fract helper.
The only way to ensure we don't do redundant FP <-> SI conversions.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 9dee653eee..acd99741f1 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -319,7 +319,7 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
bld->builder, unit);
/* convert float lod to integer */
- level = lp_build_ifloor(float_bld, lod);
+ lp_build_ifloor_fract(float_bld, lod, &level, weight_out);
/* compute level 0 and clamp to legal range of levels */
*level0_out = lp_build_clamp(int_bld, level,
@@ -330,8 +330,6 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
*level1_out = lp_build_clamp(int_bld, level,
int_bld->zero,
last_level);
-
- *weight_out = lp_build_fract(float_bld, lod);
}