?/TD>
Microsoft DirectX 9.0

Pixel Shader 2_0 Extended


A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.

Dynamic Flow Control

D3DCAPS9.PS20Caps.DynamicFlowControlDepth represents the nesting depth of dynamic flow control instructions: if, if_comp, if_pred, break, and break_comp. The value is equal to the nesting depth of the if_comp block. The range of values for this cap is 0 to 24. If this cap is zero, the device does not support dynamic flow control instructions.

Number of Temporary Registers

The number of temporary registers supported by the device. The range is from 12 to 32.

Static Flow Control Nesting Depth

D3DCAPS9.PS20Caps.StaticFlowControlDepth represents the nesting depth of two types of static flow control instructions: loop/rep and call/callnz. The range of values for this cap is 1 to 4. loop/rep instructions can be nested up to StaticFlowControlDepth deep. Independently, call/callnz instructions can be nested up to StaticFlowControlDepth deep.

Number of Instruction Slots

The number of instruction slots can range from 96 to a maximum of 512, and is specified by the D3DCAPS9.PS20Caps.MaxPixelShaderInstructionSlots cap. The total number of instructions that can run is defined by D3DCAPS9.MaxPixelShaderInstructionsExecuted. This can be larger than the number of instruction slots due to looping and subroutine calls.

Arbitrary Swizzle

If D3DPS20CAPS_ARBITRARYSWIZZLE flag is set, arbitrary swizzle is supported. See Arbitrary Swizzle.

Gradient Instructions

If D3DPS20CAPS_GRADIENTINSTRUCTIONS is set, gradient instructions are supported. See dsx, dsy, and texldd.

Predication

If D3DPS20CAPS_PREDICATION flag is set, instruction predication is supported. See Predicate.

Dependent Read Limit

If D3DPS20CAPS_NODEPENDENTREADLIMIT is set, there are no dependent read limits.

Texture Instruction Limit

If D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT flag is set, there are no limit on texture instructions.



© 2002 Microsoft Corporation. All rights reserved.