projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
521e4b9
)
mesa: Return -FLT_MAX instead of 0 for LG2(0).
author
Vinson Lee
<vlee@vmware.com>
Thu, 1 Oct 2009 19:33:20 +0000
(13:33 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 1 Oct 2009 19:33:20 +0000
(13:33 -0600)
lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).
src/mesa/shader/prog_execute.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/prog_execute.c
b/src/mesa/shader/prog_execute.c
index 69b81e724a20216bf5eeb27acd0379a68914ce20..192d39aed1ee40ac7f3e4bf8aa8c8b68f6e5fb84 100644
(file)
--- a/
src/mesa/shader/prog_execute.c
+++ b/
src/mesa/shader/prog_execute.c
@@
-939,7
+939,7
@@
_mesa_execute_program(GLcontext * ctx,
/* The fast LOG2 macro doesn't meet the precision requirements.
*/
if (a[0] == 0.0F) {
- val =
0.0F
;
+ val =
-FLT_MAX
;
}
else {
val = log(a[0]) * 1.442695F;