This topic has not yet been rated - Rate this topic

# dmovc (sm5 - asm)

Component-wise conditional move.

ItemDescription

dest

[in] The move destination.

If src0, then dest = src1 else dest = src2.

src0

[in] The components to test the condition against.

src1

[in] The components to move if the condition is true.

src2

[in] The components to move if the condition is false.

## Remarks

The following example shows how to use this instruction.

```
{
if(the first 32-bit component of src0, post-swizzle,
has any bit set)
{
copy the first double from src1 (post swizzle)
into dest.xy
}
else
{
copy the first double from src2 (post swizzle)
into dest.xy
}
}
{
if(the second 32-bit component of src0, post-swizzle,
has any bit set)
{
copy the second double from src1 (post swizzle)
into dest.zw
}
else
{
copy the second double from src2 (post swizzle)
into dest.zw
}
}

```

The valid masks for dest are .xy, .zw, .xyzw.

The valid swizzles for src0 are anything. The first two components post-swizzle are used to indentify two 32-bit condition values.

The valid swizzles for src1 and src2 containing doubles are .xyzw, .xyxy, .zwxy, .zwzw. are .xy, .zw, and .xyzw.

The following src mappings below are post-swizzle:

• dest is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).
• src0 is a 32bit/component vec2 across x and y (zw ignored).
• src1 is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).
• src2 is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).

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

This instruction applies to the following shader stages:

VertexHullDomainGeometryPixelCompute
XX XXXX

This instruction is supported in the following shader models:

Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

Build date: 11/16/2013