Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
// Use discrete GPU by default. | |
extern "C" { | |
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf | |
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; | |
| |
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/ | |
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; | |
} | |
#endif |
Here is another AMD link: https://gpuopen.com/amdpowerxpressrequesthighperformance/
Dumb question: Are these relevant in Linux (or OSX for that matter)?
No, this is not relevant for anything other than Windows.
More dumb question: There's nothing similar for Intel (integrated HD Graphics), right?
More dumb question: can I do this somehow from a managed C# application? It does Pinvoke for the purpose of calling native algos, but how would I extern "C" { __declspec(dllexport) ... }
such properties to be picked up by the drivers? Can any of my native DLLs export this and it will be picked up?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sadly, that AMD link has expired and I haven't found a better reference anywhere, other than this forum post: https://community.amd.com/thread/169965