ID3D11DeviceContext1::DiscardResource Method

Discards a resource from the device context.

Syntax

public:
void DiscardResource(
         ID3D11Resource *pResource
)  

Parameters

pResource
Type: ID3D11Resource *

[in] 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

None.

Remarks

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

Requirements

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

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

See also

ID3D11DeviceContext1

ID3D11DeviceContext1 Members