llvmpipe: Fix yet another copynpaste typo in lp_build_log2_approx.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 15 Dec 2009 14:46:43 +0000 (14:46 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 15 Dec 2009 14:46:43 +0000 (14:46 +0000)
Now fslight looks perfect.

src/gallium/drivers/llvmpipe/lp_bld_arit.c

index 08c86a3b926f2b90d6ae649fa19117574b481d58..847c2a34b1ff4af58e598c3b8c35843105322bfa 100644 (file)
@@ -1291,7 +1291,7 @@ lp_build_log2_approx(struct lp_build_context *bld,
                                     Elements(lp_build_log2_polynomial));
 
       /* This effectively increases the polynomial degree by one, but ensures that log2(1) == 0*/
-      logmant = LLVMBuildMul(bld->builder, logmant, LLVMBuildMul(bld->builder, mant, bld->one, ""), "");
+      logmant = LLVMBuildMul(bld->builder, logmant, LLVMBuildSub(bld->builder, mant, bld->one, ""), "");
 
       res = LLVMBuildAdd(bld->builder, logmant, logexp, "");
    }