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>2020-06-23 18:19:00 +0300
committerJulian Eisel <julian@blender.org>2020-06-23 18:28:53 +0300
commit2dd60e6c2cbdf3e39ed3451ee0f67a5b00a7a5bc (patch)
treef49fd69364dfe0a045c6df0081f51d559cefb80a /source/blender/windowmanager/wm_surface.h
parent1e0426da7c735b5d59f23b2b9303d9c1d72ca7f8 (diff)
Fix T77830: Crash in VR session when opening material preview
Draw-manager mutex has to be set before activating OpenGL/GPU context. Otherwise, parallel jobs (like preview rendering) may try to activate the context from another thread. Also: Use WM wrappers for activating/releasing OpenGL context, which have an additional assert check. Suggest to backport this for 2.83.1.
Diffstat (limited to 'source/blender/windowmanager/wm_surface.h')
-rw-r--r--source/blender/windowmanager/wm_surface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/wm_surface.h b/source/blender/windowmanager/wm_surface.h
index e1b00ae1ade..bc1cc825e4b 100644
--- a/source/blender/windowmanager/wm_surface.h
+++ b/source/blender/windowmanager/wm_surface.h
@@ -38,6 +38,11 @@ typedef struct wmSurface {
void (*draw)(struct bContext *);
/** Free customdata, not the surface itself (done by wm_surface API) */
void (*free_data)(struct wmSurface *);
+
+ /** Called when surface is activated for drawing (made drawable). */
+ void (*activate)(void);
+ /** Called when surface is deactivated for drawing (current drawable cleared). */
+ void (*deactivate)(void);
} wmSurface;
/* Create/Free */