[Bf-blender-cvs] [ad5f6a9] master: Cycles: Fix compilation error of CUDA kernel after recent decomposition changes
Sergey Sharybin
noreply at git.blender.org
Fri Oct 9 14:54:09 CEST 2015
Commit: ad5f6a95dd8c76773306b4e7f891b6e97fbbcd20
Author: Sergey Sharybin
Date: Fri Oct 9 17:53:29 2015 +0500
Branches: master
https://developer.blender.org/rBad5f6a95dd8c76773306b4e7f891b6e97fbbcd20
Cycles: Fix compilation error of CUDA kernel after recent decomposition changes
===================================================================
M intern/cycles/util/util_transform.h
===================================================================
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index 4450273..f01db64 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -348,9 +348,9 @@ ccl_device_inline Transform transform_quick_inverse(Transform M)
Transform R;
float det = M.x.x*(M.z.z*M.y.y - M.z.y*M.y.z) - M.y.x*(M.z.z*M.x.y - M.z.y*M.x.z) + M.z.x*(M.y.z*M.x.y - M.y.y*M.x.z);
if(det == 0.0f) {
- M[0][0] += 1e-8f;
- M[1][1] += 1e-8f;
- M[2][2] += 1e-8f;
+ M.x.x += 1e-8f;
+ M.y.y += 1e-8f;
+ M.z.z += 1e-8f;
det = M.x.x*(M.z.z*M.y.y - M.z.y*M.y.z) - M.y.x*(M.z.z*M.x.y - M.z.y*M.x.z) + M.z.x*(M.y.z*M.x.y - M.y.y*M.x.z);
}
det = (det != 0.0f)? 1.0f/det: 0.0f;
More information about the Bf-blender-cvs
mailing list