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

movc (sm4 - asm)

Component-wise conditional move.

movc[_sat] dest[.mask], src0[.swizzle], [-]src1[_abs][.swizzle], [-]src2[_abs][.swizzle],

 

ItemDescription

dest

[in] The address of the result of the operation.

If src0, then dest = src1 else dest = src2

src0

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

src1

[in] The components to move.

src2

[in] The components to move.

 

Remarks

The following example shows how to use this instruction.


                for each component in dest[.mask]
                    if the corresponding component in src0 (POS-swizzle)
                       has any bit set
                    {
                        copy this component (POS-swizzle) from src1 into dest
                    }
                    else
                    {
                        copy this component (POS-swizzle) from src2 into dest
                    }
                endfor

The modifiers on src1 and src2, other than swizzle, assume the data is floating point. The absence of modifiers just moves data without altering bits.

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