> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_LOGIC_OP

> Specifies logical operations to configure for a render target. (D3D12_LOGIC_OP)

Defines constants that specify logical operations to configure for a render target.

## Syntax

```cpp theme={null}
typedef enum D3D12_LOGIC_OP
{
    D3D12_LOGIC_OP_CLEAR = 0,
    D3D12_LOGIC_OP_SET = 0,
    D3D12_LOGIC_OP_COPY = 0,
    D3D12_LOGIC_OP_COPY_INVERTED = 0,
    D3D12_LOGIC_OP_NOOP = 0,
    D3D12_LOGIC_OP_INVERT = 0,
    D3D12_LOGIC_OP_AND = 0,
    D3D12_LOGIC_OP_NAND = 0,
    D3D12_LOGIC_OP_OR = 0,
    D3D12_LOGIC_OP_NOR = 0,
    D3D12_LOGIC_OP_XOR = 0,
    D3D12_LOGIC_OP_EQUIV = 0,
    D3D12_LOGIC_OP_AND_REVERSE = 0,
    D3D12_LOGIC_OP_AND_INVERTED = 0,
    D3D12_LOGIC_OP_OR_REVERSE = 0,
    D3D12_LOGIC_OP_OR_INVERTED = 0
} D3D12_LOGIC_OP
```

## Constants

| Constant                         | Description                                                                                 |         |
| -------------------------------- | ------------------------------------------------------------------------------------------- | ------- |
| D3D12\_LOGIC\_OP\_CLEAR          | Clears the render target (`0`).                                                             |         |
| D3D12\_LOGIC\_OP\_SET            | Sets the render target ( `1`).                                                              |         |
| D3D12\_LOGIC\_OP\_COPY           | Copys the render target (`s` source from Pixel Shader output).                              |         |
| D3D12\_LOGIC\_OP\_COPY\_INVERTED | Performs an inverted-copy of the render target (`~s`).                                      |         |
| D3D12\_LOGIC\_OP\_NOOP           | No operation is performed on the render target (`d` destination in the Render Target View). |         |
| D3D12\_LOGIC\_OP\_INVERT         | Inverts the render target (`~d`).                                                           |         |
| D3D12\_LOGIC\_OP\_AND            | Performs a logical AND operation on the render target (`s & d`).                            |         |
| D3D12\_LOGIC\_OP\_NAND           | Performs a logical NAND operation on the render target (`~(s & d)`).                        |         |
| D3D12\_LOGIC\_OP\_OR             | Performs a logical OR operation on the render target (\`s                                   | d\`).   |
| D3D12\_LOGIC\_OP\_NOR            | Performs a logical NOR operation on the render target (\`\~(s                               | d)\`).  |
| D3D12\_LOGIC\_OP\_XOR            | Performs a logical XOR operation on the render target (`s ^ d`).                            |         |
| D3D12\_LOGIC\_OP\_EQUIV          | Performs a logical equal operation on the render target (`~(s ^ d)`).                       |         |
| D3D12\_LOGIC\_OP\_AND\_REVERSE   | Performs a logical AND and reverse operation on the render target (`s & ~d`).               |         |
| D3D12\_LOGIC\_OP\_AND\_INVERTED  | Performs a logical AND and invert operation on the render target (`~s & d`).                |         |
| D3D12\_LOGIC\_OP\_OR\_REVERSE    | Performs a logical OR and reverse operation on the render target (\`s                       | \~d\`). |
| D3D12\_LOGIC\_OP\_OR\_INVERTED   | Performs a logical OR and invert operation on the render target (\`\~s                      | d\`).   |

## Remarks

This enum is used by the [D3D12\_RENDER\_TARGET\_BLEND\_DESC](/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public) structure.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Enumerations](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

- [D3D12_RENDER_TARGET_BLEND_DESC](/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public.md)
- [D3D12_BLEND_DESC](/reference/graphics/d3d12/structs/d3d12_blend_desc_public.md)
- [D3D12_BLEND_OP](/reference/graphics/d3d12/enums/d3d12_blend_op_public.md)
- [D3D12_AUTO_BREADCRUMB_OP](/reference/graphics/d3d12/enums/d3d12_auto_breadcrumb_op_public.md)
- [D3D12_PREDICATION_OP](/reference/graphics/d3d12/enums/d3d12_predication_op_public.md)
