diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-04 20:52:18 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-05 03:26:44 +0300 |
commit | 6be8b6af4006e088ac4a2cd8c1adc8f18c04035b (patch) | |
tree | b1fdd6632646e8cc87015294b6a394087ee54583 /source/blender/draw/engines/eevee/eevee_private.h | |
parent | d1b3da697d814bcb35a718d2d7c660bd2120cb4b (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/draw/engines/eevee/eevee_private.h')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 81a50d36e17..51831e5506d 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -29,6 +29,8 @@ #include "DNA_lightprobe_types.h" +#include "GPU_viewport.h" + #include "BKE_camera.h" struct EEVEE_ShadowCasterBuffer; @@ -891,6 +893,7 @@ typedef struct EEVEE_Data { EEVEE_TextureList *txl; EEVEE_PassList *psl; EEVEE_StorageList *stl; + char info[GPU_INFO_SIZE]; } EEVEE_Data; typedef struct EEVEE_PrivateData { |