20

For Intel+NVIDIA dual-GPU "Optimus" setups, an application can export NvOptimusEnablement as explained in OptimusRenderingPolicies.pdf. This option allows an application to ensure the use of the high-speed discrete GPU without needing profile updates or user interaction, which is usually desired for certain classes of applictions.

Is there an equivalent trick for systems with AMD GPUs (Windows-only is fine), and if so, what is it? I have not been able to find any concrete information via Googling; only a lot of people asking the same question on various forums with no answers, or SO articles on the NVIDIA trick with a "maybe AMD has something similar, I don't know" comment.

CassOnMars
  • 6,153
  • 2
  • 32
  • 47
Sean Middleditch
  • 2,517
  • 18
  • 31

2 Answers2

18

According to https://community.amd.com/thread/169965

extern "C" { __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; }

This will select the high performance GPU as long as no profile exists that assigns the application to another GPU.

Please make sure to use a 13.35 or newer driver. Older drivers do not support this.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Bob Smith
  • 260
  • 3
  • 9
  • Excellent news, glad to see they finally tackled this. For anyone else coming along, the 13.35 drivers are about a year old, so this feature may be hit-and-miss for end-users for a while still but it should be reliable for developers to use. – Sean Middleditch Jan 27 '15 at 22:07
  • My co-worker reports that it works with the latest (14.12) driver. Unfortunately, we upgraded the driver last week, so I can't confirm if any earlier driver works. – Bob Smith Jan 28 '15 at 03:33
  • Also, note the caveat that AMD puts on their drivers: _The AMD Catalyst Mobility driver supports only AMD Enduro platforms that are based on second and later generation AMD A-series APUs or third generation Intel Core family._ – Bob Smith Jan 28 '15 at 03:36
  • So if you have a Westmere or Sandy Bridge system, you might need a driver update from your laptop manufacturer (which might not be available), or a patched driver (google _leshcat_). – Bob Smith Jan 28 '15 at 03:45
1

This code will be ignored when you compile on non-windows machines:

#ifdef _WIN32
#include <windows.h>
extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
#endif
8Observer8
  • 868
  • 10
  • 17