Export (0) Print
Expand All
Expand Minimize

label (sm4 - asm)

Indicates the beginning of a subroutine.

label l#

 

ItemDescription

l#

[in] The label number.

 

Remarks

A label can only appear directly after a ret instruction which is not nested in any flow control statements.

The code before the first label in a program is the main program. All subroutines appear at the end of the program, indicated by label statements.

The following example shows how to use this instruction.

 
               ...
                call l3
                ...
                ret
                label l3
                    ...
                    if_nz r0.x
                        ret
                    endif
                    ...
                ret

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader
xxx

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft