Copies a region from a source resource to a destination resource.
Syntax
void CopySubresourceRegion1( [in] ID3D11Resource *pDstResource, [in] UINT DstSubresource, [in] UINT DstX, [in] UINT DstY, [in] UINT DstZ, [in] ID3D11Resource *pSrcResource, [in] UINT SrcSubresource, [in] const D3D11_BOX *pSrcBox, [in] UINT CopyFlags );
Parameters
- pDstResource [in]
-
Type: ID3D11Resource*
A pointer to the destination resource.
- DstSubresource [in]
-
Type: UINT
Destination subresource index.
- DstX [in]
-
Type: UINT
The x-coordinate of the upper-left corner of the destination region.
- DstY [in]
-
Type: UINT
The y-coordinate of the upper-left corner of the destination region. For a 1D subresource, this must be zero.
- DstZ [in]
-
Type: UINT
The z-coordinate of the upper-left corner of the destination region. For a 1D or 2D subresource, this must be zero.
- pSrcResource [in]
-
Type: ID3D11Resource*
A pointer to the source resource.
- SrcSubresource [in]
-
Type: UINT
Source subresource index.
- pSrcBox [in]
-
Type: const D3D11_BOX*
A pointer to a 3D box that defines the region of the source subresource that CopySubresourceRegion1 can copy. If NULL, CopySubresourceRegion1 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, CopySubresourceRegion1 doesn't perform a copy operation.
- CopyFlags [in]
-
Type: UINT
A D3D11_COPY_FLAGS-typed value that specifies how to perform the copy operation. If you specify zero for no copy option, CopySubresourceRegion1 behaves like ID3D11DeviceContext::CopySubresourceRegion. For existing display drivers that can't process these flags, the runtime doesn't use them.
Return value
Returns nothing
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.
Note Applies only to feature level 9_x hardware If you use ID3D11DeviceContext1::UpdateSubresource1 or CopySubresourceRegion1 to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass a NULL source box and if the source resource has different dimensions from those of the destination resource or if you use destination offsets, (x, y, and z). In this situation, always pass a source box that is the full size of the source resource.
Windows Phone 8: This API is supported.
Requirements
|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
See also
Send comments about this topic to Microsoft
Build date: 11/28/2012