Fix #36316: dots in cycles render on certain CPUs with 32 bit linux builds.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 2 Oct 2013 19:00:16 +0000 (19:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 2 Oct 2013 19:00:16 +0000 (19:00 +0000)
There is some sort of problem with the SSE2 code path, but I couldn't find
the cause, maybe a compiler bug due to the large amount of inlining? For
now I've disabled SSE2 optimizatons in 32 bit GCC builds.

intern/cycles/util/util_system.cpp
intern/ghost/intern/GHOST_SystemCocoa.mm

index 345c76bdfab4c47866b49b0326d2c9495a9438bc..40ec93b61248b449669b94d13f41c30ec07680a6 100644 (file)
@@ -116,7 +116,8 @@ int system_cpu_bits()
        return (sizeof(void*)*8);
 }
 
-#if defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(_M_IX86)
+/* SSE optimization disabled for now on 32 bit GCC, see bug #36316 */
+#if defined(__x86_64__) || defined(_M_X64) || ((defined(i386) || defined(_M_IX86)) && !defined(__GNUC__))
 
 struct CPUCapabilities {
        bool x64;
index 9cea4210769bc689eaa866082343756fd56863c3..770cfca69686ca6f361822fe856ffcc3cf32a231 100644 (file)
@@ -1025,6 +1025,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
        }
                switch (eventType) {
                        case GHOST_kEventWindowClose:
+                               // make window that should be closed frontmost
+                               [window->getCocoaWindow() makeKeyAndOrderFront:nil];
                                // check for index of mainwindow as it would quit blender without dialog and discard
                                if (window->getCocoaWindow() != [windowsList objectAtIndex:([windowsList count] - 1)]) {
                                        pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );