ID3D11DeviceContext2::CopyTileMappings Method

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

Syntax

public:
HRESULT CopyTileMappings(
         ID3D11Resource *pDestTiledResource,
         const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate,
         ID3D11Resource *pSourceTiledResource,
         const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate,
         const D3D11_TILE_REGION_SIZE *pTileRegionSize,
         UINT Flags
)  

Parameters

pDestTiledResource
Type: ID3D11Resource *

[in] The destination tiled resource, as a pointer to ID3D11Resource.

pDestRegionStartCoordinate
Type: D3D11_TILED_RESOURCE_COORDINATE *

[in] A pointer to a D3D11_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the destination tiled resource.

pSourceTiledResource
Type: ID3D11Resource *

[in] The source tiled resource, as a pointer to ID3D11Resource.

pSourceRegionStartCoordinate
Type: D3D11_TILED_RESOURCE_COORDINATE *

[in] A pointer to a D3D11_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the source tiled resource.

pTileRegionSize
Type: D3D11_TILE_REGION_SIZE *

[in] A pointer to a D3D11_TILE_REGION_SIZE structure that describes the size of the tiled region.

Flags
Type: UINT 

[in] A combination of D3D11_TILE_MAPPING_FLAG values that are combined by using a bitwise OR operation. The only valid value is D3D11_TILE_MAPPING_NO_OVERWRITE, which indicates that previously submitted commands to the device that may still be executing do not reference any of the tile region being updated. The device can then avoid having to flush previously submitted work to perform the tile mapping update. If the app violates this promise by updating tile mappings for locations in tiled resources that are still being referenced by outstanding commands, undefined rendering behavior results, including the potential for significant slowdowns on some architectures. This is like the “no overwrite” concept that exists elsewhere in the Direct3D API, except applied to the tile mapping data structure itself (which in hardware is a page table). The absence of the D3D11_TILE_MAPPING_NO_OVERWRITE value requires that tile mapping updates that CopyTileMappings specifies must be completed before any subsequent Direct3D command can proceed.

Return value

Type: HRESULT 

Returns S_OK if successful; otherwise, returns one of the following:

Remarks

This method helps with tasks such as shifting mappings around within and across tiled 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 temp location and then from there written to the destination.

Requirements

Header: Declared in d3d11_x.h (d3d11_2.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext2

ID3D11DeviceContext2 Members