Moving GPU flags to graphics_system.cc so all graphical exes get them.

This commit is contained in:
Ben Vanik 2015-12-27 10:21:11 -08:00
parent 629a75c162
commit 6b92c1a01e
2 changed files with 12 additions and 10 deletions

View File

@ -26,16 +26,6 @@
// Available graphics systems: // Available graphics systems:
#include "xenia/gpu/gl4/gl4_graphics_system.h" #include "xenia/gpu/gl4/gl4_graphics_system.h"
// Nvidia Optimus/AMD PowerXpress support
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
// http://stackoverflow.com/questions/17458803/amd-equivalent-to-nvoptimusenablement
#if XE_PLATFORM_WIN32
extern "C" {
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif // XE_PLATFORM_WIN32
// Available input drivers: // Available input drivers:
#include "xenia/hid/nop/nop_hid.h" #include "xenia/hid/nop/nop_hid.h"
#if XE_PLATFORM_WIN32 #if XE_PLATFORM_WIN32

View File

@ -22,6 +22,18 @@
namespace xe { namespace xe {
namespace gpu { namespace gpu {
// Nvidia Optimus/AMD PowerXpress support.
// These exports force the process to trigger the discrete GPU in multi-GPU
// systems.
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
// http://stackoverflow.com/questions/17458803/amd-equivalent-to-nvoptimusenablement
#if XE_PLATFORM_WIN32
extern "C" {
__declspec(dllexport) uint32_t NvOptimusEnablement = 0x00000001;
__declspec(dllexport) uint32_t AmdPowerXpressRequestHighPerformance = 1;
} // extern "C"
#endif // XE_PLATFORM_WIN32
GraphicsSystem::GraphicsSystem() : vsync_worker_running_(false) {} GraphicsSystem::GraphicsSystem() : vsync_worker_running_(false) {}
GraphicsSystem::~GraphicsSystem() = default; GraphicsSystem::~GraphicsSystem() = default;