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

# D3D12XboxInitializeDefaultComputeShaderLimits

> 使用預設限制初始化 D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC 結構。

使用預設限制初始化 **D3D12XBOX\_COMPUTE\_SHADER\_LIMITS\_DESC** 結構。

## 語法

```cpp theme={null}
void D3D12XboxInitializeDefaultComputeShaderLimits(  
         bool ApplyLowCuLimits,  
         D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC* pDesc  
)  
```

### 參數

*ApplyLowCuLimits*   \
類型：bool

設定為 **true** 時，停用計算單元 1 到 4。

*pDesc*   \
類型：[D3D12XBOX\_COMPUTE\_SHADER\_LIMITS\_DESC](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_compute_shader_limits_desc)\*

要初始化之結構的位址。

### 傳回值

類型：void

## 備註

結構的成員會以下列方式初始化：

* *MaxWaves* 設定為 **D3D12XBOX\_SHADER\_MAX\_WAVES\_DEFAULT**。
* *MaxThreadgroupsPerCu* 設定為 **D3D12XBOX\_SHADER\_MAX\_THREADGROUPS\_PER\_CU\_DEFAULT**。
* *MaxWavesForCuLocking* 設定為 **D3D12XBOX\_SHADER\_MAX\_WAVES\_FOR\_CU\_LOCKING\_DEFAULT**。
* *NumThreadgroupsWalkedPerCu* 設定為 **D3D12XBOX\_SHADER\_NUM\_THREADGROUPS\_WALKED\_PER\_CU\_DEFAULT**。
* *SimdWalkAlgorithm* 設定為 [D3D12XBOX\_SHADER\_CS\_SIMD\_WALK\_ALGORITHM\_DEFAULT](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_shader_cs_simd_walk_algorithm)。

## 需求

**標頭:** d3d12\_x.h

**程式庫:** 使用 d3d12\_x.h (內嵌函式)

**支援的平台:** XBOX One 系列

## 另請參閱

[d3d12\_x](/zh-TW/reference/graphics/d3d12_x/d3d12_x_members)\
[D3D12XboxInitializeDefaultComputeShaderLimits](/zh-TW/reference/graphics/d3d12_x/functions/d3d12xboxinitializedefaultcomputeshaderlimits)\
[SetComputeShaderLimitsX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputeshaderlimitsx)\
[XboxSetComputeShaderLimits](/zh-TW/reference/graphics/d3d12_x/interfaces/cd3dx12xbox_pipeline_state_stream_parse_helper/methods/cd3dx12xbox_pipeline_state_stream_parse_helper_xboxsetcomputeshaderlimits)
[XboxSetComputeShaderLimits](/zh-TW/reference/graphics/d3d12_x/interfaces/id3dx12pipelineparsercallbacks/methods/id3dx12pipelineparsercallbacks_xboxsetcomputeshaderlimits)


## Related topics

- [D3D12_SHADER_BYTECODE](/zh-TW/reference/graphics/d3d12/structs/d3d12_shader_bytecode_public.md)
- [SetComputeRootShaderResourceView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootshaderresourceview_public.md)
- [D3D12_COMPUTE_PIPELINE_STATE_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_compute_pipeline_state_desc_public.md)
- [D3D12_SHADER_CACHE_SUPPORT_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_shader_cache_support_flags_public.md)
- [D3D12_SHADER_COMPONENT_MAPPING](/zh-TW/reference/graphics/d3d12/enums/d3d12_shader_component_mapping_public.md)
