[Bf-blender-cvs] [5e216a6] master: 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
Thu Jul 10 15:04:58 CEST 2014


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

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