mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
gallivm: Fix and enable the extra Newton/Raphson step in lp_build_rcp().
Thanks to Michal for spotting this.
This commit is contained in:
parent
457378e031
commit
b481a1237e
1 changed files with 2 additions and 2 deletions
|
|
@ -1274,7 +1274,7 @@ lp_build_rcp(struct lp_build_context *bld,
|
||||||
* when we have a better system in place to track minimum precision.
|
* when we have a better system in place to track minimum precision.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
/*
|
/*
|
||||||
* Do one Newton-Raphson step to improve precision:
|
* Do one Newton-Raphson step to improve precision:
|
||||||
*
|
*
|
||||||
|
|
@ -1291,7 +1291,7 @@ lp_build_rcp(struct lp_build_context *bld,
|
||||||
res = LLVMBuildFSub(bld->builder, two, res, "");
|
res = LLVMBuildFSub(bld->builder, two, res, "");
|
||||||
res = LLVMBuildFMul(bld->builder, res, rcp_a, "");
|
res = LLVMBuildFMul(bld->builder, res, rcp_a, "");
|
||||||
|
|
||||||
return rcp_a;
|
return res;
|
||||||
#else
|
#else
|
||||||
return lp_build_intrinsic_unary(bld->builder, "llvm.x86.sse.rcp.ps", lp_build_vec_type(type), a);
|
return lp_build_intrinsic_unary(bld->builder, "llvm.x86.sse.rcp.ps", lp_build_vec_type(type), a);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue