d3d12: Attempt to use the Agility SDK
authorJesse Natalie <jenatali@microsoft.com>
Sun, 28 Aug 2022 13:34:31 +0000 (06:34 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 20 Oct 2022 00:30:21 +0000 (00:30 +0000)
commit6a1268cc4fbf22290112ea856339dc234bad21c1
tree58d779e21206bb622c170983658428df2582daa7
parentd21f0cb5b9b8e0bff42b42cbdf90b1f2f86fb46f
d3d12: Attempt to use the Agility SDK

The ideal would be to use a D3D12Core.dll next to the GL DLL, via
ID3D12SDKConfiguration1, but this requires a new D3D12.dll to be
present on the machine, which only very new OSes will currently have.
For older OSes, we can at least try to use ID3D12SDKConfiguration to
set a global Agility SDK override, but that only works in developer
mode and requires the DLL to be at a relative path from the app EXE,
so only try that if we have environment variables telling us to do so.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>
src/gallium/drivers/d3d12/d3d12_screen.cpp