struct render::ClearUniformDefinition

Inherits: GpuUniformBuffer

Base class for all uniform buffers.

Public

Constructors

ClearUniformDefinition

ClearUniformDefinition()

Methods

~GpuUniformBuffer

virtual ~GpuUniformBuffer() noexcept

Destroy

virtual void Destroy()

GetSize

u32 GetSize() const

Returns the size of the uniform buffer, in bytes.

CreateBuffer

SPtr<GpuBuffer> CreateBuffer(GpuBufferFlags flags = GpuBufferFlag::StoreOnCPUWithGPUAccess) const

Allocates a new buffer that can store all the members defined in this uniform buffer.

For buffers that are modified every frame prefer using AllocateTransient() instead.

AllocateTransient

GpuBufferSuballocation AllocateTransient()

Allocates a transient uniform buffer suballocation from the internal pool.

The transient allocation will remain valid for RenderThread::kMaximumFramesInFlight frames, after which it may be reused for other allocations. You should use this for uniform buffers that are updated every frame.

Note that transient buffer allocations might be larger than size returned by GetSize(), due to alignment requirements.

Fields

gClearValue

GpuUniformBufferMember<i32> gClearValue

Protected

Fields

mBufferSize

u32 mBufferSize

mTransientAllocationPool

TransientGpuBufferPool mTransientAllocationPool

Private

Methods

Initialize

void Initialize() override

staticMETA_GetPrevEntries

static void META_GetPrevEntries(TArray<GpuUniformBufferMemberInformation> &members, META_FirstEntry id)

META_InitPrevEntry

void META_InitPrevEntry(const TArray<GpuUniformBufferMemberInformation> &members, u32 idx, META_FirstEntry id)

staticMETA_GetPrevEntries

static void META_GetPrevEntries(TArray<GpuUniformBufferMemberInformation> &members, META_NextEntry_gClearValue id)

META_InitPrevEntry

void META_InitPrevEntry(const TArray<GpuUniformBufferMemberInformation> &members, u32 index, META_NextEntry_gClearValue id)

staticGetEntries

InitEntries

void InitEntries()