break (sm4 - asm)
TOC
Collapse the table of content
Expand the table of content

break (sm4 - asm)

Moves the point of execution to the instruction after the next endloop or endswitch.

break

 

Remarks

The token format contains the offset of the corresponding endloop or endswitch instruction in the Shader as a convenience.

The following example shows the break instruction.



                loop
                    // example of termination condition
                    if_nz r0.x
                        break
                    endif
                    ...
                endloop


This instruction must appear within a loop/endloop or in a case in a switch/endswitch.

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

 

 

 

Show:
© 2016 Microsoft