ezEngine Release 26.9
Loading...
Searching...
No Matches
ezRenderGraphResourcePool Class Reference

#include <RenderGraphResourcePool.h>

Public Member Functions

 ezRenderGraphResourcePool (ezGALDevice *pDevice)
 
void EndFrame ()
 End-of-frame housekeeping: increments frame counter and runs periodic GC.
 
void RunGC (ezUInt32 uiMinimumAge)
 
void Clear ()
 Destroy all pooled GPU resources immediately.
 

Friends

class ezRenderGraphResourceAllocator
 

Detailed Description

Global, thread-safe transient resource pool for render graphs.

Resources are indexed by (descHash, index) pairs. The pool owns a shared pointer to every resource it creates. Allocators (ezRenderGraphResourceAllocator) also hold shared pointers, keeping the resources alive as long as any graph references them.

GC destroys GPU resources whose ref count is 1 (only the pool holds them) and that haven't been used for a configurable number of frames.

Users don't call into the pool directly. Instead, they create an ezRenderGraphResourceAllocator which manages acquire/release semantics.

Member Function Documentation

◆ RunGC()

void ezRenderGraphResourcePool::RunGC ( ezUInt32  uiMinimumAge)

Run GC: destroy GPU resources whose ref count is 1 (only pool holds them) and that haven't been used for uiMinimumAge frames.


The documentation for this class was generated from the following files: