![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Classes | |
| struct | FPooledUniformBuffer |
Functions | |
| uint32 | GetPoolBucketSize (uint32 NumBytes) |
| uint32 | GetPoolBucketIndex (uint32 NumBytes) |
| void | UniformBufferBeginFrame () |
| void | UpdateUniformBufferContents (FD3D11Device *Direct3DDevice, FD3D11DeviceContext *Context, FD3D11UniformBuffer *UniformBuffer, const void *Contents, uint32 ConstantBufferSize) |
Variables | |
| const int32 | NumPoolBuckets = 17 |
| const int32 | NumSafeFrames = 3 |
| TArray< FPooledUniformBuffer > | UniformBufferPool [NumPoolBuckets] |
| TArray< FPooledUniformBuffer > | SafeUniformBufferPools [NumSafeFrames][NumPoolBuckets] |
Returns the index of the bucket that the given size fits into.
Returns the size in bytes of the bucket that the given size fits into.
| void UniformBufferBeginFrame | ( | ) |
Does per-frame global updating for the uniform buffer pool.
| void UpdateUniformBufferContents | ( | FD3D11Device * | Direct3DDevice, |
| FD3D11DeviceContext * | Context, | ||
| FD3D11UniformBuffer * | UniformBuffer, | ||
| const void * | Contents, | ||
| uint32 | ConstantBufferSize | ||
| ) |
| const int32 NumPoolBuckets = 17 |
Number of size buckets to use for the uniform buffer free pool. This needs to be enough to cover the valid uniform buffer size range combined with the heuristic used to map sizes to buckets.
| const int32 NumSafeFrames = 3 |
Number of frames that a uniform buffer will not be re-used for, after being freed. This is done as a workaround for what appears to be an AMD driver bug with 11.10 drivers and a 6970 HD, Where reusing a constant buffer with D3D11_MAP_WRITE_DISCARD still in use by the GPU will result in incorrect contents randomly.
| TArray<FPooledUniformBuffer> SafeUniformBufferPools[NumSafeFrames][NumPoolBuckets] |
Uniform buffers that have been freed more recently than NumSafeFrames ago.
| TArray<FPooledUniformBuffer> UniformBufferPool[NumPoolBuckets] |
Pool of free uniform buffers, indexed by bucket for constant size search time.