Microsoft DirectX 8.1 (pixel shader versions 1.0, 1.1, 1.2, 1.3, 1.4)

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.0 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 N/A * *
Arithmetic 8 8 8 8 8 8
Texture address 4 4 4 4 6 6
Total 8 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 version 1.0, 1.1, 1.2, 1.3

Instruction count exceptions for pixel shader version 1.4