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:
authorClément Foucault <foucault.clem@gmail.com>2018-06-02 22:16:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-02 22:16:40 +0300
commit6c6c4da718c19443d2feef6fc8bde83cd37792a4 (patch)
tree2ba3f7da406cbbbde555024da0b592d0b330b4ba /source/blender/windowmanager/intern/wm_window.c
parentbc6358a580081dfaf5e7711733c9cd9ba7b23eaa (diff)
GPU: Fix texture being freed in threads without ogl context bound.
This is a dirty fix. A bit more cleaner approach would be to check if a context is bound and delay the deletion only in this case. Also we may want to do this orphan deletion at some other places than wm_window_swap_buffers.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 28fb4f2e011..ca5f95909f8 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -85,6 +85,7 @@
#include "GPU_framebuffer.h"
#include "GPU_init_exit.h"
#include "GPU_immediate.h"
+#include "GPU_texture.h"
#include "BLF_api.h"
#include "UI_resources.h"
@@ -2023,6 +2024,7 @@ void wm_window_raise(wmWindow *win)
void wm_window_swap_buffers(wmWindow *win)
{
+ GPU_texture_delete_orphans(); /* XXX should be done elsewhere. */
GHOST_SwapWindowBuffers(win->ghostwin);
}