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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback