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

# XGCreateTextureComputer (XBOX One 系列)

> 為指定的 D3D12 樣式資源描述建立紋理位址計算器物件。

為指定的 D3D12 樣式資源描述建立紋理位址計算器物件。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XGCreateTextureComputer(
         const XG_RESOURCE_DESC *pDesc,
         XGTextureAddressComputer **ppComputer
)  
```

<a id="ID4EG" />

### 參數

*pDesc*   \_In\_<br />類型：[XG\_RESOURCE\_DESC\*](/zh-TW/reference/graphics/xg__NR/structs/xg_resource_desc)

資源描述，以指向 XG\_RESOURCE\_DESC 結構的指標表示，此結構可描述任何維度的紋理。

*ppComputer*   \_Out\_<br />類型：XGTextureAddressComputer\*\*

輸出指定紋理資源的計算紋理配置，以及可讓使用者執行紋理元素微並排和巨集並排的其他狀態，以指向 [XGTextureAddressComputer](/zh-TW/reference/graphics/xg__NR/interfaces/XGTextureAddressComputer/xgtextureaddresscomputer) 執行個體的指標表示。

<a id="ID4EO" />

### 傳回值

類型：[HRESULT](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

如果成功，會傳回 **S\_OK**；否則會傳回錯誤碼。如需錯誤碼清單，請參閱[錯誤碼](/zh-TW/reference/errorcodes)。如果函式因 *pDesc* 描述的是緩衝區而失敗，傳回值會設為 **E\_INVALIDARG**。

<a id="remarks" />

## 備註

不支援緩衝區描述，並會傳回 E\_INVALIDARG。

<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)
- [D3D12_TEXTURE_COPY_TYPE](/zh-TW/reference/graphics/d3d12/enums/d3d12_texture_copy_type_public.md)
- [D3D12_TEXTURE_COPY_LOCATION](/zh-TW/reference/graphics/d3d12/structs/d3d12_texture_copy_location_public.md)
- [XBOX Texture Compressor (XBTC) 工具參考](/zh-TW/build/core-features/graphics/newfeatures/xbtc/index.md)
- [CreateFence](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createfence_public.md)
