Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint to prioritize AMD discrete GPU #305

Open
adriengivry opened this issue Jun 15, 2024 · 1 comment
Open

Add hint to prioritize AMD discrete GPU #305

adriengivry opened this issue Jun 15, 2024 · 1 comment
Labels
Bug Something isn't working Feature New feature to the engine Good First Issue An easy issue for new contributors

Comments

@adriengivry
Copy link
Owner

Problem this feature should fix
Overload isn't setting the appropriate hint for the application to prioritizing using an AMD discrete GPU if available.

Expected solution
Update our FORCE_DEDICATED_GPU macro to add:

// Hint that the discrete gpu should be enabled on optimus/enduro systems
// NVIDIA docs: http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
// AMD forum post: http://devgurus.amd.com/thread/169965
extern "C"
{
    __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
    __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // <-- Add this line
}
@adriengivry adriengivry added Bug Something isn't working Feature New feature to the engine Good First Issue An easy issue for new contributors labels Jun 15, 2024
@adriengivry adriengivry changed the title Add hint to force AMD discrete GPU Add hint to prioritize AMD discrete GPU Jun 15, 2024
@eXpl0it3r
Copy link

eXpl0it3r commented Jul 29, 2024

Relates to #40

Can also just be: DWORD NvOptimusEnablement = 1

SFML uses unsigned int. Not sure it matters.

https://github.com/SFML/SFML/blob/b50f62da43e0d7dc2b2855730e78a4ccf5048249/include/SFML/GpuPreference.hpp#L62-L70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feature New feature to the engine Good First Issue An easy issue for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants