GetRequiredIntermediateSize function

Returns the required size of a buffer to be used for data upload.

Syntax

UINT64 inline GetRequiredIntermediateSize(
  _In_ ID3D12Resource *pDestinationResource,
  _In_ UINT           FirstSubresource,
  _In_ UINT           NumSubresources
);

Parameters

pDestinationResource [in]

Type: ID3D12Resource*

A pointer to the ID3D12Resource interface that represents the destination resource.

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).

Return value

Type: UINT64

The size of the buffer, in bytes.

Requirements

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

See also

Helper Functions for D3D12