ret - ps
Microsoft DirectX 9.0 SDK Update (October 2004)

ret - ps


Takes the address of an instruction from the return address stack and continues execution from it. In the case of the main function, this instruction stops shader execution.

Syntax

ret

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
retxxxx

This instruction takes the address of an instruction from the return address stack and continues execution from it. In the case of the main function, this instruction stops shader execution.

The ret instruction consumes one vertex shader instruction slot.

If a shader contains no subroutines, using ret at the end of the main program is optional.

Multiple return statements are not permitted in the main program or in any subroutine, the first return statement is treated as the end of the main program or subroutine.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.