I see by Process Explorer that many of Unreal Engine games load multiple DirectX runtimes. For example game Gears 5 in requirements has DirectX 12 only support, but uses DirectX 9 and 11 runtimes also. Is it correct - this because unreal engine developers don't remove\rewrite some code which uses old DirectX versions features to new and now we have many legacy code inside and games need this runtimes because of legacy?


Many existing game engines like UnrealEngine have large amounts of code recycled from earlier projects or revisions, and generally if it works they don't change it. Lots of games have ancient DirectInput-based mouse & keyboard code even though that API has been emulated since Windows XP. Particularly for the in-development builds, they often use stuff like the legacy D3DX11 library instead of modern replacements. Another example: the Source engine supported Direct3D 8 for many years after it wasn't strictly needed so they could support ancient hardware that lacked stable enough drivers for Direct3D 9.

See The Zombie DirectX SDK, Living without D3DX, and DirectX SDKs of a certain age for a bunch more detail on the story here around the legacy DirectX SDK components.

There's also a fair amount of confusion over what "DirectX Runtime" means. Many games (basically every Steam title) still run the legacy DirectX End User Runtimes installer even though it is almost surely not needed, or could be avoided with a few minor tweaks. Microsoft trained developers for decades that they should include the "DirectX redist", so when we changed our approach in ~2004 most people didn't get the message and just kept doing what they always had done. See No So Direct Setup.

For DirectX 12 only games, in theory they should find everything they need already there as part of the OS and find utility code in open source on GitHub. Generally, however, this kind of clean-up work is low on the priority list compared to new features, new platforms, etc.

WITH ALL THAT SAID, another thing to keep in mind is that the modern DirectX DLLs on Windows are not isolated side-by-side affairs. Most of earlier versions of Direct3D have been 'lofted' to work on-top of the Direct3D 11 bits, and even a "pure" DirectX 12 application that makes no use of legacy code or versions is still going to have D3D11.DLL in the loaded image when running on Windows 10.

TL;DR: If starting a project "from scratch" that uses Direct3D 11 and/or Direct3D 12, there's no reason to use the legacy DirectX SDK or legacy DXSETUP at all even if you are targeting Windows 7 as your minimum OS.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .