This method uses the GPU to copy texture data between two locations. Both the source and the destination may reference texture data located within either a buffer resource or a texture resource.
public:
void CopyTextureRegionX(
const D3D12_TEXTURE_COPY_LOCATION *pDst,
UINT DstX,
UINT DstY,
UINT DstZ,
const D3D12_TEXTURE_COPY_LOCATION *pSrc,
const D3D12_BOX *pSrcBox,
D3D12XBOX_COPY_FLAGS Flags
)
pDst
Type: D3D12_TEXTURE_COPY_LOCATION *
[in] Specifies the destination. The subresource referred to must be in the D3D12_RESOURCE_STATE_COPY_DEST state.
DstX
Type: UINT
The x-coordinate of the upper left corner of the destination region.
DstY
Type: UINT
The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero.
DstZ
Type: UINT
The z-coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero.
pSrc
Type: D3D12_TEXTURE_COPY_LOCATION *
[in] Specifies the source. The subresource referred to must be in the D3D12_RESOURCE_STATE_COPY_SOURCE state.
pSrcBox
Type: D3D12_BOX *
[in, optional] Specifies an optional D3D12_BOX that sets the size of the source texture to copy.
Flags
Type: D3D12XBOX_COPY_FLAGS
Copy flags.
Type: void
The difference between this method and the D3D12 method CopyTextureRegion, is the addition of the Flags parameter.
Header: Declared in d3d12_x.h.
Library: Use d3d12_x.lib.