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:
authorOmar Emara <mail@OmarEmara.dev>2022-08-31 17:59:54 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-08-31 17:59:54 +0300
commit2a13ce1e61d8881d445293a132d087eb8c14bdc3 (patch)
tree4fa9a281e99a7006b5b70d8f3d846953a2a3c5c1 /source/blender/draw/intern/draw_view_data.h
parent370b17a8c6b61c81ed98be979ad098c46aedf073 (diff)
Fix T100700: Compositor crashes when disabled then enabled
The viewport compositor crashes when it is disabled then enabled after the compositor node tree is edited. This happens because the compositor engine uses the view_update callback of the draw engine type to detect changes in the node tree and reset its state for future evaluation. However, the draw manager only calls the view_update callback for enabled engines, so the compositor never receives the needed updates to properly reset its state and then crashes at draw time. This patch call the view_update callback for all registered engines regardless if they are enabled or not, that way, they always receive the potentially important updated needed to maintain a correct state. Aside from the compositor engine, this change affects the EEVEE and Workbench engines because they are the only engines that utilizes this callback. However, both of them only reset a flag that is checked at draw time. So the change should have no side effects. For the EEVEE engine, we just add a null check in case it was not instanced, while Workbench already have the appropriate null check. Differential Revision: https://developer.blender.org/D15821 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/draw/intern/draw_view_data.h')
-rw-r--r--source/blender/draw/intern/draw_view_data.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_view_data.h b/source/blender/draw/intern/draw_view_data.h
index 918b9e81f87..f2c34c15f08 100644
--- a/source/blender/draw/intern/draw_view_data.h
+++ b/source/blender/draw/intern/draw_view_data.h
@@ -107,6 +107,7 @@ ViewportEngineData *DRW_view_data_engine_data_get_ensure(DRWViewData *view_data,
void DRW_view_data_use_engine(DRWViewData *view_data, struct DrawEngineType *engine_type);
void DRW_view_data_reset(DRWViewData *view_data);
void DRW_view_data_free_unused(DRWViewData *view_data);
+void DRW_view_data_engines_view_update(DRWViewData *view_data);
double *DRW_view_data_cache_time_get(DRWViewData *view_data);
DefaultFramebufferList *DRW_view_data_default_framebuffer_list_get(DRWViewData *view_data);
DefaultTextureList *DRW_view_data_default_texture_list_get(DRWViewData *view_data);