diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-04 20:12:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-04 20:12:37 +0400 |
commit | 7c9d99334705498932a272f68f74121953d4974a (patch) | |
tree | 1225c588ddc680f7edede44d9475c24150ee929e /intern/cycles/util/util_system.cpp | |
parent | 52303db217e37a17313db9f38931c144bd7e8bbe (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.cpp | 15 |
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; } |