Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29897

maybe we should document NSSupportsAutomaticGraphicsSwitching

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.8.x, 5.0.2
    • Documentation, GUI: OpenGL
    • None

    Description

      http://developer.apple.com/library/mac/#qa/qa1734/_index.html

      Q: The 15-inch and 17-inch MacBook Pro models shipped Early 2011 and after come standard with 2 GPUs, one integrated and one discrete. How can I run my OpenGL application on the integrated GPU if it is possible?

      A: Starting with OS X 10.7, you may choose to run your OpenGL application on the integrated GPU on the dual-GPU MacBook Pros shipped Early 2011 and after.

      By default, once your application creates an OpenGL context (by either calling OpenGL directly or an API that relies on OpenGL such as Core Animation, Core Image, etc), the MacBook Pro automatically switches to the higher-end discrete GPU for performance concerns and won't switch back until the application quits. On OS X 10.6 and earlier, you are not allowed to choose to run on the integrated GPU instead. Starting with OS X 10.7, you may utilize the integrated GPU on the MacBook Pros if you want to, for example, to save battery life.

      On OS X 10.7 and later, there is a new attribute called NSSupportsAutomaticGraphicsSwitching. To allow your OpenGL application to utilize the integrated GPU, you must add in the Info.plist of your application this key with a Boolean value of true, as shown in the following:

      Figure 1 Adding the NSSupportsAutomaticGraphicsSwitching key in Info.plist.

      Note: The NSSupportsAutomaticGraphicsSwitching key only works on the dual-GPU MacBook Pros that were shipped Early 2011 and after.
      Additionally, you must make sure that your application works correctly with multiple GPUs or else the system may continue forcing your application to use the discrete GPU. TN2229 Supporting Multiple GPUs on Mac OS X discusses in detail the required steps that you need to follow. You're highly recommended to check it out.

      Important: You must check that features you desire to use exist on the GPU you are using.
      Features that are available on the discrete GPU may not be available on the integrated GPU. You must check that features you desire to use exist on the GPU you are using. For a complete listing of supported features by GPU class, please see: OpenGL Capabilities Tables.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sorvig Morten Sørvig
              liaqi Liang Qi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes