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

> 描述紋理的一部分，以用於紋理複製。

描述紋理的一部分，以用於紋理複製。

## 語法

```cpp theme={null}
typedef struct D3D12_TEXTURE_COPY_LOCATION
{
    ID3D12Resource  pResource;
    D3D12_TEXTURE_COPY_TYPE Type;
    D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint;
    UINT SubresourceIndex;
} D3D12_TEXTURE_COPY_LOCATION
```

### 成員

*pResource*\
類型：ID3D12Resource \*

指定將用於複製作業的資源。<div> </div>當 **Type** 為 D3D12\_TEXTURE\_COPY\_TYPE\_PLACED\_FOOTPRINT 時，**pResource** 必須指向緩衝區資源。<div> </div>當 **Type** 為 D3D12\_TEXTURE\_COPY\_TYPE\_SUBRESOURCE\_INDEX 時，**pResource** 必須指向紋理資源。

*Type*\
類型：D3D12\_TEXTURE\_COPY\_TYPE

指定這是哪種類型的資源位置：紋理的子資源，或可套用至緩衝區的紋理配置描述。
此 [D3D12\_TEXTURE\_COPY\_TYPE](/zh-TW/reference/graphics/d3d12/enums/d3d12_texture_copy_type_public) 列舉會指出要使用哪個等位成員。

*PlacedFootprint*\
類型：D3D12\_PLACED\_SUBRESOURCE\_FOOTPRINT

指定紋理配置 (包含位移、維度和間距)，讓硬體了解如何將緩衝區資源的區段視為多維度紋理。
若要為 [CopyTextureRegion](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytextureregion_public) 呼叫填入正確的資料，
請參閱 [D3D12\_PLACED\_SUBRESOURCE\_FOOTPRINT](/zh-TW/reference/graphics/d3d12/structs/d3d12_placed_subresource_footprint_public)。

*SubresourceIndex*\
類型：UINT

指定陣列化、MIP 對應或平面紋理中應該用於複製作業之子資源的索引。

## 備註

將此結構與 [CopyTextureRegion](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytextureregion_public) 搭配使用。

## 需求

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

## 另請參閱

[CD3DX12\_TEXTURE\_COPY\_LOCATION](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-texture-copy-location)

[核心結構](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)

[D3D12\_PLACED\_SUBRESOURCE\_FOOTPRINT](/zh-TW/reference/graphics/d3d12/structs/d3d12_placed_subresource_footprint_public)


## Related topics

- [D3D12_TEXTURE_COPY_TYPE](/zh-TW/reference/graphics/d3d12/enums/d3d12_texture_copy_type_public.md)
- [D3D12_PLACED_SUBRESOURCE_FOOTPRINT](/zh-TW/reference/graphics/d3d12/structs/d3d12_placed_subresource_footprint_public.md)
- [D3D12_TEXTURE_BARRIER (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/structs/d3d12_texture_barrier_public.md)
- [D3D12_VIEW_INSTANCE_LOCATION](/zh-TW/reference/graphics/d3d12/structs/d3d12_view_instance_location_public.md)
- [D3D12_TILE_COPY_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_tile_copy_flags_public.md)
