ID3D11DeviceContext1::DiscardResource method

Discards a resource from the device context.

Syntax

void DiscardResource(
  ID3D11Resource *pResource
);

Parameters

pResource

Type: ID3D11Resource*

A pointer to the ID3D11Resource interface for the resource to discard. The resource must have been created with usage D3D11_USAGE_DEFAULT or D3D11_USAGE_DYNAMIC, otherwise the runtime drops the call to DiscardResource; if the debug layer is enabled, the runtime returns an error message.

Return Value

Returns nothing

Remarks

DiscardResource informs the graphics processing unit (GPU) that the existing content in the resource that pResource points to is no longer needed.

Requirements

   
Windows version Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11_1.h
Library D3D11.lib

See Also

ID3D11DeviceContext1