?/TD>
Microsoft DirectX 9.0

Counting Instructions


Each shader has a maximum number of instructions allowed. Five types of instructions can be used in a shader: version, constant definition, phase, arithmetic, and texture address. Arithmetic and texture addressing instructions count toward the total number of instructions allowed. Phase, def, and version instructions do not count. These are summarized in the following table.

Instruction typeVersion
1_1 1_2 1_3 1_4 phase 1 1_4 phase 2
Version * * * * N/A
Constant definition * * * * N/A
Phase N/A N/A N/A * *
Arithmetic 8 8 8 8 8
Texture address 4 4 4 6 6
Total 12 12 12 14 14

*Version, constant definition, and phase instructions do not count toward instruction limits.

N/A  Not applicable. The phase instruction applies only to pixel shader version 1_4. The version and constant definition instructions can be used only in phase 1.

Instruction count exceptions for pixel shader versions 1_1, 1_2, 1_3

Instruction count exceptions for pixel shader version 1_4



© 2002 Microsoft Corporation. All rights reserved.