ID3D11DeviceContext1::DiscardView1 method (d3d11_1.h)
Discards the specified elements in a resource view from the device context.
Syntax
void DiscardView1(
[in] ID3D11View *pResourceView,
[in, optional] const D3D11_RECT *pRects,
UINT NumRects
);
Parameters
[in] pResourceView
Type: ID3D11View*
A pointer to the ID3D11View interface for the resource view to discard. The resource that underlies the view must have been created with usage D3D11_USAGE_DEFAULT or D3D11_USAGE_DYNAMIC, otherwise the runtime drops the call to DiscardView1; if the debug layer is enabled, the runtime returns an error message.
[in, optional] pRects
Type: const D3D11_RECT*
An array of D3D11_RECT structures for the rectangles in the resource view to discard. If NULL, DiscardView1 discards the entire view and behaves the same as DiscardView.
NumRects
Type: UINT
Number of rectangles in the array that the pRects parameter specifies.
Return value
None
Remarks
DiscardView1 informs the graphics processing unit (GPU) that the existing content in the specified elements in the resource view that pResourceView points to is no longer needed. The view can be an SRV, RTV, UAV, or DSV. DiscardView1 is a variation on the DiscardResource method. DiscardView1 allows you to discard elements of a subset of a resource that is in a view (such as elements of a single miplevel). More importantly, DiscardView1 provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, DiscardResource can do the job for any resource.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | 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 |