ID3D11ComputeContextX::CopySubresourceRegion Method

Copies a region from a source resource to a destination resource.

Syntax

public:
void CopySubresourceRegion(
         ID3D11Resource *pDstResource,
         UINT DstSubresource,
         UINT DstX,
         UINT DstY,
         UINT DstZ,
         ID3D11Resource *pSrcResource,
         UINT SrcSubresource,
         const D3D11_BOX *pSrcBox,
         UINT CopyFlags
)  

Parameters

pDstResource
Type: ID3D11Resource *

[in] A pointer to the destination resource.

DstSubresource
Type: UINT 

[in] Destination subresource index.

DstX
Type: UINT 

[in] The x-coordinate of the upper-left corner of the destination region.

DstY
Type: UINT 

[in] The y-coordinate of the upper-left corner of the destination region. For a 1D subresource, this must be zero.

DstZ
Type: UINT 

[in] The z-coordinate of the upper-left corner of the destination region. For a 1D or 2D subresource, this must be zero.

pSrcResource
Type: ID3D11Resource *

[in] A pointer to the source resource.

SrcSubresource
Type: UINT 

[in] Source subresource index.

pSrcBox
Type: D3D11_BOX *

[in, optional] A pointer to a 3D box that defines the region of the source subresource that CopySubresourceRegion can copy. If NULL, CopySubresourceRegion copies the entire source subresource. The box must fit within the source resource. An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, CopySubresourceRegion doesn’t perform a copy operation.

CopyFlags
Type: UINT 

[in] Currently ignored. A D3D11_COPY_FLAGS-typed value that specifies how to perform the copy operation. If you specify zero for no copy option, CopySubresourceRegion behaves like ID3D11DeviceContext::CopySubresourceRegion. For existing display drivers that can’t process these flags, the runtime doesn’t use them.

Return value

None.

Remarks

The source and destination resources can be identical, and the source and destination regions can overlap each other. For existing display drivers that don’t support overlapping, the runtime drops the call (that is, the runtime doesn’t call the corresponding device driver interface (DDI)). This overlapping support enables additional scroll functionality in a call to IDXGISwapChain::Present.

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.

See also

Reference

ID3D11ComputeContextX Interface

ID3D11ComputeContextX Members