ID3D12GraphicsCommandList::ClearUnorderedAccessViewUint method

Sets all the elements in a unordered-access view to the specified integer values.

Syntax

void ClearUnorderedAccessViewUint(
  D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap,
  D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle,
  ID3D12Resource              *pResource,
  const UINT [4]              Values,
  UINT                        NumRects,
  const D3D12_RECT            *pRects
);

Parameters

ViewGPUHandleInCurrentHeap

Type: D3D12_GPU_DESCRIPTOR_HANDLE

A D3D12_GPU_DESCRIPTOR_HANDLE structure that describes the GPU descriptor handle that represents the start of the heap for the unordered-access view to clear.

ViewCPUHandle

Type: D3D12_CPU_DESCRIPTOR_HANDLE

A D3D12_CPU_DESCRIPTOR_HANDLE structure that describes the CPU descriptor handle that represents the start of the heap for the render target to clear.

pResource

Type: ID3D12Resource*

A pointer to the ID3D12Resource interface that represents the unordered-access-view resource to clear.

Values

Type: const UINT[4]

A 4-component array that containing the values to fill the unordered-access-view resource with.

NumRects

Type: UINT

The number of rectangles in the array that the pRects parameter specifies.

pRects

Type: const D3D12_RECT*

An array of D3D12_RECT structures for the rectangles in the resource view to clear. If NULL, ClearUnorderedAccessViewUint clears the entire resource view.

Return Value

This method does not return a value.

Remarks

Runtime validation

Validation failure will result in the call to ID3D12GraphicsCommandList::Close returning E_INVALIDARG.

Debug layer

The debug layer will issue errors if the input values are outside of a normalized range.

The debug layer will issue an error if the subresources referenced by the view are not in the appropriate state. For ClearUnorderedAccessViewUint, the state must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS.

Requirements

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

See Also

ID3D12GraphicsCommandList