Confirming Pixel Shader Support
You can query members of D3DCAPS9 to determine the level of support for operations involving pixel shaders. The following table lists the device capabilities related to programmable pixel processing.
|PixelShader1xMaxValue||Range of values that can be stored in registers is [-PixelShader1xMaxValue, PixelShader1xMaxValue]. This affects versions ps_1_1 - ps_1_4 only.|
|MaxSimultaneousTextures||For the fixed function pipeline, the number of texture samplers is MaxTextureBlendStages divided by MaxSimultaneousTextures. The number of texture samplers for a pixel shader is shown in the next table.|
|PixelShaderVersion||Version of pixel shader supported by the hardware. Pixel shaders with version numbers equal to or less than this value are supported.|
The number of texture samplers available for a pixel shader depends on the pixel shader version.
|Pixel shader version||Number of texture samplers|
|ps_1_1 - ps_1_3||4 texture samplers|
|ps_1_4||6 texture samplers|
|ps_2_0 - ps_3_0||16 texture samplers|
|Fixed function pixel shader||MaxTextureBlendStages/MaxSimultaneousTextures texture samplers|
The first byte of PixelShaderVersion contains the minor version number; the second byte contains the major version number. The first token in the assembled shader is the pixel shader version. Each hardware implementation sets the version number to indicate the maximum pixel shader version that it can fully support.