Reputation: 1
Related to Forcing Machine to Use Dedicated Graphics Card?
I want to use dedicated GPU (Intel Arc in my case) for the app.
For AMD / Nvidia we can select related dedicated GPUs by exporting special variables to be read by graphics runtime:
extern "C" {
// Starting with the Release 302 drivers, application developers can direct the
// Nvidia Optimus driver at runtime to use the High Performance Graphics to
// render any application - even those applications for which there is no
// existing application profile.
//
// See
// https://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// This will select the high performance AMD 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.
//
// See
// https://community.amd.com/t5/firepro-development/can-an-opengl-app-default-to-the-discrete-gpu-on-an-enduro/td-p/279440
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 0x00000001;
} // extern "C"
Do we have some way to ensure app without Intel graphics profile will start on dedicated Intel GPU?
It's possible to manually enumerate installed GPUs using IDXGIFactory6::EnumAdapterByGpuPreference
with DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE
flag and choose dedicated GPU(s) if present.
But if simpler way is possible, it will be handy.
Upvotes: 0
Views: 31