Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-01-12 15:13:50 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-12 15:14:40 +0300
commite8730af87f3a105c07be7e19c09a85d7b9fd2fba (patch)
tree185d210bbd8c677a0e1a369c27aa03eee7b08c27
parenta3bfaa481fbb9115b4d3255cfe371ca9d3b3564e (diff)
Cycles: Fix compilation error on platforms without SSE support
Overview this in one of the previous BVH commits.
-rw-r--r--intern/cycles/bvh/bvh_build.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 23c696ea6b2..da263c4945e 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 {