Fusee icon indicating copy to clipboard operation
Fusee copied to clipboard

Request High-Performance GPU on multi GPU systems.

Open ASPePeX opened this issue 4 years ago • 3 comments

This is a problem on laptops.

https://stackoverflow.com/questions/17458803/amd-equivalent-to-nvoptimusenablement

ASPePeX avatar Nov 09 '21 13:11 ASPePeX

https://github.com/glfw/glfw/blob/0ccb690853e29ae38317d762f9deaa37ba101f4b/docs/compile.dox#L239

__GLFW_USE_HYBRID_HPG__ determines whether to export the NvOptimusEnablementandAmdPowerXpressRequestHighPerformance symbols, which force the use of the high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols need to be exported by the EXE to be detected by the driver, so the override will not work if GLFW is built as a DLL.

https://www.reddit.com/r/gamedev/comments/bk7xbe/psa_for_anyone_developing_a_gameengine_in_c/

someone pointed out: this won't have any effect if you code it into a dynamically loaded library. In that case, either supply a macro for library users to add it in, or link against libnvapi (fixes it on nv only.)


Therefore, I currently see no way to implement this easily. Suggestion: Wontfix & not our department

wrestledBearOnce avatar Nov 26 '21 13:11 wrestledBearOnce

Here are some more resources I found.

  1. Via Windows registry https://stackoverflow.com/a/59732413
  2. Using NvApi https://stackoverflow.com/a/17277085
  3. 🥲😨😱☠️ http://lucasmagder.com/blog/2014/05/exporting-data-symbols-in-c-for-nvidia-optimus/

ASPePeX avatar Nov 26 '21 17:11 ASPePeX

Bump, since it is now also handled inside windows. Maybe it is now easier to use.

ASPePeX avatar Mar 30 '23 07:03 ASPePeX