ID3D12Device8::GetCopyableFootprints1 method (d3d12.h)

Gets a resource layout that can be copied. Helps your app fill in D3D12_PLACED_SUBRESOURCE_FOOTPRINT and D3D12_SUBRESOURCE_FOOTPRINT when suballocating space in upload heaps.

Syntax

void GetCopyableFootprints1(
  const D3D12_RESOURCE_DESC1         *pResourceDesc,
  UINT                               FirstSubresource,
  UINT                               NumSubresources,
  UINT64                             BaseOffset,
  D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts,
  UINT                               *pNumRows,
  UINT64                             *pRowSizeInBytes,
  UINT64                             *pTotalBytes
);

Parameters

pResourceDesc

Type: const D3D12_RESOURCE_DESC1*

A description of the resource, as a pointer to a D3D12_RESOURCE_DESC1 structure.

FirstSubresource

Type: [in] UINT

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

NumSubresources

Type: [in] UINT

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

BaseOffset

Type: UINT64

The offset, in bytes, to the resource.

pLayouts

Type: [out, optional] D3D12_PLACED_SUBRESOURCE_FOOTPRINT*

A pointer to an array (of length NumSubresources) of D3D12_PLACED_SUBRESOURCE_FOOTPRINT structures, to be filled with the description and placement of each subresource.

pNumRows

Type: [out, optional] UINT*

A pointer to an array (of length NumSubresources) of integer variables, to be filled with the number of rows for each subresource.

pRowSizeInBytes

Type: [out, optional] UINT64*

A pointer to an array (of length NumSubresources) of integer variables, each entry to be filled with the unpadded size in bytes of a row, of each subresource.

For example, if a Texture2D resource has a width of 32 and bytes per pixel of 4, then pRowSizeInBytes returns 128.

pRowSizeInBytes should not be confused with row pitch, as examining pLayouts and getting the row pitch from that will give you 256 as it is aligned to D3D12_TEXTURE_DATA_PITCH_ALIGNMENT.

pTotalBytes

Type: [out, optional] UINT64*

A pointer to an integer variable, to be filled with the total size, in bytes.

Return value

None

Remarks

For remarks and examples, see ID3D12Device::GetCopyableFootprints.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Header d3d12.h
Library d3d12.lib
DLL d3d12.dll

See also