class
GpuParameterSetPool
A pool for allocating GPU parameter sets.
There are two modes of operation:
- Transient: Used for per-frame allocations. All parameter sets allocated from the pool are deallocated at once.
- Persistent: Used for persistent (multi-frame) allocations. Individual sets are deallocated as the go out of scope.
Not thread safe. All GpuParameterSets allocated from this pool must be used on the same thread.
Public
Methods
~GpuParameterSetPool
virtual ~GpuParameterSetPool() = default
Create
virtual SPtr<render::GpuParameterSet> Create(const SPtr<GpuPipelineParameterSetLayout> &layout, u32 setIndex, bool deferredInitialize = false) = 0
Creates a new parameter set from this pool.
- layout
- Layout that describes the GPU parameters for the set.
- setIndex
- Index of the parameter set that the object will be used for binding parameters for.
- deferredInitialize
- If true, Initialize() will not be called on the returned object, and the caller is expected to call it themselves before first using the object.
Returns: The created parameter set, or nullptr if allocation failed (e.g., pool exhausted).
Reset
virtual void Reset() = 0
Resets the pool, freeing all allocated sets at once.
Only relevant for transient mode pools. After calling Reset(), all previously allocated parameter sets from this pool become invalid and must not be used.
Protected
Constructors
GpuParameterSetPool
GpuParameterSetPool(const GpuParameterSetPoolCreateInformation &createInformation)
Fields
mInformation
GpuParameterSetPoolInformation mInformation