ID3D12GraphicsCommandList::DiscardResource method

Discards a resource.

Syntax

void DiscardResource(
  ID3D12Resource             *pResource,
  const D3D12_DISCARD_REGION *pRegion
);

Parameters

pResource

Type: ID3D12Resource*

A pointer to the ID3D12Resource interface for the resource to discard.

pRegion

Type: const D3D12_DISCARD_REGION*

A pointer to a D3D12_DISCARD_REGION structure that describes details for the discard-resource operation.

Return Value

This method does not return a value.

Remarks

The semantics of DiscardResource change based on the command list type.

For D3D12_COMMAND_LIST_TYPE_DIRECT, the following two rules apply:

For D3D12_COMMAND_LIST_TYPE_COMPUTE, the following rule applies: DiscardResource is not supported on command lists with either D3D12_COMMAND_LIST_TYPE_BUNDLE nor D3D12_COMMAND_LIST_TYPE_COPY.

Requirements

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

See Also

ID3D12GraphicsCommandList

Using Resource Barriers to Synchronize Resource States in Direct3D 12