Blender Git Loki

Git Commits -> Revision 4d38932

Revision 4d38932 by Sergey Sharybin (master)
May 9, 2017, 15:07 (GMT)
Cycles: Use more stable version of integer square root function

Old code was working quite unreliable in combination with fast math
flag, especially when compiling with Clang. It seems we were hitting
result of the following bug submitted to Clang [1].

Basically, it was happening so that (int)sqrtf(64) was 7 when Cycles
is built with Clang but was correct 8 when built with GCC.

This commit works this around. Annoying, but don't see other way to
keep sampling pattern the same for Clang and GCC.

[1] https://bugs.llvm.org//show_bug.cgi?id=24063

Commit Details:

Full Hash: 4d38932cb430139975fd1fc13436317b2a16fdc4
Parent Commit: e20eb2d
Lines Changed: +16, -5

1 Modified Path:

/intern/cycles/kernel/kernel_jitter.h (+16, -5) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021