-
-
Notifications
You must be signed in to change notification settings - Fork 957
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
discrete GPU is skipped on laptops (with optimus dual-graphics?) #707
Comments
We could do something like this (C++):
References: Nvidia AMD (EDIT) By the way, as a example, this is what Cryengine does. |
@joaovsq thanks for the hint. I've searched a little bit around and this seems to be very difficult to do from a managed executable. you have to do some IL hacks after compilation. i found this: http://lucasmagder.com/blog/2014/05/exporting-data-symbols-in-c-for-nvidia-optimus/ and this: https://stackoverflow.com/questions/17270429/forcing-hardware-accelerated-rendering it might be possible since Stride is doing some assembly processing already. but selecting the correct device in |
I don't see anything in there for exporting constants.. here are are two references. |
i found the right setting, this should be set in the registry by the installer/launcher. just added it to the vvvv installer and it works like a charm. it even allows to user to change the setting later and doesn't force it: https://www.trishtech.com/2018/12/how-to-set-graphics-performance-preference-for-apps-in-windows-10/ |
Release Type: Release
Version: 4.0.0.1 beta2 0928
Platform(s): Windows
Describe the bug
On some laptops, Stride picks the slow integrated GPU even when there is a fast discrete GPU.
I believe this happens because on laptops with switchable graphics, only the "default" GPU has a display attached. Which is normally the integrated graphics. Stride checks for no display attached and skips that GPU in this code. Yet other game engines (in the user-report, Cryengine) still come up on the discrete GPU.
stride/sources/engine/Stride.Games/GamePlatform.cs
Lines 264 to 269 in 273dfdd
I'll have to do more testing, but I think Stride should probably be using some method to get the default 3d device, instead of doing it's own picking algorithm based on the attached display. On D3D I believe this is to CreateDevice() with a D3DADAPTER_DEFAULT parameter. It could do this as part of the factory device enumeration, and then set some kind of default device flag in the enumerated device list.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected Stride to use the discrete GPU just like other games do.
The text was updated successfully, but these errors were encountered: