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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-04 20:12:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-04 20:12:37 +0400
commit7c9d99334705498932a272f68f74121953d4974a (patch)
tree1225c588ddc680f7edede44d9475c24150ee929e /intern/cycles/util/util_system.cpp
parent52303db217e37a17313db9f38931c144bd7e8bbe (diff)
Fix cycles intersection issue with overlapping faces on windows 32 bit and CPU
without SSE3 support, due to 80 bit precision float register being used for one bounding box but not the one next to it.
Diffstat (limited to 'intern/cycles/util/util_system.cpp')
-rw-r--r--intern/cycles/util/util_system.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
index 2d9f0fffae6..4fda090e09e 100644
--- a/intern/cycles/util/util_system.cpp
+++ b/intern/cycles/util/util_system.cpp
@@ -136,7 +136,7 @@ struct CPUCapabilities {
bool fma4;
};
-bool system_cpu_support_optimized()
+static CPUCapabilities& system_cpu_capabilities()
{
static CPUCapabilities caps;
static bool caps_init = false;
@@ -182,7 +182,18 @@ bool system_cpu_support_optimized()
caps_init = true;
}
- /* optimization flags use these */
+ return caps;
+}
+
+bool system_cpu_support_sse2()
+{
+ CPUCapabilities& caps = system_cpu_capabilities();
+ return caps.sse && caps.sse2;
+}
+
+bool system_cpu_support_sse3()
+{
+ CPUCapabilities& caps = system_cpu_capabilities();
return caps.sse && caps.sse2 && caps.sse3;
}