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

# XGComputeBankRotationAddress (XBOX One 系列)

> 計算 2D 並排表面的記憶庫輪替位址。

計算 2D 並排表面的記憶庫輪替位址。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
bool XGComputeBankRotationAddress(
         XG_GPU_VIRTUAL_ADDRESS BaseAddress,
         const XG_RESOURCE_LAYOUT* pLayout,
         UINT32 PlaneIndex,
         UINT32 MipLevelIndex,
         UINT32 BankRotationIndex,
         XG_GPU_VIRTUAL_ADDRESS* pBankRotatedBaseAddress
)  
```

<a id="ID4EG" />

### 參數

*BaseAddress*   \_In\_\
類型：XG\_GPU\_VIRTUAL\_ADDRESS

要輪替之 2D 並排紋理的未輪替基底位址。

*pLayout*   \_In\_\
類型：[XG\_RESOURCE\_LAYOUT\*](/zh-TW/reference/graphics/xg__NR/structs/xg_resource_layout)

XG 程式庫使用 [XGComputeTexture2DLayout](/zh-TW/reference/graphics/xg__NR/functions/xgcomputetexture2dlayout) 和 [XGTextureAddressComputer::GetResourceLayout](/zh-TW/reference/graphics/xg__NR/interfaces/XGTextureAddressComputer/methods/xgtextureaddresscomputer_getresourcelayout) 等函式計算出的 XG 資源配置。

*PlaneIndex*   \_In\_\
類型：UINT32

要輪替之表面的平面索引。這通常是平面用途為 **XG\_PLANE\_USAGE\_DEFAULT** 的平面。

*MipLevelIndex*   \_In\_\
類型：UINT32

要據以計算記憶庫輪替的 mip 層級。

*BankRotationIndex*   \_In\_\
類型：UINT32

指定要套用之記憶庫輪替量的數值。記憶庫輪替索引可以是任意值。輪替位移會被限制在與所選 mip 層級相關聯的記憶庫輪替位址遮罩範圍內。

*pBankRotatedBaseAddress*   \_Out\_\
類型：XG\_GPU\_VIRTUAL\_ADDRESS \*

計算出的紋理記憶庫輪替基底位址。它由輸入的基底位址加上記憶庫輪替位元所組成。

<a id="ID4EO" />

### 傳回值

類型：bool

如果函式成功，會傳回 **true**。如果輸入參數無效，或所選 mip 層級不支援記憶庫輪替，則會傳回 **false**。

<a id="remarks" />

## 備註

記憶庫輪替索引可以是任意值。輪替位移會被限制在與所選 mip 層級相關聯的記憶庫輪替位址遮罩範圍內。

此函式的原始程式碼為內嵌，可以在 xg.h 中找到。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

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

## 另請參閱

[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [LoadComputePipeline](/zh-TW/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary/methods/id3d12pipelinelibrary_loadcomputepipeline_public.md)
- [SetComputeRootSignature](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootsignature_public.md)
- [CreateComputePipelineState](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcomputepipelinestate_public.md)
- [SetComputeRoot32BitConstant](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputeroot32bitconstant_public.md)
