FGlobalDynamicReadBuffer

A system for dynamically allocating GPU memory for rendering.

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FGlobalDynamicReadBuffer

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/DynamicBufferAllocator.h

Include

#include "DynamicBufferAllocator.h"

Syntax

class FGlobalDynamicReadBuffer : public FRenderResource

Remarks

A system for dynamically allocating GPU memory for rendering. Note that this must derive from FRenderResource so that we can safely free the shader resource views for OpenGL and other platforms. If we wait until the module is shutdown, the renderer RHI will have already been destroyed and we can execute code on invalid data. By making ourself a render resource, we clean up immediately before the renderer dies.

Variables

Name Description

Protected variable

FDynamicReadBuf...

 

FloatBufferPool

The pools of read buffers from which allocations are made.

Protected variable

FDynamicReadBuf...

 

Int32BufferPool

Protected variable

size_t

 

TotalAllocatedSinceLastCommit

A total of all allocations made since the last commit. Used to alert about spikes in memory usage.

Constructors

Name Description

Public function

FGlobalDynamicReadBuffer()

Destructors

Name Description

Public function

~FGlobalDynamicReadBuffer()

Functions

Name Description

Public function

FAllocation

 

AllocateFloat

(
    uint32 Num
)

Public function

FAllocation

 

AllocateInt32

(
    uint32 Num
)

Protected function

void

 

Cleanup()

Public function

void

 

Commit()

Commits allocated memory to the GPU.

Public function Const

bool

 

IsRenderAlarmLoggingEnabled()

Returns true if log statements should be made because we exceeded GMaxVertexBytesAllocatedPerFrame

Overridden from FRenderResource

Name Description

Protected function Virtual

void

 

InitRHI()

Initializes the RHI resources used by this resource.

Protected function Virtual

void

 

ReleaseRHI()

Releases the RHI resources used by this resource.

Classes

Name

Description

Public struct

FAllocation

Information regarding an allocation from this buffer.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss