ID3D11DeviceContext::ResolveSubresource Method

Copy a multisampled resource into a non-multisampled resource.

Syntax

public:
void ResolveSubresource(
         ID3D11Resource *pDstResource,
         UINT DstSubresource,
         ID3D11Resource *pSrcResource,
         UINT SrcSubresource,
         DXGI_FORMAT Format
)  

Parameters

pDstResource
Type: ID3D11Resource *

[in] Destination resource. Must be a created with the D3D11_USAGE_DEFAULT flag and be single-sampled. See ID3D11Resource.

DstSubresource
Type: UINT 

[in] A zero-based index, that identifies the destination subresource. Use D3D11CalcSubresource to calculate the index.

pSrcResource
Type: ID3D11Resource *

[in] Source resource. Must be multisampled.

SrcSubresource
Type: UINT 

[in] >The source subresource of the source resource.

Format
Type: DXGI_FORMAT 

[in] A DXGI_FORMAT that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks.

Return value

None.

Remarks

This API is most useful when re-using the resulting rendertarget of one render pass as an input to a second render pass.

The source and destination resources must be the same resource type and have the same dimensions. In addition, they must have compatible formats. There are three scenarios for this:

Scenario Requirements
Source and destination are prestructured and typed Both the source and destination must have identical formats and that format must be specified in the Format parameter.
One resource is prestructured and typed and the other is prestructured and typeless The typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is DXGI_FORMAT_R32_FLOAT and the typeless resource is DXGI_FORMAT_R32_TYPELESS). The format of the typed resource must be specified in the Format parameter.
Source and destination are prestructured and typeless Both the source and destination must have the same typeless format (i.e. both must have DXGI_FORMAT_R32_TYPELESS), and the Format parameter must specify a format that is compatible with the source and destination (i.e. if both are DXGI_FORMAT_R32_TYPELESS then DXGI_FORMAT_R32_FLOAT could be specified in the Format parameter). For example, given the DXGI_FORMAT_R16G16B16A16_TYPELESS format:
  • The source (or dest) format could be DXGI_FORMAT_R16G16B16A16_UNORM
  • The dest (or source) format could be DXGI_FORMAT_R16G16B16A16_FLOAT

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext

ID3D11DeviceContext Members