ID3D12GraphicsCommandList1::ResolveSubresourceRegion method (d3d12.h)

Copy a region of a multisampled or compressed resource into a non-multisampled or non-compressed resource.

Syntax

void ResolveSubresourceRegion(
  ID3D12Resource     *pDstResource,
  UINT               DstSubresource,
  UINT               DstX,
  UINT               DstY,
  ID3D12Resource     *pSrcResource,
  UINT               SrcSubresource,
  D3D12_RECT         *pSrcRect,
  DXGI_FORMAT        Format,
  D3D12_RESOLVE_MODE ResolveMode
);

Parameters

pDstResource

Type: ID3D12Resource*

SAL: In

Destination resource. Must be created with the D3D11_USAGE_DEFAULT flag and must be single-sampled unless its to be resolved from a compressed resource (D3D12_RESOLVE_MODE_DECOMPRESS); in this case it must have the same sample count as the compressed source.

DstSubresource

Type: UINT

SAL: In

A zero-based index that identifies the destination subresource. Use D3D12CalcSubresource to calculate the subresource index if the parent resource is complex.

DstX

Type: UINT

SAL: In

The X coordinate of the left-most edge of the destination region. The width of the destination region is the same as the width of the source rect.

DstY

Type: UINT

SAL: In

The Y coordinate of the top-most edge of the destination region. The height of the destination region is the same as the height of the source rect.

pSrcResource

Type: ID3D12Resource*

SAL: In

Source resource. Must be multisampled or compressed.

SrcSubresource

Type: UINT

SAL: In

A zero-based index that identifies the source subresource.

pSrcRect

Type: D3D12_RECT*

SAL: In_opt

Specifies the rectangular region of the source resource to be resolved. Passing NULL for pSrcRect specifies that the entire subresource is to be resolved.

Format

Type: DXGI_FORMAT

SAL: In

A DXGI_FORMAT that specifies how the source and destination resource formats are consolidated.

ResolveMode

Type: D3D12_RESOLVE_MODE

SAL: In

Specifies the operation used to resolve the source samples.

When using the D3D12_RESOLVE_MODE_DECOMPRESS operation, the sample count can be larger than 1 as long as the source and destination have the same sample count, and source and destination may specify the same resource as long as the source rect aligns with the destination X and Y coordinates, in which case decompression occurs in place.

When using the D3D12_RESOLVE_MODE_MIN, D3D12_RESOLVE_MODE_MAX, or D3D12_RESOLVE_MODE_AVERAGE operation, the destination must have a sample count of 1.

Return value

None

Remarks

ResolveSubresourceRegion operates like ResolveSubresource but allows for only part of a resource to be resolved and for source samples to be resolved in several ways. Partial resolves can be useful in multi-adapter scenarios; for example, when the rendered area has been partitioned across adapters, each adapter might only need to resolve the portion of a subresource that corresponds to its assigned partition.

Requirements

   
Target Platform Windows
Header d3d12.h
Library D3d12.lib
DLL D3d12.dll

See also

ID3D12GraphicsCommandList1