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

# D3D12_DISCARD_REGION

> Describes details for the discard-resource operation.

Describes details for the discard-resource operation.

## Syntax

```cpp theme={null}
typedef struct D3D12_DISCARD_REGION
{
    UINT NumRects;
    const D3D12_RECT  pRects;
    UINT FirstSubresource;
    UINT NumSubresources;
} D3D12_DISCARD_REGION
```

### Members

*NumRects*\
Type: UINT

The number of rectangles in the array that the **pRects** member specifies.

*pRects*\
Type: const D3D12\_RECT \*

An array of **D3D12\_RECT** structures for the rectangles in the resource to discard.
If **NULL**, [DiscardResource](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_discardresource_public) discards the entire resource.

*FirstSubresource*\
Type: UINT

Index of the first subresource in the resource to discard.

*NumSubresources*\
Type: UINT

The number of subresources in the resource to discard.

## Remarks

This structure is used by the [ID3D12GraphicsCommandList::DiscardResource](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_discardresource_public) method.

If rectangles are supplied in this structure, the resource must have 2D subresources with all specified subresources the same dimension.

## 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

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [D3D12_MIP_REGION](/reference/graphics/d3d12/structs/d3d12_mip_region_public.md)
- [D3D12_TILE_REGION_SIZE](/reference/graphics/d3d12/structs/d3d12_tile_region_size_public.md)
- [D3D12_BOX](/reference/graphics/d3d12/structs/d3d12_box_public.md)
- [D3D12_TILE_COPY_FLAGS](/reference/graphics/d3d12/enums/d3d12_tile_copy_flags_public.md)
- [D3D12_RESOURCE_DESC1](/reference/graphics/d3d12/structs/d3d12_resource_desc1_public.md)
