> ## 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

> 指定要為轉譯目標設定的邏輯運算。(D3D12_LOGIC_OP)

定義常數，以指定要為轉譯目標設定的邏輯運算。

## 語法

```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
```

## 常數

| 常數 | 描述 | |
| - | - | - |
| D3D12\_LOGIC\_OP\_CLEAR | 清除轉譯目標 (`0`)。 | |
| D3D12\_LOGIC\_OP\_SET | 設定轉譯目標 ( `1`)。 | |
| D3D12\_LOGIC\_OP\_COPY | 複製轉譯目標 (`s` 為來自像素著色器輸出的來源)。 | |
| D3D12\_LOGIC\_OP\_COPY\_INVERTED | 對轉譯目標執行反轉複製 (`~s`)。 | |
| D3D12\_LOGIC\_OP\_NOOP | 不對轉譯目標執行任何運算 (`d` 為轉譯目標檢視中的目的地)。 | |
| D3D12\_LOGIC\_OP\_INVERT | 反轉轉譯目標 (`~d`)。 | |
| D3D12\_LOGIC\_OP\_AND | 對轉譯目標執行邏輯 AND 運算 (`s & d`)。 | |
| D3D12\_LOGIC\_OP\_NAND | 對轉譯目標執行邏輯 NAND 運算 (`~(s & d)`)。 | |
| D3D12\_LOGIC\_OP\_OR | 對轉譯目標執行邏輯 OR 運算 (\`s | d\`)。 |
| D3D12\_LOGIC\_OP\_NOR | 對轉譯目標執行邏輯 NOR 運算 (\`\~(s | d)\`)。 |
| D3D12\_LOGIC\_OP\_XOR | 對轉譯目標執行邏輯 XOR 運算 (`s ^ d`)。 | |
| D3D12\_LOGIC\_OP\_EQUIV | 對轉譯目標執行邏輯相等運算 (`~(s ^ d)`)。 | |
| D3D12\_LOGIC\_OP\_AND\_REVERSE | 對轉譯目標執行邏輯 AND 與反向運算 (`s & ~d`)。 | |
| D3D12\_LOGIC\_OP\_AND\_INVERTED | 對轉譯目標執行邏輯 AND 與反轉運算 (`~s & d`)。 | |
| D3D12\_LOGIC\_OP\_OR\_REVERSE | 對轉譯目標執行邏輯 OR 與反向運算 (\`s | \~d\`)。 |
| D3D12\_LOGIC\_OP\_OR\_INVERTED | 對轉譯目標執行邏輯 OR 與反轉運算 (\`\~s | d\`)。 |

## 備註

此列舉由 [D3D12\_RENDER\_TARGET\_BLEND\_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public) 結構使用。

## 需求

**標頭:** d3d12\_xs.h 或 d3d12\_x.h\
**程式庫:** d3d12\_xs.lib 或 d3d12\_x.lib\
**支援的平台**: XBOX Series 主機與 XBOX One 系列

## 另請參閱

[核心列舉](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

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