diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-04-22 16:12:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-04-22 16:23:48 +0300 |
commit | f240b5e5f712d375c82763057c1c29e95d011ca5 (patch) | |
tree | c9604d2a21fc490bc9819573e96d6d387a546882 /source/blender/render/intern | |
parent | e0852368bc2b19c924a458df4e21d3112998a180 (diff) |
Fix T87701: debug assert generating scene preview render
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/engine.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/render/intern/engine.c b/source/blender/render/intern/engine.c index 817f09f5bfe..66d38eb19c7 100644 --- a/source/blender/render/intern/engine.c +++ b/source/blender/render/intern/engine.c @@ -143,12 +143,9 @@ RenderEngine *RE_engine_create(RenderEngineType *type) static void engine_depsgraph_free(RenderEngine *engine) { if (engine->depsgraph) { - /* Need GPU context since this might free GPU buffers. This function can - * only be called from a render thread. We do not currently support - * persistent data with GPU contexts for that reason. */ + /* Need GPU context since this might free GPU buffers. */ const bool use_gpu_context = (engine->type->flag & RE_USE_GPU_CONTEXT); if (use_gpu_context) { - BLI_assert(!BLI_thread_is_main()); DRW_render_context_enable(engine->re); } @@ -623,8 +620,8 @@ RenderData *RE_engine_get_render_data(Render *re) bool RE_engine_use_persistent_data(RenderEngine *engine) { - /* See engine_depsgraph_free() for why preserving the depsgraph for - * re-renders is not supported with GPU contexts. */ + /* Re-rendering is not supported with GPU contexts, since the GPU context + * is destroyed when the render thread exists. */ return (engine->re->r.mode & R_PERSISTENT_DATA) && !(engine->type->flag & RE_USE_GPU_CONTEXT); } |