SDL icon indicating copy to clipboard operation
SDL copied to clipboard

[Windows] use EnumAdapterByGpuPreference to find the right gpu

Open bartwe opened this issue 3 years ago • 3 comments

https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_6/nf-dxgi1_6-idxgifactory6-enumadapterbygpupreference is a replacement for IDXGIFactory2_EnumAdapters that allows choosing of a High Performance or Low Power or default gpu and is the win10+ way of picking the gpu and deprecates the NvOptimusEnablement /AmdPowerXpressRequestHighPerformance hints.

bartwe avatar Jan 11 '22 10:01 bartwe

This is what it ended up looking like in FNA3D: https://github.com/FNA-XNA/FNA3D/commit/392f8cff6b4cbb61ec854272485db99430e529dc

I don't know anything about the D3D stuff in SDL though, so someone more familiar with the SDL_Render implementations will have to integrate this...

flibitijibibo avatar Jan 12 '22 18:01 flibitijibibo

Okay, thanks!

slouken avatar Jan 12 '22 19:01 slouken

Let's do this via a hint in the future.

slouken avatar Jul 25 '22 21:07 slouken