Skip to main content
Describes the elements in a buffer resource to use in a shader-resource view.

Syntax

Members

FirstElement
Type: UINT64
The index of the first element to be accessed by the view. NumElements
Type: UINT
The number of elements in the resource. StructureByteStride
Type: UINT
The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. Flags
Type: D3D12_BUFFER_SRV_FLAGS
A D3D12_BUFFER_SRV_FLAGS-typed value that identifies view options for the buffer. Currently, the only option is to identify a raw view of the buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.

Remarks

This structure is used by D3D12_SHADER_RESOURCE_VIEW_DESC to create a view of a buffer. If the value of StructureByteStride is not 0, then a view of a structured buffer is created, and then the D3D12_SHADER_RESOURCE_VIEW_DESC::Format field must be DXGI_FORMAT_UNKNOWN. If StructureByteStride is 0, then a typed view of a buffer is created, and then a format must be supplied. The specified format for the typed view must be supported by the hardware.

Requirements

Header: d3d12_xs.h or d3d12_x.h
Library: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family

See Also

Core Structures
Last modified on August 20, 2026