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:
authorJulian Eisel <julian@blender.org>2021-12-14 17:12:23 +0300
committerJulian Eisel <julian@blender.org>2021-12-14 17:23:50 +0300
commitb5c18288f5bdcc95ac012a1ee32d1e2859a97779 (patch)
tree738fe8ec05f87ae4132ee7bc3ad4d89be7982276 /source/blender/windowmanager/intern
parent5cce6894d2a7704dcd445d471764af4c6baa65aa (diff)
Fix T93649: Blender freezes when saving with active VR session
Dead-lock when VR viewport drawing and depsgraph updates would fight for the draw-manager GL lock. This didn't usually cause issues because the depsgraph would be evaluated at this point already, except in rare exceptions like after file writing. Fix this by ensuring the XR surface gets its depsgraph updated after handling notifiers, which is where regular windows also do the depsgraph updating.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c3
-rw-r--r--source/blender/windowmanager/intern/wm_surface.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 3e9bf413c9f..1b6df9fb0db 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -84,6 +84,7 @@
#include "wm.h"
#include "wm_event_system.h"
#include "wm_event_types.h"
+#include "wm_surface.h"
#include "wm_window.h"
#include "DEG_depsgraph.h"
@@ -382,6 +383,8 @@ void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
DEG_make_active(depsgraph);
BKE_scene_graph_update_tagged(depsgraph, bmain);
}
+
+ wm_surfaces_do_depsgraph(C);
}
void wm_event_do_refresh_wm_and_depsgraph(bContext *C)
diff --git a/source/blender/windowmanager/intern/wm_surface.c b/source/blender/windowmanager/intern/wm_surface.c
index 715f72d70cf..72b68788e79 100644
--- a/source/blender/windowmanager/intern/wm_surface.c
+++ b/source/blender/windowmanager/intern/wm_surface.c
@@ -50,6 +50,18 @@ void wm_surfaces_iter(bContext *C, void (*cb)(bContext *C, wmSurface *))
}
}
+static void wm_surface_do_depsgraph_fn(bContext *C, wmSurface *surface)
+{
+ if (surface->do_depsgraph) {
+ surface->do_depsgraph(C);
+ }
+}
+
+void wm_surfaces_do_depsgraph(bContext *C)
+{
+ wm_surfaces_iter(C, wm_surface_do_depsgraph_fn);
+}
+
void wm_surface_clear_drawable(void)
{
if (g_drawable) {