summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-08 13:36:18 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-08 14:06:38 +0100
commit0d84b64a4f4cf4dd9c884b5d47cc9d1df9bf8e79 (patch)
tree23ca2030e00f324a1ebdd57544e45d7c9f6b4baf /src
parent4f2e2ca4e39a4c6fe11739832203a36877bdf0d8 (diff)
gallivm: Use lp_build_ifloor_fract for lod computation.
Forgot this one before.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index c4ed79e0e7..d6b50fbe5f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -359,11 +359,9 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
}
if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) {
- LLVMValueRef ipart = lp_build_ifloor(float_bld, lod);
- lp_build_name(ipart, "lod_ipart");
- *out_lod_ipart = ipart;
- ipart = LLVMBuildSIToFP(bld->builder, ipart, float_bld->vec_type, "");
- *out_lod_fpart = LLVMBuildFSub(bld->builder, lod, ipart, "lod_fpart");
+ lp_build_ifloor_fract(float_bld, lod, out_lod_ipart, out_lod_fpart);
+ lp_build_name(*out_lod_ipart, "lod_ipart");
+ lp_build_name(*out_lod_fpart, "lod_fpart");
}
else {
*out_lod_ipart = lp_build_iround(float_bld, lod);