Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-04 20:52:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-05 03:26:44 +0300
commit6be8b6af4006e088ac4a2cd8c1adc8f18c04035b (patch)
treeb1fdd6632646e8cc87015294b6a394087ee54583 /source/blender/blenloader
parentd1b3da697d814bcb35a718d2d7c660bd2120cb4b (diff)
EEVEE: LightCache: Prevent crash when using a lightcache too big
Some implementation have different maximum texture size. This patch avoid crash when texture allocation fails when: - trying to bake a lightcache too big for the OpenGL imeplementaion. - loading a cache from file that is too big for the OpenGL imeplementation.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9f5e474e479..4abf37e66bc 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6048,6 +6048,7 @@ static void direct_link_lightcache_texture(BlendDataReader *reader, LightCacheTe
static void direct_link_lightcache(BlendDataReader *reader, LightCache *cache)
{
+ cache->flag &= ~LIGHTCACHE_NOT_USABLE;
direct_link_lightcache_texture(reader, &cache->cube_tx);
direct_link_lightcache_texture(reader, &cache->grid_tx);