»Selecting the Best Graphics Device to Run a 3D Intensive Application
Selecting the Best Graphics Device to Run a 3D Intensive Application
Originally posted:
Ken Mitchell
Many gaming and workstation laptops are available with both (1) integrated power saving and (2) discrete high performance graphics devices. Unfortunately, 3D intensive application performance may suffer greatly if the best graphics device is not selected. For example, a game may run at 30 Frames Per Second (FPS) on the integrated GPU rather than the 60 FPS the discrete GPU would enable. As a developer you can easily fix this problem by adding only one line to your executable’s source code:
Yes, it’s that easy. This line will ensure that the high-performance graphics device is chosen when running your application.
Requirements
It is worth noting some simple requirements for this method to work:
The graphics-intensive application should use either DirectX® or OpenGL®
The laptop should be a legacy PowerXpress or modern Hybrid Graphics laptop with integrated and discrete graphics devices
Executable should be statically linked. Adding the above piece of code in a dynamically linked library will not work.
Generally, modern PC games meet all of the above requirements with few exceptions for light workloads such as MineSweeper and Solitaire.
However, these instructions do not apply to Vulkan™ or OpenCL™ applications. In short, the AMD Vulkan™ Installable Client Driver (ICD) sorts its devices in descending order by a performance heuristic function. Conversely, the AMD OpenCL™ ICD does not sort its devices.
Radeon Additional Settings
Have you ever noticed higher performance while your laptop was Plugged-In to AC wall power? Surprisingly, this may be due to your Radeon Additional Settings!
Switchable Graphics Global Settings
First, users may assign one of the following Global Application Settings to Battery or Plugged-In Power Sources:
Force Power-Saving Graphics
Optimize Power Savings (Battery Default)
Optimize Performance (Plugged-In Default)
Maximize Performance
Consequently, these settings have a very large impact on battery life. Thus, I do not recommend changing these settings.
Switchable Graphics Application Settings
Second, users may assign one of the following Graphics Settings to an application:
High Performance
Power Saving
Based on Power Source
Not Assigned
Conveniently, the graphics driver includes a list of common games and applications — most of which can be changed by the user. Moreover, the user can add applications.
Most noteworthy, the application setting lookup uses only the executable file name, excluding its path. Thus, it is best to avoid generic names or names of other known common applications such as “game.exe”, “player.exe”, or “launcher.exe”.
Thankfully, if the application is “Not Assigned”, then the graphics driver will still test if the executable requested high performance graphics. In practice, the driver searches for “AmdPowerXpressRequestHighPerformance” in the executable’s export table. In fact, you can easily test this yourself using a Microsoft Visual Studio tools command prompt:
For simplicity, below is a table for which GPU is selected based global and application settings:
Global Setting
Application Setting
Selected GPU
Force Power-Saving Graphics
Not Assigned
Power-Saving
High Performance
Power-Saving
Power Saving
Power-Saving
Based on Power Source
Power-Saving
Optimize Power Savings
Not Assigned
Power-Saving
High Performance
High Performance
Power Saving
Power-Saving
Based on Power Source
Power-Saving
Optimize Performance
Not Assigned
Power-Saving
High Performance
High Performance
Power Saving
Power-Saving
Based on Power Source
High Performance
Maximize Performance
Not Assigned
High Performance
High Performance
High Performance
Power Saving
Power-Saving
Based on Power Source
High Performance
Finally, I have observed applications whose performance increased by 80% simply by adding AmdPowerXpressRequestHighPerformance. Thus, I highly recommend this solution.
Ken Mitchell
Ken Mitchell is a Member of Technical Staff in the Radeon Technologies Group/AMD ISV Game Engineering team where he focuses on helping game developers utilize AMD CPU cores efficiently. Previously, he was tasked with automating & analyzing PC applications for performance projections of future AMD products. He studied computer science at the University of Texas at Austin.
Links to third party sites are provided for convenience and unless explicitly stated, AMD is not responsible for the contents of such linked sites and no endorsement is implied.