[Bf-committers] MSVC official builds, optimisation and render errors

Mathias Wein lynx at aspect-design.de
Tue Aug 7 20:02:12 CEST 2007


oops, picked wrong "from" email address...guess my first mail is in nirvana now

Eugene Reilly wrote:
> Hey Matt/Simon,
>
> Given my interest in optimizing on MSVC, I just tried the test file
> Matt posted using one of my own MSVC8 heavily optimized builds and got
> the following [1].  The dramatic black dots that I get in an official
> build [2] don't show up.  So if my builds using MSVC8 have somehow
> resolved this issue I am betting that other prjects in the official
> MSVC build might need the addition of /fp:fast.
>
> Simon, the render project is the only one you have using fp:fast
> right?  Have you tried it on more projects to see if that helps?  Like
> on the blender project?
>
> [1] http://www.geneome.net/images/dottest.jpg
> [2] http://www.geneome.net/images/baddottest.jpg
>
> M

I just tested the file on my linux build (trunk, R.11512), and i get black
areas too (well, actually they are not black but NaN).
In my opinion that means there is definitely a severe problem
with numeric stability somewhere.
OS is Ubuntu 7.04 x86_64, my compiler flags are:
'-pipe','-fPIC','-funsigned-char','-march=nocona','-fno-strict-aliasing','-O3',
'-DNDEBUG'
Compiler is gcc 4.2.1 (yes, not 4.1.2 from feisty, i am using latest gcc
currently)
CPU is a Core 2 Duo E6600.

The "black" areas are not as extreme as in the MSVC image shown, but
they are there:
http://lynx.aspect-design.de/blender/ray_blackdots.png

Unfortunately I don't know the render code either, but i meet such
situations in yafray regularly...and have a lot of "fun" fixing them...
fp:fast probably just allows non-IEEE754 conform things like flushing
denormals to zero (helps the Pentium 4 which has a penalty of several
hundred (!) CPU cycles per occurrence). So maybe the code handles
0.0 correctly, but not a denormal. As you probably know, a NaN turns
everything it touches into a NaN too, hence the whole image area
influenced by antialiasing is screwed by a single image sample...

Maybe i'll try '-ffast-math' later, to mimic the fp:fast "fix" of MSVC...

Mathias




More information about the Bf-committers mailing list