FNA-XNA / FNA3D

FNA3D - 3D Graphics Library for FNA
http://fna-xna.github.io/
Other
287 stars 48 forks source link

Use IDXGIFactory6_EnumAdapterByGpuPreference to find the High Performance gpu #138

Closed bartwe closed 2 years ago

bartwe commented 2 years ago

Use EnumAdapterByGpuPreference

https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_6/nf-dxgi1_6-idxgifactory6-enumadapterbygpupreference

(note include path reordering)

Implemented such that it will fallback to the current implementation in version of windows before Windows 10, version 1803

https://github.com/libsdl-org/SDL/issues/5210

flibitijibibo commented 2 years ago

Similar to the D3D 11.1 features we use we'll need to manually declare the DXGI 1.6 features, since this breaks when building with the Jun2010 DXSDK. Other than that this seems like a good idea, so let's get this in.

bartwe commented 2 years ago

Is there an example on how to do this for the interface/vtable ? the other bits are already moved into local declarations

flibitijibibo commented 2 years ago

Our declaration of user annotations:

https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Driver_D3D11.h#L68

bartwe commented 2 years ago

Ok changes made and it is now no longer dependent on a new sdk.

flibitijibibo commented 2 years ago

This is now in fnalibs.

(Also I had no idea I could commit to PR branches...)