> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ResolveSubresourceRegion

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

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

## Syntax

```cpp theme={null}
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 \[in]*\
Type: ID3D12Resource \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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 \[in]*\
Type: UINT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

A zero-based index that identifies the destination subresource. Use [D3D12CalcSubresource](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12calcsubresource) to calculate the subresource index if the parent resource is complex.

*DstX \[in]*\
Type: UINT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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 \[in]*\
Type: UINT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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 \[in]*\
Type: ID3D12Resource \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

Source resource. Must be multisampled or compressed.

*SrcSubresource \[in]*\
Type: UINT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

A zero-based index that identifies the source subresource.

*pSrcRect \[in, optional]*\
Type: D3D12\_RECT \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In\_opt*</code>

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

*Format \[in]*\
Type: DXGI\_FORMAT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

A DXGI\_FORMAT that specifies how the source and destination resource formats are consolidated.

*ResolveMode \[in]*\
Type: D3D12\_RESOLVE\_MODE

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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

Type: void

None.

## Remarks

ResolveSubresourceRegion operates like [ResolveSubresource](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_resolvesubresource_public) 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

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12GraphicsCommandList1](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/id3d12graphicscommandlist1_public)


## Related topics

- [D3D12_RESOLVE_MODE](/reference/graphics/d3d12/enums/d3d12_resolve_mode_public.md)
- [SetSamplePositions](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_setsamplepositions_public.md)
- [D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS](/reference/graphics/d3d12/structs/d3d12_render_pass_ending_access_resolve_subresource_parameters_public.md)
- [D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS](/reference/graphics/d3d12/structs/d3d12_render_pass_ending_access_resolve_parameters_public.md)
- [D3D12_DISCARD_REGION](/reference/graphics/d3d12/structs/d3d12_discard_region_public.md)
