Commit: 3d9cc4d3f174d01c96d65a4e9cd751699bcb8744
Author: Mike Erwin
Date:   Thu Aug 4 03:08:13 2016 -0400
Branches: blender2.8
https://developer.blender.org/rB3d9cc4d3f174d01c96d65a4e9cd751699bcb8744

support automatic GPU switching on Mac

First attempt. On my laptop (Intel + nVidia) Blender still switches to
nVidia at launch time.

===================================================================

M       intern/ghost/intern/GHOST_ContextCGL.mm
M       release/darwin/blender.app/Contents/Info.plist

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm 
b/intern/ghost/intern/GHOST_ContextCGL.mm
index 7642bad..6a39d76 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -209,8 +209,7 @@ static void makeAttribList(
                attribs.push_back(NSOpenGLPFAAccelerated);
        }
 
-       /* Removed to allow 10.4 builds, and 2 GPUs rendering is not used 
anyway */
-       //attribs.push_back(NSOpenGLPFAAllowOfflineRenderers);
+       attribs.push_back(NSOpenGLPFAAllowOfflineRenderers); // for automatic 
GPU switching
 
        attribs.push_back(NSOpenGLPFADepthSize);
        attribs.push_back((NSOpenGLPixelFormatAttribute) 32);
diff --git a/release/darwin/blender.app/Contents/Info.plist 
b/release/darwin/blender.app/Contents/Info.plist
index 0649a20..51d2146 100644
--- a/release/darwin/blender.app/Contents/Info.plist
+++ b/release/darwin/blender.app/Contents/Info.plist
@@ -47,5 +47,7 @@
        <string>NSApplication</string>
        <key>NSHighResolutionCapable</key>
        <true/>
+       <key>NSSupportsAutomaticGraphicsSwitching</key>
+       <true/>
 </dict>
 </plist>

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to