Direct3D versioning and compatibility

When I was playing with my PowerVR PCX2 card with old versions of Direct3D, I wrote down some notes to try and make the versioning of DirectX/Direct3D and the OS compatibility a bit more transparent. I’ll make a blogpost out of it, for those who may be looking for this information, when they want to do some retro-programming/support older hardware/software.

First, an important rule in DirectX: By definition, an OS that supports a certain version of the DirectX API, supports all versions below it as well.

Secondly, the version of the Direct3D API does not necessarily have to match the version of the drivers. The Device Driver Interface (DDI) version can be seen with the dxdiag tool which is included with DirectX. The rules for Direct3D compatibility are roughly like this:

  • Direct3D 7 and lower will work on any version of DDI
  • Direct3D 8 needs DDI 6 or higher
  • Direct3D 9 needs DDI 7 or higher
  • Direct3D 10 needs DDI 10 or higher
  • Direct3D 11 need DDI 9 or higher

Obviously not all functionality of the API is available on older drivers/limited hardware. In Direct3D 9 and below, the device can be queried for its capabilities (‘caps’). In Direct3D 10, the hardware is expected to implement the full functionality. Direct3D 11 has ‘downlevels’ in which the API can operate, exposing only a subset of the functionality. There are 3 downlevels for various generations of Direct3D 9 hardware, and then there are two more downlevels for Direct3D 10 and 10.1 hardware (and then obviously version 11 itself, and now 11.1 as well).

Thirdly, in the early days, DirectX and Direct3D versions were not synchronized. The first version of DirectX had no Direct3D functionality at all. The first version of Direct3D was introduced in DirectX 2. In DirectX 5, a second version of the Direct3D API was introduced (with ‘Direct3D2′ in the object names). DirectX 6 gave us a third version (with Direct3D3’ in the object names). In DirectX 7 they introduced a fourth version of the Direct3D API (with ‘Direct3D7’ in the object names), and from then on, new versions of Direct3D and DirectX were introduced at the same time. In fact, from then on, Direct3D became the driving force as far as updates to DirectX were concerned. Most other components of DirectX have received little or no updates since DirectX 7.

Early versions of the DirectX SDK would include support for all previous versions as well with headers and libraries and such (although generally only the documentation for the latest interfaces was included with each SDK, so you need to look at older SDKs to collect all documentation). The August 2007 DirectX SDK was the last SDK to include support for all versions of Direct3D, so this is the most interesting SDK for retro programming. Newer SDKs only support Direct3D 9 and higher. Microsoft published an overview of which SDKs can be used for which versions of DirectX development.

Lastly, here is a list of Windows OSes and the highest version of DirectX that they support (assuming they are up-to-date with the latest runtimes available):

  • Windows 95 supports DirectX 8
  • Windows 98/ME/2000/XP support DirectX 9
  • Windows NT 4.0 supports DirectX 3 (although there is a beta for DirectX 5 around somewhere, actually meant for Windows 2000, but installs on NT4.0). Direct3D is *not* supported on NT 4.0 however!
  • Windows Vista/7 support DirectX 11 (and limited support of 11.1 on Windows 7 through the platform update)
  • Windows 8 supports DirectX 11.1

So in short, Direct3D 7 should work on all versions of Windows aside from NT 4.0, and on all hardware that supports any kind of 3D acceleration at all. Note also that not all hardware may have drivers for all versions of Windows. For example, my PowerVR PCX2 only has drivers for Windows 95/98/ME, not for NT 4.0/2000.

This entry was posted in Direct3D, Oldskool/retro programming, Software development and tagged , , , , , , , , , , , . Bookmark the permalink.

7 Responses to Direct3D versioning and compatibility

  1. nickysn says:

    “Windows NT 4.0 supports DirectX 4”

    Are you sure about that or is it a typo? I thought NT 4.0 supported DirectX 3 and DirectX 4 didn’t even exist:

    And you are, of course, correct that you have to target Direct3D 1.0 if you want to support NT 4.0, but AFAIK that was part of DirectX 3, not 4.

    • Scali says:

      Yes, that should have been version 3 of course. Fixed that. And yes, as I stated, Direct3D 1.0 was introduced with DirectX 2, and is also part of 3. Funny enough, if you use that DirectX 5 beta installation on NT4, you will actually get Direct3D2 interfaces, and the much nicer DrawPrimitive() API (which is quite similar to DX7, making it quite easy to target both APIs in a single codebase. Execute buffers make it much more complicated, although not impossible).

  2. Pingback: Visual Studio versioning and compatibility | Scali's OpenBlog™

  3. wfw311 says:

    I always assumed that although you *can* install DirectX on Windows NT 4.0 it is only could for the other components like DirectDraw, DirectSound and DirectInput, but *not* Direct3D.
    There are not a lot of sources for or against this, the best I could find is the following:
    “Long time observers will recall that Microsoft did not allow the installation of DirectX 5 on Windows NT 4.0, but some enthusiasts made claims that they had it working. However, this is not the full truth. These people were able to get the runtime and the software devices working, but no one was able to get full hardware accelerated Direct3D on Windows NT 4.0. The reason for this is simple. The driver model used by Windows NT 4.0 doesn’t support 3D at all.”

    Did you ever manage to get accelerated Direc3D working on NT 4.0? Or did you ever find a video card driver which supports Direct3D on NT 4.0? I know that accelerated OpenGL is no problem.

    • Scali says:

      I only had the PowerVR PCX2 at the time, which had no drivers. I have used other accelerated cards in NT 4.0, but now that you mention it… I don’t know if I ever used Direct3D on them. I know I developed some OpenGL on an NT 4.0 machine with a Matrox G200..?, which worked okay.

  4. wfw311 says:

    I tried posting twice, why doesn’t this work? It worked on other blog posts.

    • Scali says:

      For some reason it marked your post as spam (perhaps because there was an URL in it?). And because it was spam, I didn’t get notified about a new reply either, so I didn’t notice your comment. I’ve un-spammed it now.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s