Blender V5.0
blender::eevee::ShadowTileMapPool Struct Reference

#include <eevee_shadow.hh>

Public Member Functions

Tile map pool
 ShadowTileMapPool ()
ShadowTileMapacquire ()
void release (Span< ShadowTileMap * > free_list)
void end_sync (ShadowModule &module)

Public Attributes

Vector< uintfree_indices
Pool< ShadowTileMaptilemap_pool
ShadowTileMapDataBuf tilemaps_data = {"tilemaps_data"}
ShadowTileMapDataBuf tilemaps_unused = {"tilemaps_unused"}
ShadowTileDataBuf tiles_data = {"tiles_data"}
ShadowTileMapClipBuf tilemaps_clip = {"tilemaps_clip"}
Texture tilemap_tx = {"tilemap_tx"}
int64_t last_free_len = 0

Static Public Attributes

static constexpr int64_t maps_per_row = SHADOW_TILEMAP_PER_ROW

Detailed Description

The tile-maps are managed on CPU and associated with each light shadow object.

The number of tile-maps & tiles is unbounded (to the limit of SSBOs), but the actual number used for rendering is caped to 4096. This is to simplify tile-maps management on CPU.

At sync end, all tile-maps are grouped by light inside the ShadowTileMapDataBuf so that each light has a contiguous range of tile-maps to refer to.

Definition at line 137 of file eevee_shadow.hh.

Constructor & Destructor Documentation

◆ ShadowTileMapPool()

Member Function Documentation

◆ acquire()

ShadowTileMap * blender::eevee::ShadowTileMapPool::acquire ( )

◆ end_sync()

◆ release()

void blender::eevee::ShadowTileMapPool::release ( Span< ShadowTileMap * > free_list)

Push the given list of ShadowTileMap onto the free stack. Their pages will be free.

Definition at line 176 of file eevee_shadow.cc.

References free_indices, and tilemap_pool.

Member Data Documentation

◆ free_indices

Vector<uint> blender::eevee::ShadowTileMapPool::free_indices

Vector containing available offset to tile range in the ShadowTileDataBuf.

Definition at line 143 of file eevee_shadow.hh.

Referenced by acquire(), end_sync(), release(), and ShadowTileMapPool().

◆ last_free_len

int64_t blender::eevee::ShadowTileMapPool::last_free_len = 0

Number of free tile-maps at the end of the previous sync.

Definition at line 157 of file eevee_shadow.hh.

Referenced by end_sync().

◆ maps_per_row

int64_t blender::eevee::ShadowTileMapPool::maps_per_row = SHADOW_TILEMAP_PER_ROW
staticconstexpr

Limit the width of the texture.

Definition at line 140 of file eevee_shadow.hh.

Referenced by ShadowTileMapPool().

◆ tilemap_pool

Pool<ShadowTileMap> blender::eevee::ShadowTileMapPool::tilemap_pool

Pool containing shadow tile structure on CPU.

Definition at line 145 of file eevee_shadow.hh.

Referenced by acquire(), blender::eevee::ShadowDirectional::end_sync(), blender::eevee::ShadowPunctual::end_sync(), end_sync(), and release().

◆ tilemap_tx

Texture blender::eevee::ShadowTileMapPool::tilemap_tx = {"tilemap_tx"}

Texture equivalent of ShadowTileDataBuf but grouped by light.

Definition at line 155 of file eevee_shadow.hh.

Referenced by ShadowTileMapPool().

◆ tilemaps_clip

ShadowTileMapClipBuf blender::eevee::ShadowTileMapPool::tilemaps_clip = {"tilemaps_clip"}

Clip range for directional shadows. Updated on GPU. Persistent.

Definition at line 153 of file eevee_shadow.hh.

Referenced by end_sync().

◆ tilemaps_data

ShadowTileMapDataBuf blender::eevee::ShadowTileMapPool::tilemaps_data = {"tilemaps_data"}

Sorted descriptions for each tile-map in the pool. Updated each frame.

Definition at line 147 of file eevee_shadow.hh.

Referenced by blender::eevee::ShadowDirectional::end_sync(), blender::eevee::ShadowPunctual::end_sync(), and end_sync().

◆ tilemaps_unused

ShadowTileMapDataBuf blender::eevee::ShadowTileMapPool::tilemaps_unused = {"tilemaps_unused"}

Previously used tile-maps that needs to release their tiles/pages. Updated each frame.

Definition at line 149 of file eevee_shadow.hh.

Referenced by end_sync().

◆ tiles_data

ShadowTileDataBuf blender::eevee::ShadowTileMapPool::tiles_data = {"tiles_data"}

All possible tiles. A range of tiles tile is referenced by a tile-map.

Definition at line 151 of file eevee_shadow.hh.

Referenced by end_sync().


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