diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-05-12 19:52:07 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-05-12 22:51:12 +0300 |
commit | a5eee1f935a53acba087fae89e5cffc6c37468cd (patch) | |
tree | 1120b05a51de04692018a1dab84ae2070158aa20 /source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h | |
parent | bfdb27f49402dfebeea8b3516cd0ae085b158642 (diff) |
Fix T76535: Eevee + Freestyle render crash with many strokes
Freestyle would create a huge amount of material slots with the same material,
causing issues in Eevee use of alloca().
Diffstat (limited to 'source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h index c333319ada1..9c94228414d 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h @@ -21,6 +21,8 @@ * \ingroup freestyle */ +#include "BLI_map.h" + #include "../stroke/StrokeRenderer.h" #include "../system/FreestyleConfig.h" @@ -50,15 +52,15 @@ class BlenderStrokeRenderer : public StrokeRenderer { Object *NewMesh() const; struct StrokeGroup { - explicit StrokeGroup() : totvert(0), totedge(0), totpoly(0), totloop(0), totcol(0) + explicit StrokeGroup() : totvert(0), totedge(0), totpoly(0), totloop(0) { } vector<StrokeRep *> strokes; + BLI::Map<Material *, int> materials; int totvert; int totedge; int totpoly; int totloop; - int totcol; }; vector<StrokeGroup *> strokeGroups, texturedStrokeGroups; |