Cycles: Add assert check to shader closure merge function
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 13 Jun 2015 16:17:16 +0000 (18:17 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 13 Jun 2015 16:17:16 +0000 (18:17 +0200)
intern/cycles/kernel/kernel_shader.h

index 1d94de873858370c918bd1f31358915c9322117b..077c86fe38e382d59f0712ad36312927075db06d 100644 (file)
@@ -480,6 +480,7 @@ ccl_device void shader_merge_closures(ShaderData *sd)
                        }
 
                        sd->num_closure--;
+                       kernel_assert(sd->num_closure >= 0);
                        j--;
                }
        }