From e308e840b0486c9f9c166d6441e6f3e5fefd897b Mon Sep 17 00:00:00 2001 From: mchughalex <25671999+mchughalex@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:51:24 +0100 Subject: [PATCH] Hybrid-graphics fix: exe-level discrete-GPU exports + SDK GPU selection --- src/main.cpp | 11 +++++++++++ third_party/rexglue-sdk | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index f79bb10..b02f38b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,6 +8,17 @@ #include #include +// NVIDIA Optimus / AMD PowerXpress discrete-GPU opt-in. The drivers only read +// these from the executable's export table; the copies in rexruntime.dll are +// invisible to them, which left hybrid-graphics laptops rendering on the +// integrated GPU. They must live here, in the exe image itself. +#if defined(_WIN32) +extern "C" { +__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; +__declspec(dllexport) unsigned long AmdPowerXpressRequestHighPerformance = 1; +} +#endif + class Skate3PureApp : public Skate3BaseApp { public: using Skate3BaseApp::Skate3BaseApp; diff --git a/third_party/rexglue-sdk b/third_party/rexglue-sdk index 96de545..ef55119 160000 --- a/third_party/rexglue-sdk +++ b/third_party/rexglue-sdk @@ -1 +1 @@ -Subproject commit 96de5455f2eb87f183dfc9459780008780ee245c +Subproject commit ef551194076972fa6961a849f86d628f7d03000a