The DirectX12 Agility SDK is a fancy name for a redistributable D3D12. Since D3D is part of Windows, normally the only way to get new D3D features is to upgrade your Windows version... but we want to be able to take advantage of new features on older versions of Windows, like many D3D customers do. Normally, the Agility SDK is something that an app opts into: specifically, the primary .exe that hosts the process exports some static data to trigger the use of the redist D3D version.
There's two exceptions to that high-level design:
- When Windows is in developer mode, the Agility SDK can be dynamically enabled for a process, as long as no D3D device has already been created.
- A new mechanism was recently built to enable components like this GL driver to opt into a redist without impacting other components in the app.
Setting the global SDK version is pretty easy, but we only do it when environment variables are set. This will be used in CI in a future series. The rest of the series enables the use of
ID3D12DeviceFactory, which is both the mechanism for using the component-level Agility SDK, but also can be useful even when using the global redist config.
There's also a couple small cleanup fixes in here that I happened to notice while implementing/debugging.