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:
authorBrecht Van Lommel <brecht@blender.org>2020-11-09 20:13:03 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-11-09 20:49:28 +0300
commit60c4d0b5fb76a8bf2e53b760f92f3d9febecf62d (patch)
tree68a85a337f59d4af3950a2e58e199d48b64a558e /source/blender/draw/intern/draw_manager.c
parentcc5294bd91c5ac8a84feaea6553d5c7299b47ff8 (diff)
Fix T78028: crash with grease pencil and save buffers
Perform grease pencil rendering delayed in this case, as there are no render buffers available for compositing. This keeps memory usage lower, but does involve multiple depsgraph evaluation. This seems in line with the intent of the save buffers feature, to use minimal memory.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index f995582149a..a3c8a4a669f 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1735,11 +1735,10 @@ static void DRW_render_gpencil_to_image(RenderEngine *engine,
void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph)
{
- /* Early out if there are no grease pencil objects, especially important
- * to avoid failing in in background renders without OpenGL context. */
- if (!DRW_render_check_grease_pencil(depsgraph)) {
- return;
- }
+ /* This function should only be called if there are are grease pencil objects,
+ * especially important to avoid failing in in background renders without OpenGL
+ * context. */
+ BLI_assert(DRW_render_check_grease_pencil(depsgraph));
Scene *scene = DEG_get_evaluated_scene(depsgraph);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);