Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_lightcache.c
| Show First 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | LightCache *EEVEE_lightcache_create(const int grid_len, | ||||
| } | } | ||||
| return light_cache; | return light_cache; | ||||
| } | } | ||||
| static bool eevee_lightcache_static_load(LightCache *lcache) | static bool eevee_lightcache_static_load(LightCache *lcache) | ||||
| { | { | ||||
| /* We use fallback if a texture is not setup and there is no data to restore it. */ | /* We use fallback if a texture is not setup and there is no data to restore it. */ | ||||
| if ((!lcache->grid_tx.tex && !lcache->grid_tx.data) || | if ((!lcache->grid_tx.tex && !lcache->grid_tx.data) || !lcache->grid_data || | ||||
| (!lcache->cube_tx.tex && !lcache->cube_tx.data)) { | (!lcache->cube_tx.tex && !lcache->cube_tx.data) || !lcache->cube_data) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* If cache is too big for this GPU. */ | /* If cache is too big for this GPU. */ | ||||
| if (lcache->cube_tx.tex_size[2] > GPU_max_texture_layers()) { | if (lcache->cube_tx.tex_size[2] > GPU_max_texture_layers()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (lcache->grid_tx.tex == NULL) { | if (lcache->grid_tx.tex == NULL) { | ||||
| ▲ Show 20 Lines • Show All 1,047 Lines • Show Last 20 Lines | |||||