![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <DynamicBufferAllocator.h>
Inheritance diagram for FGlobalDynamicReadBuffer:Classes | |
| struct | FAllocation |
Protected Member Functions | |
| virtual RENDERCORE_API void | InitRHI (FRHICommandListBase &RHICmdList) override |
| virtual RENDERCORE_API void | ReleaseRHI () override |
| RENDERCORE_API void | Cleanup () |
| RENDERCORE_API void | IncrementTotalAllocations (uint32 Num) |
| template<EPixelFormat Format, typename Type > | |
| FAllocation | AllocateInternal (FDynamicReadBufferPool *BufferPool, uint32 Num) |
Protected Member Functions inherited from FRenderResource | |
| void | SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel) |
| const FStaticFeatureLevel | GetFeatureLevel () const |
| bool | HasValidFeatureLevel () const |
| template<typename T > | |
| FBufferRHIRef | CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName) |
| void | SetInitPhase (EInitPhase InInitPhase) |
Additional Inherited Members | |
Public Types inherited from FRenderResource | |
| enum class | EInitPhase : uint8 { Pre , Default , MAX } |
Static Public Member Functions inherited from FRenderResource | |
| static RENDERCORE_API void | ReleaseRHIForAllResources () |
| static RENDERCORE_API void | InitPreRHIResources () |
| static RENDERCORE_API void | ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel) |
| static RENDERCORE_API FName | SetScopeName (FName Name) |
Public Attributes inherited from FRenderResource | |
| ERenderResourceState | ResourceState = ERenderResourceState::Default |
Static Protected Member Functions inherited from FRenderResource | |
| static RENDERCORE_API FRHICommandListBase & | GetImmediateCommandList () |
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.
| FGlobalDynamicReadBuffer::FGlobalDynamicReadBuffer | ( | ) |
| FGlobalDynamicReadBuffer::~FGlobalDynamicReadBuffer | ( | ) |
| FGlobalDynamicReadBuffer::FAllocation FGlobalDynamicReadBuffer::AllocateFloat | ( | uint32 | Num | ) |
| FGlobalDynamicReadBuffer::FAllocation FGlobalDynamicReadBuffer::AllocateHalf | ( | uint32 | Num | ) |
| FGlobalDynamicReadBuffer::FAllocation FGlobalDynamicReadBuffer::AllocateInt32 | ( | uint32 | Num | ) |
|
protected |
| FGlobalDynamicReadBuffer::FAllocation FGlobalDynamicReadBuffer::AllocateUInt32 | ( | uint32 | Num | ) |
|
protected |
|
inline |
| void FGlobalDynamicReadBuffer::Commit | ( | FRHICommandListImmediate & | RHICmdList | ) |
Commits allocated memory to the GPU. WARNING: Once this buffer has been committed to the GPU, allocations remain valid only until the next call to Allocate!
|
overrideprotectedvirtual |
Initializes the RHI resources used by this resource. Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.
Reimplemented from FRenderResource.
| bool FGlobalDynamicReadBuffer::IsRenderAlarmLoggingEnabled | ( | ) | const |
Returns true if log statements should be made because we exceeded GMaxVertexBytesAllocatedPerFrame
|
overrideprotectedvirtual |
Releases the RHI resources used by this resource. Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.
Reimplemented from FRenderResource.
|
protected |
|
protected |
The pools of read buffers from which allocations are made.
|
protected |
|
protected |
|
protected |
|
protected |
A total of all allocations made since the last commit. Used to alert about spikes in memory usage.
|
protected |