Commit: e8730af87f3a105c07be7e19c09a85d7b9fd2fba
Author: Sergey Sharybin
Date: Mon Jan 12 17:13:50 2015 +0500
Branches: master
https://developer.blender.org/rBe8730af87f3a105c07be7e19c09a85d7b9fd2fba
Cycles: Fix compilation error on platforms without SSE support
Overview this in one of the previous BVH commits.
===================================================================
M intern/cycles/bvh/bvh_build.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 23c696e..da263c4 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -34,6 +34,21 @@
CCL_NAMESPACE_BEGIN
+#if !defined(__KERNEL_SSE2__)
+/* TODO(sergey): Move to some generic header so all code
+ * can use bitscan on non-SSE processors.
+ */
+ccl_device_inline int bitscan(int value)
+{
+ assert(value != 0);
+ int bit = 0;
+ while (value >>= 1) {
+ ++bit;
+ }
+ return bit;
+}
+#endif
+
/* BVH Build Task */
class BVHBuildTask : public Task {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs