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:
authorBrecht Van Lommel <brecht@blender.org>2020-07-01 15:55:43 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-07-01 17:05:54 +0300
commitb5660f71fe77969a75d6b41d87a310ec252b3a4c (patch)
tree12615c0f66c9287652f81822e63987b2567fa20e /source/blender/windowmanager
parent5db82be980511ab77162a72745b2b656c8b49682 (diff)
Fix missing GPU image free in background mode
This is legacy code from before Eevee and Workbench rendering in background mode was supported. Avoid memory leak by only queueing GPU textures to be freed when we know they have been allocated. Differential Revision: https://developer.blender.org/D8172
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c2
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 6a19ce62f50..3c2bc14837d 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -1012,7 +1012,7 @@ void wm_draw_update(bContext *C)
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win;
- GPU_free_unused_buffers(bmain);
+ GPU_free_unused_buffers();
for (win = wm->windows.first; win; win = win->next) {
#ifdef WIN32
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index e0d2127ba51..cb5a039765a 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -578,7 +578,7 @@ void WM_exit_ex(bContext *C, const bool do_python)
BKE_subdiv_exit();
if (opengl_is_init) {
- GPU_free_unused_buffers(G_MAIN);
+ GPU_free_unused_buffers();
}
BKE_blender_free(); /* blender.c, does entire library and spacetypes */