Notifying about DirectX Version

DirectX 8.0 and later drivers are always notified about the DirectX runtime version being used by an application in a D3DGDI2_TYPE_DXVERSION request so they can report device capabilities for the version. In addition, because an application requests operations on surfaces with various pixel formats, DirectX 9.0 and later drivers are also notified about the DirectX runtime version that the application supports in D3DGDI2_TYPE_GETFORMATCOUNT and D3DGDI2_TYPE_GETFORMAT queries so those drivers can appropriately handle the operations for the version.

For example, for version 8.0 of the DirectX runtime, a DirectX 9.0 or later driver can set the number of samples for a multiple-sampled surface using elements of the D3DMULTISAMPLE_TYPE enumerated type regardless of whether the driver supports maskable multisampling. However, for version 9.0 of the DirectX runtime, a DirectX 9.0 or later driver must not set D3DMULTISAMPLE_TYPE bits in the DDSCAPS3_MULTISAMPLE_MASK mask unless the driver supports the bits as maskable. For more information about D3DMULTISAMPLE_TYPE, see the DirectX SDK documentation.

In a D3DGDI2_TYPE_GETFORMATCOUNT query, the DirectX 9.0 driver is notified of the runtime version in the dwReserved member of the DD_GETFORMATCOUNTDATA structure. The dwReserved member is set to DD_RUNTIME_VERSION, which is 0x00000900 for DirectX 9.0.

In a D3DGDI2_TYPE_GETFORMAT query, the DirectX 9.0 driver is notified of the runtime version in the dwSize member of the DDPIXELFORMAT structure that is specified in the format member of the DD_GETFORMATDATA structure. The dwSize member is also set to DD_RUNTIME_VERSION.