windows: prefer discrete GPU on hybrid-graphics systems
This commit is contained in:
parent
f4b3178eae
commit
0dbd045a31
2 changed files with 26 additions and 0 deletions
|
@ -123,6 +123,7 @@ set(SRCs
|
|||
|
||||
if(WIN32)
|
||||
set(SRCs ${SRCs}
|
||||
windows_misc.c
|
||||
vfs/syspath_win32.c)
|
||||
else()
|
||||
set(SRCs ${SRCs}
|
||||
|
|
25
src/windows_misc.c
Normal file
25
src/windows_misc.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* This software is licensed under the terms of the MIT-License
|
||||
* See COPYING for further information.
|
||||
* ---
|
||||
* Copyright (c) 2011-2017, Lukas Weber <laochailan@web.de>.
|
||||
* Copyright (c) 2012-2017, Andrei Alexeyev <akari@alienslab.net>.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/*
|
||||
* This is here for Windows laptops with hybrid graphics.
|
||||
* We tell the driver to prefer the fast GPU over the integrated one by default.
|
||||
*/
|
||||
|
||||
// Nvidia:
|
||||
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
|
||||
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
|
||||
// AMD:
|
||||
// https://community.amd.com/thread/169965
|
||||
// https://stackoverflow.com/questions/17458803/amd-equivalent-to-nvoptimusenablement
|
||||
|
||||
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
|
Loading…
Reference in a new issue