diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-21 20:28:19 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-21 20:28:19 +0400 |
commit | 6f73e351ee2f5e8dbdd867d160549bd9304865d2 (patch) | |
tree | 8552c640bb4cbbe60539b0efa5a217406be78f87 /intern | |
parent | 3c32e07d7c7c6b7a066e512ec5f75e96c1c2f7e4 (diff) |
Cycles:
* Fix #29354: crash on branch file. Note that for best compatibility, you need
to save your files with one of the latest branch builds, since not all version
patching code was moved to trunk.
* Rename "Cycles" to "Cycles Render" in info header menu.
* Code tweaks to try to fix #29301. It's not a real solution though, I'm thinking
cause is extended precision for floats on some cpu's, used in one case but not
in the other, leading to bounding box intersection issue...
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/__init__.py | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_bvh.h | 6 | ||||
-rw-r--r-- | intern/cycles/util/util_math.h | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py index ccb04eea0a8..a7a8a74bf38 100644 --- a/intern/cycles/blender/addon/__init__.py +++ b/intern/cycles/blender/addon/__init__.py @@ -43,7 +43,7 @@ from cycles import presets class CyclesRender(bpy.types.RenderEngine): bl_idname = 'CYCLES' - bl_label = "Cycles" + bl_label = "Cycles Render" bl_use_shading_nodes = True def __init__(self): diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index a6ce0e9bfa8..cf8527b9760 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -99,6 +99,9 @@ static float get_node_output_value(BL::Node b_node, const string& name) static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping) { + if(!b_mapping) + return; + mapping->translation = get_float3(b_mapping.location()); mapping->rotation = get_float3(b_mapping.rotation()); mapping->scale = get_float3(b_mapping.scale()); @@ -110,6 +113,9 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping) static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_mapping) { + if(!b_mapping) + return; + mapping->translation = get_float3(b_mapping.location()); mapping->rotation = get_float3(b_mapping.rotation()); mapping->scale = get_float3(b_mapping.scale()); diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h index b5f59b94516..e98bb158f6e 100644 --- a/intern/cycles/kernel/kernel_bvh.h +++ b/intern/cycles/kernel/kernel_bvh.h @@ -97,11 +97,7 @@ __device_inline void bvh_node_intersect(KernelGlobals *kg, float c1loz = nz.z * idir.z - ood.z; float c1hiz = nz.w * idir.z - ood.z; - float c0min_x = min(c0lox, c0hix); - float c0min_y = min(c0loy, c0hiy); - float c0min_z = min(c0loz, c0hiz); - - float c0min = max4(c0min_x, c0min_y, c0min_z, 0.0f); + float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f); float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t); float c1lox = n1xy.x * idir.x - ood.x; float c1hix = n1xy.y * idir.x - ood.x; diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index c0dd627a606..2f9e00dbfcb 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -115,12 +115,12 @@ __device_inline double min(double a, double b) __device_inline float min4(float a, float b, float c, float d) { - return min(min(min(a, b), c), d); + return min(min(a, b), min(c, d)); } __device_inline float max4(float a, float b, float c, float d) { - return max(max(max(a, b), c), d); + return max(max(a, b), max(c, d)); } #ifndef __KERNEL_OPENCL__ |