UpdateSubresources function

Updates subresources, all the subresource arrays should be populated, typically by calling ID3D12Device::GetCopyableFootprints.

Syntax

UINT64 inline UpdateSubresources(
  _In_       ID3D12GraphicsCommandList          *pCmdList,
  _In_       ID3D12Resource                     *pDestinationResource,
  _In_       ID3D12Resource                     *pIntermediate,
  _In_       UINT                               FirstSubresource,
  _In_       UINT                               NumSubresources,
             UINT64                             RequiredSize,
  _In_ const D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts,
  _In_ const UINT                               *pNumRows,
  _In_ const UINT64                             *pRowSizesInBytes,
  _In_ const D3D12_SUBRESOURCE_DATA             *pSrcData
);

Parameters

pCmdList [in]

Type: ID3D12GraphicsCommandList*

The command list, as a pointer to an ID3D12GraphicsCommandList.

pDestinationResource [in]

Type: ID3D12Resource*

The destination resource, as a pointer to an ID3D12Resource.

pIntermediate [in]

Type: ID3D12Resource*

The intermediate resource, as a pointer to an ID3D12Resource.

FirstSubresource [in]

Type: UINT

The index of the first subresource in the resource. The range of valid values is 0 to D3D12_REQ_SUBRESOURCES.

NumSubresources [in]

Type: UINT

The number of subresources in the resource. The range of valid values is 0 to (D3D12_REQ_SUBRESOURCES - FirstSubresource).

RequiredSize

Type: UINT64

The required size, in bytes, for the update.

pLayouts [in]

Type: const D3D12_PLACED_SUBRESOURCE_FOOTPRINT*

Pointer to an array (of length NumSubresources) of pointers to the structures that contains the description and placement of the resource's subresources.

pNumRows [in]

Type: const UINT*

Pointer to an array (of length NumSubresources) of UINTS containing the number of rows for each subresource.

pRowSizesInBytes [in]

Type: const UINT64*

Pointer to an array (of length NumSubresources) of UINTS containing the size, in bytes, of each row.

pSrcData [in]

Type: const D3D12_SUBRESOURCE_DATA*

Pointer to an array (of length NumSubresources) of pointers to D3D12_SUBRESOURCE_DATA structures containing descriptions of the subresource data used for the update.

Return value

Type: UINT64

The size, in bytes, of the buffer.

Requirements

Header
D3dx12.h
Library
D3D12.lib
DLL
D3D12.dll

See also

Helper Functions for D3D12

Subresources