D3D12_BUFFER_UAV structure (d3d12.h)

Describes the elements in a buffer to use in a unordered-access view.

Syntax

typedef struct D3D12_BUFFER_UAV {
  UINT64                 FirstElement;
  UINT                   NumElements;
  UINT                   StructureByteStride;
  UINT64                 CounterOffsetInBytes;
  D3D12_BUFFER_UAV_FLAGS Flags;
} D3D12_BUFFER_UAV;

Members

FirstElement

The zero-based index of the first element to be accessed.

NumElements

The number of elements in the resource. For structured buffers, this is the number of structures in the buffer.

StructureByteStride

The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer.

CounterOffsetInBytes

The counter offset, in bytes.

Flags

A D3D12_BUFFER_UAV_FLAGS-typed value that specifies the view options for the resource.

Remarks

Use this structure with a D3D12_UNORDERED_ACCESS_VIEW_DESC structure to view the resource as a buffer.

If StructureByteStride value is not 0, a view of a structured buffer is created and the D3D12_UNORDERED_ACCESS_VIEW_DESC::Format field must be DXGI_FORMAT_UNKNOWN. If StructureByteStride is 0, a typed view of a buffer is created and a format must be supplied. The specified format for the typed view must be supported by the hardware. More information on this topic can be found in the Typed unordered access view (UAV) loads page.

Requirements

Requirement Value
Header d3d12.h

See also

Core Structures

Typed unordered access view (UAV) loads