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

# CopyTileMappings

> Copies mappings from a source reserved resource to a destination reserved resource.

Copies mappings from a source reserved resource to a destination reserved resource.

## Syntax

```cpp theme={null}
void CopyTileMappings(
    ID3D12Resource  pDstResource,
    const D3D12_TILED_RESOURCE_COORDINATE  pDstRegionStartCoordinate,
    ID3D12Resource  pSrcResource,
    const D3D12_TILED_RESOURCE_COORDINATE  pSrcRegionStartCoordinate,
    const D3D12_TILE_REGION_SIZE  pRegionSize,
    D3D12_TILE_MAPPING_FLAGS Flags
)
```

### Parameters

*pDstResource \[in]*\
Type: ID3D12Resource \*

A pointer to the destination reserved resource.

*pDstRegionStartCoordinate \[in]*\
Type: const D3D12\_TILED\_RESOURCE\_COORDINATE \*

A pointer to a
[D3D12\_TILED\_RESOURCE\_COORDINATE](/reference/graphics/d3d12/structs/d3d12_tiled_resource_coordinate_public) structure that describes the starting coordinates of the destination reserved resource.

*pSrcResource \[in]*\
Type: ID3D12Resource \*

A pointer to the source reserved resource.

*pSrcRegionStartCoordinate \[in]*\
Type: const D3D12\_TILED\_RESOURCE\_COORDINATE \*

A pointer to a [D3D12\_TILED\_RESOURCE\_COORDINATE](/reference/graphics/d3d12/structs/d3d12_tiled_resource_coordinate_public) structure that describes the starting coordinates of the source reserved resource.

*pRegionSize \[in]*\
Type: const D3D12\_TILE\_REGION\_SIZE \*

A pointer to a [D3D12\_TILE\_REGION\_SIZE](/reference/graphics/d3d12/structs/d3d12_tile_region_size_public) structure that describes the size of the reserved region.

*Flags*\
Type: D3D12\_TILE\_MAPPING\_FLAGS

One member of [D3D12\_TILE\_MAPPING\_FLAGS](/reference/graphics/d3d12/enums/d3d12_tile_mapping_flags_public).

### Return value

Type: void

None.

## Remarks

Use **CopyTileMappings** to copy the tile mappings from one reserved resource to another, either to duplicate a resource mapping, or to initialize a new mapping before modifying it using [UpdateTileMappings](/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_updatetilemappings_public).

**CopyTileMappings** helps with tasks such as shifting mappings around within and across reserved resources, for example, scrolling tiles.
The source and destination regions can overlap; the result of the copy in this situation is as if the source was saved to a temporary location
and from there written to the destination.

The destination and the source regions must each entirely fit in their resource or behavior is undefined and the debug layer will emit an error.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12CommandQueue](/reference/graphics/d3d12_xs/interfaces/ID3D12CommandQueue/id3d12commandqueue_xs)

[UpdateTileMappings](/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_updatetilemappings_public)

[Volume Tiled Resources](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/volume-tiled-resources)


## Related topics

- [D3D12_TILE_MAPPING_FLAGS](/reference/graphics/d3d12/enums/d3d12_tile_mapping_flags_public.md)
- [D3D12_TILE_REGION_SIZE](/reference/graphics/d3d12/structs/d3d12_tile_region_size_public.md)
- [D3D12_TILED_RESOURCE_COORDINATE](/reference/graphics/d3d12/structs/d3d12_tiled_resource_coordinate_public.md)
- [CreateReservedResource](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createreservedresource_public.md)
- [CreateReservedResource1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createreservedresource1_public.md)
