label (sm4 - asm)
Indicates the beginning of a subroutine.
label l# |
---|
Item | Description |
---|---|
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 Shader | Geometry Shader | Pixel Shader |
---|---|---|
x | x | x |
Minimum Shader Model
This function is supported in the following shader models.
Shader Model | Supported |
---|---|
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 |