diff options
author | Julian Eisel <julian@blender.org> | 2021-12-14 17:12:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-12-14 17:23:50 +0300 |
commit | b5c18288f5bdcc95ac012a1ee32d1e2859a97779 (patch) | |
tree | 738fe8ec05f87ae4132ee7bc3ad4d89be7982276 /source/blender/windowmanager/wm_surface.h | |
parent | 5cce6894d2a7704dcd445d471764af4c6baa65aa (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/wm_surface.h')
-rw-r--r-- | source/blender/windowmanager/wm_surface.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/wm_surface.h b/source/blender/windowmanager/wm_surface.h index a2483d38154..e924b1e47ad 100644 --- a/source/blender/windowmanager/wm_surface.h +++ b/source/blender/windowmanager/wm_surface.h @@ -39,6 +39,8 @@ typedef struct wmSurface { void *customdata; void (*draw)(struct bContext *); + /* To evaluate the surface's depsgraph. Called as part of the main loop. */ + void (*do_depsgraph)(struct bContext *C); /** Free customdata, not the surface itself (done by wm_surface API) */ void (*free_data)(struct wmSurface *); @@ -56,6 +58,9 @@ void wm_surfaces_free(void); /* Utils */ void wm_surfaces_iter(struct bContext *C, void (*cb)(struct bContext *, wmSurface *)); +/* Evaluation. */ +void wm_surfaces_do_depsgraph(struct bContext *C); + /* Drawing */ void wm_surface_make_drawable(wmSurface *surface); void wm_surface_clear_drawable(void); |