projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af82ff5
)
gallivm: Add a note about log2 computation and denormalized numbers.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 20 Jul 2011 21:53:59 +0000
(14:53 -0700)
committer
José Fonseca
<jfonseca@vmware.com>
Sat, 23 Jul 2011 01:52:09 +0000
(18:52 -0700)
src/gallium/auxiliary/gallivm/lp_bld_arit.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 0c075bafb2c3c766ec413d56e3e4d691652ccf47..2be8598704e3e911c0e52d0eaa9a86371b551e89 100644
(file)
--- a/
src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/
src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@
-2465,6
+2465,12
@@
lp_build_log2_approx(struct lp_build_context *bld,
assert(type.floating && type.width == 32);
+ /*
+ * We don't explicitly handle denormalized numbers. They will yield a
+ * result in the neighbourhood of -127, which appears to be adequate
+ * enough.
+ */
+
i = LLVMBuildBitCast(builder, x, int_vec_type, "");
/* exp = (float) exponent(x) */