Advertisement

Use dedicated GPU in laptop (AMD)

Started by April 05, 2020 06:49 PM
2 comments, last by SyncViews 4 years, 9 months ago

Hi,

I have a laptop (Dell Inspiron) with an integrated GPU (Intel HD 5500) and a dedicated AMD GPU.

I have added the code from this StackOverflow answer to my game but it is still using my Intel GPU unless I manually set it in the AMD Radeon software. Obviously, I cannot expect that from the average customer.

Any ideas?

Edit: Now it's working and I don't understand why. And I don't know if it will work in the future or not.

Hi,

If you are using D3D, you can try to enumerate the adapter to check the VendorId in DXGI_ADAPTER_DESC1, then create the appropriate D3D device with AMD adapter. Common Vendor ID are:

  • Nvidia: 0x10DE
  • AMD: 0x1002, 0x1022
  • Intel: 0x163C, 0x8085, 0x8087
  • Warp: 0x1414

So your AMD GPU can be selected by checking the Vendor ID == 0x1002 || 0x1022.

This method works for my MSI laptop with RTX graphics card.

Advertisement

What of user options to force an application one way or another if your doing custom enumeration? Enumeration seems best if you do provide the option to select in game (or a launcher).

I had this noted down, but I don't have a laptop with an AMD GPU at the moment (and ideally should check works right with both AMD and Intel iGPU).

  __declspec(dllexport) DWORD NvOptimusEnablement = 1;
  __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;

As I recall, once it sees this there should then be a setting in the per-game graphics options on which way to go. My recollection was by default it would be set to the dGPU, and I hope they didn't change that, except maybe on a case by case basis (much older software should now be safe to default to the iGPU, for the power savings, not really paid attention though).

This topic is closed to new replies.

Advertisement