Diligent::BufferDesc struct

Buffer description.

Base classes

struct DeviceObjectAttribs
Describes common device object attributes.

Public functions

auto operator==(const BufferDesc& RHS) const -> bool
Tests if two structures are equivalent.

Public variables

Uint32 uiSizeInBytes
Size of the buffer, in bytes. For a uniform buffer, this must be multiple of 16.
BIND_FLAGS BindFlags
Buffer bind flags, see Diligent::BIND_FLAGS for details.
USAGE Usage
Buffer usage, see Diligent::USAGE for details.
CPU_ACCESS_FLAGS CPUAccessFlags
CPU access flags or 0 if no CPU access is allowed, see Diligent::CPU_ACCESS_FLAGS for details.
BUFFER_MODE Mode
Buffer mode, see Diligent::BUFFER_MODE.
Uint32 ElementByteStride
Buffer element stride, in bytes.
Uint64 CommandQueueMask
Defines which command queues this buffer can be used with.

Function documentation

bool Diligent::BufferDesc::operator==(const BufferDesc& RHS) const

Tests if two structures are equivalent.

Parameters
RHS in - reference to the structure to perform comparison with
Returns
  • True if all members of the two structures except for the Name are equal.
  • False otherwise. The operator ignores DeviceObjectAttribs::Name field as it does not affect the buffer description.

Variable documentation

Uint32 Diligent::BufferDesc::ElementByteStride

Buffer element stride, in bytes.

For a structured buffer (BufferDesc::Mode equals Diligent::BUFFER_MODE_STRUCTURED) this member defines the size of each buffer element. For a formatted buffer (BufferDesc::Mode equals Diligent::BUFFER_MODE_FORMATTED) and optionally for a raw buffer (Diligent::BUFFER_MODE_RAW), this member defines the size of the format that will be used for views created for this buffer.