[Bf-blender-cvs] [f6a174f] soc-2013-paint: Fix T41005: Seemingly random crashes with cycles rendering Fix T41013: OSL and Crash Fix T40989: Intermittent crash clicking material color selector

Sergey Sharybin noreply at git.blender.org
Sat Jul 12 12:44:48 CEST 2014


Commit: f6a174fd4778e1c39d14d3774600367c69a47a1b
Author: Sergey Sharybin
Date:   Thu Jul 10 17:42:38 2014 +0600
https://developer.blender.org/rBf6a174fd4778e1c39d14d3774600367c69a47a1b

Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector

Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.

===================================================================

M	intern/cycles/render/shader.cpp

===================================================================

diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index b968580..351efca 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -89,7 +89,7 @@ static void beckmann_table_rows(float *table, int row_from, int row_to)
 		int index_slope_x = 0;
 
 		for(int index_U = 0; index_U < BECKMANN_TABLE_SIZE; ++index_U) {
-			const float U = 0.0000001f + 0.9999998f * index_U / (float)(BECKMANN_TABLE_SIZE - 1);
+			const double U = 0.0000001 + 0.9999998 * index_U / (double)(BECKMANN_TABLE_SIZE - 1);
 
 			/* inverse CDF_P22_omega_i, solve Eq.(11) */
 			while(CDF_P22_omega_i[index_slope_x] <= U)




More information about the Bf-blender-cvs mailing list