Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::BufferViewDescriptor Struct Reference

Buffer views describe how to interpret a region of memory in a buffer. More...

#include <BufferViewDescriptor.h>

Public Member Functions

 AZ_TYPE_INFO (BufferViewDescriptor, "{AC5C4601-1824-434F-B070-B4A48DBDB437}")
 
 AZ_CLASS_ALLOCATOR (BufferViewDescriptor, SystemAllocator)
 
bool operator== (const BufferViewDescriptor &other) const
 
HashValue64 GetHash (HashValue64 seed=HashValue64{ 0 }) const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static BufferViewDescriptor CreateStructured (uint32_t elementOffset, uint32_t elementCount, uint32_t elementSize)
 
static BufferViewDescriptor CreateRaw (uint32_t byteOffset, uint32_t byteCount)
 
static BufferViewDescriptor CreateTyped (uint32_t elementOffset, uint32_t elementCount, Format elementFormat)
 
static BufferViewDescriptor CreateRayTracingTLAS (uint32_t totalByteCount)
 

Public Attributes

uint32_t m_elementOffset = 0
 Number of elements from the start of the buffer to offset.
 
uint32_t m_elementCount = 0
 The number of elements in the view.
 
uint32_t m_elementSize = 0
 The size in bytes of each element.
 
Format m_elementFormat = Format::Unknown
 The format of each element. Should be Unknown for structured buffers, or R32 for raw buffers.
 
BufferBindFlags m_overrideBindFlags = BufferBindFlags::None
 The bind flags used by this view. Should be compatible with the bind flags of the underlying buffer.
 
bool m_ignoreFrameAttachmentValidation = false
 
char m_pad0 = 0
 
char m_pad1 = 0
 
char m_pad2 = 0
 

Detailed Description

Buffer views describe how to interpret a region of memory in a buffer.

Member Function Documentation

◆ CreateRaw()

static BufferViewDescriptor AZ::RHI::BufferViewDescriptor::CreateRaw ( uint32_t  byteOffset,
uint32_t  byteCount 
)
static

Creates a raw (unsigned 32bit integral) buffer view. This can be used to describe constant buffers or simple append / consume buffers.

◆ CreateRayTracingTLAS()

static BufferViewDescriptor AZ::RHI::BufferViewDescriptor::CreateRayTracingTLAS ( uint32_t  totalByteCount)
static

Creates a ray tracing TLAS buffer view. This is a specialized ray tracing buffer with a fixed element size and format.

◆ CreateStructured()

static BufferViewDescriptor AZ::RHI::BufferViewDescriptor::CreateStructured ( uint32_t  elementOffset,
uint32_t  elementCount,
uint32_t  elementSize 
)
static

Creates a structured buffer view. Structured buffers are defined by an array of non-fundamental types, or custom data structures. The exact format of the data structure is defined elsewhere (e.g. in the shader).

◆ CreateTyped()

static BufferViewDescriptor AZ::RHI::BufferViewDescriptor::CreateTyped ( uint32_t  elementOffset,
uint32_t  elementCount,
Format  elementFormat 
)
static

Creates a buffer with a fundamental type. This is similar to a structured buffer except that the type is fundamental, and thus can be described by a format.


The documentation for this struct was generated from the following file: