From: Christophe Bourcier Date: Thu, 19 Aug 2021 06:30:13 +0000 (+0200) Subject: Force high-performance graphics on dual-GPU systems X-Git-Tag: V9_8_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcbr%2Fforce_gpu_windows;p=modules%2Fgui.git Force high-performance graphics on dual-GPU systems --- diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 621fc466c..35e46458e 100644 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -77,6 +77,18 @@ #include #include +#ifdef WIN32 +extern "C" { +// For DWORD (see end of file) +#include "windef.h" +// Force high-performance graphics on dual-GPU systems + // http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf + __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; + // https://community.amd.com/thread/169965 + __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; +} +#endif + //! CORBA server for SALOME GUI session /*! * SALOME_Session_Server launches a SALOME session servant.