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

breakc (sm4 - asm)

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

breakc{_z|_nz} src0.select_component

 

ItemDescription

src0

[in] The component on which to test the condition.

 

Remarks

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

The following example shows thebreakc instruction.



                loop
                    // example of termination condition
                    breakc_z  r0.x // break if all bits in r0.x are 0
                    breakc_nz r1.x // break if any bit in r1.x is nonzero
                    ...
                endloop



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

The 32-bit register supplied by src0 is tested at a bit level. If any bit is nonzero, breakc_nz will perform the break. If all bits are zero, breakc_z will perform the break.

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

 

Related topics

Shader Model 4 Assembly (DirectX HLSL)

 

 

Show:
© 2016 Microsoft