LLGL 0.05 Beta
Loading...
Searching...
No Matches
Buffer utility functions to determine buffer types.

Functions

LLGL_EXPORT bool LLGL::IsTypedBuffer (const BufferDescriptor &desc)
 Returns true if the buffer descriptor denotes a typed buffer, i.e. Buffer or RWBuffer in HLSL.
LLGL_EXPORT bool LLGL::IsStructuredBuffer (const BufferDescriptor &desc)
 Returns true if the buffer descriptor denotes a structured buffer, i.e. StructuredBuffer, RWStructuredBuffer, AppendStructuredBuffer, or ConsumeStructuredBuffer in HLSL.
LLGL_EXPORT bool LLGL::IsByteAddressBuffer (const BufferDescriptor &desc)
 Returns true if the buffer descriptor denotes a byte address buffer, i.e. ByteAddressBuffer or RWByteAddressBuffer in HLSL.

Detailed Description

Function Documentation

◆ IsByteAddressBuffer()

LLGL_EXPORT bool LLGL::IsByteAddressBuffer ( const BufferDescriptor & desc)

Returns true if the buffer descriptor denotes a byte address buffer, i.e. ByteAddressBuffer or RWByteAddressBuffer in HLSL.

◆ IsStructuredBuffer()

LLGL_EXPORT bool LLGL::IsStructuredBuffer ( const BufferDescriptor & desc)

Returns true if the buffer descriptor denotes a structured buffer, i.e. StructuredBuffer, RWStructuredBuffer, AppendStructuredBuffer, or ConsumeStructuredBuffer in HLSL.

Remarks
If the bind flags contain BindFlags::VertexBuffer, it is not considered a structured buffer since those are mutually exclusive in D3D.

◆ IsTypedBuffer()

LLGL_EXPORT bool LLGL::IsTypedBuffer ( const BufferDescriptor & desc)

Returns true if the buffer descriptor denotes a typed buffer, i.e. Buffer or RWBuffer in HLSL.

Remarks
This requires that the stride is zero, unless the bind flags contain BindFlags::VertexBuffer, since it cam no longer be considered a structured buffer as those are mutually exclusive in D3D.