Module webrender::gpu_cache [] [src]

Overview of the GPU cache.

The main goal of the GPU cache is to allow on-demand allocation and construction of GPU resources for the vertex shaders to consume.

Every item that wants to be stored in the GPU cache should create a GpuCacheHandle that is used to refer to a cached GPU resource. Creating a handle is a cheap operation, that does not allocate room in the cache.

On any frame when that data is required, the caller must request that handle, via request. If the data is not in the cache, the user provided closure will be invoked to build the data.

After end_frame has occurred, callers can use the get_address API to get the allocated address in the GPU cache of a given resource slot for this frame.

Structs

Block
BlockIndex
CacheLocation
Epoch
FreeBlockLists
GpuBlockData

A single texel in RGBAF32 texture - 16 bytes.

GpuCache

The main LRU cache interface.

GpuCacheAddress
GpuCacheHandle
GpuCacheUpdateList
GpuDataRequest

A wrapper object for GPU data requests, works as a container that can only grow.

Row
Texture

Enums

GpuCacheUpdate

Constants

FRAMES_BEFORE_EVICTION
GPU_CACHE_INITIAL_HEIGHT
NEW_ROWS_PER_RESIZE

Traits

ToGpuBlocks