Converting the Direct3D Fixed-Function State

The Microsoft Direct3D runtime converts Direct3D fixed-function state to vertex or pixel shader version 2.0 if the user-mode display driver supports version 2.0 or later for each shader type. However, the runtime does not convert shader versions. For example, if an application uses vertex or pixel shader version 1.1, then version 1.1 is passed unconverted to the user-mode display driver regardless of whether the driver supports shader version 2.0 or later. Flexible vertex format (FVF) codes are used with fixed-function processing.

Converter Features for DirectX Versions

How the fixed-function vertex and pixel shader converters work depend on the version of Microsoft DirectX used:

  • DirectX 9.0

    Fixed-function vertex and pixel shader converters can work with the Windows Vista display driver model.

    The converters are enabled by default.

    When the fixed-function vertex or pixel shader converter is used, the pure device is disabled. When an application requests the pure device, the Direct3D runtime creates a HAL device.

    The runtime supports mixed vertex processing.

    Software vertex processing always uses the fixed-function vertex shader converter.

    Hardware vertex processing uses the fixed-function vertex shader converter when the driver supports vertex shader version 2.0 or later.

    Hardware vertex processing uses the fixed-function pixel shader converter when the driver supports pixel shader version 2.0 or later.

    In the mixed vertex processing mode when the fixed-function vertex shader converter is enabled for hardware, the number of float constants is set to what the hardware can support.

  • DirectX 8.0 and earlier

    Fixed-function vertex and pixel shader converters can work with the Windows Vista display driver model only.

    The converters are enabled by default.

    The fixed-function vertex shader converter is not supported with software vertex processing.

    Hardware vertex processing uses the fixed-function vertex shader converter when the driver supports vertex shader version 2.0 or later.

    Hardware vertex processing uses the fixed-function pixel shader converter when the driver supports pixel shader version 2.0 or later.

    Note   For versions of DirectX prior to DirectX 8.0, the fixed function to shader mapping code is implemented in Ddraw.dll.

Unused User-Mode Display Driver Functions

The following user-mode display driver functions are not called by the Direct3D runtime when the fixed-function vertex shader converter is enabled:

Unused Render States

The following render states are not passed by the Direct3D runtime (or, if passed by mistake, can be ignored by the driver) when the fixed-function vertex shader converter is enabled:

  • D3DRS_VERTEXBLEND

  • D3DRS_INDEXEDVERTEXBLENDENABLE

  • D3DRS_TWEENFACTOR

  • D3DRS_FOGVERTEXMODE

  • D3DRS_LIGHTING

  • D3DRS_AMBIENT

  • D3DRS_COLORVERTEX

  • D3DRS_LOCALVIEWER

  • D3DRS_DIFFUSEMATERIALSOURCE

  • D3DRS_SPECULARMATERIALSOURCE

  • D3DRS_AMBIENTMATERIALSOURCE

  • D3DRS_EMISSIVEMATERIALSOURCE

  • D3DRS_POINTSCALEENABLE

  • D3DRS_POINTSCALE_A

  • D3DRS_POINTSCALE_B

  • D3DRS_POINTSCALE_C

  • D3DRS_NORMALIZENORMALS

Ignored Texture Stage States

The Direct3D runtime passes all texture stage states to the driver. The driver should ignore the following texture stage states when the fixed-function pixel shader converter is enabled:

  • D3DTSS_COLOROP

  • D3DTSS_COLORARG1

  • D3DTSS_COLORARG2

  • D3DTSS_ALPHAOP

  • D3DTSS_ALPHAARG1

  • D3DTSS_ALPHAARG2

  • D3DTSS_BUMPENVMAT00

  • D3DTSS_BUMPENVMAT01

  • D3DTSS_BUMPENVMAT10

  • D3DTSS_BUMPENVMAT11

  • D3DTSS_BUMPENVLSCALE

  • D3DTSS_BUMPENVLOFFSET

  • D3DTSS_COLORARG0

  • D3DTSS_ALPHAARG0

  • D3DTSS_RESULTARG

  • D3DTSS_CONSTANT