Hybrid-graphics fix: exe-level discrete-GPU exports + SDK GPU selection
This commit is contained in:
parent
c613ffacc8
commit
e308e840b0
2 changed files with 12 additions and 1 deletions
11
src/main.cpp
11
src/main.cpp
|
|
@ -8,6 +8,17 @@
|
|||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
// 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;
|
||||
|
|
|
|||
2
third_party/rexglue-sdk
vendored
2
third_party/rexglue-sdk
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 96de5455f2eb87f183dfc9459780008780ee245c
|
||||
Subproject commit ef551194076972fa6961a849f86d628f7d03000a
|
||||
Loading…
Add table
Reference in a new issue