Skip to content

Instantly share code, notes, and snippets.

@statico
Last active November 8, 2024 14:50

Revisions

  1. Ian Langworth ☠ revised this gist Feb 19, 2016. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gpu.cpp
    Original file line number Diff line number Diff line change
    @@ -7,5 +7,4 @@ extern "C" {
    // http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
    __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
    }
    #endif
    Add Comment
    #endif
  2. Ian Langworth ☠ revised this gist Feb 19, 2016. No changes.
  3. Ian Langworth ☠ created this gist Feb 19, 2016.
    11 changes: 11 additions & 0 deletions gpu.cpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #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
    Add Comment