diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-06-02 22:16:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-06-02 22:16:40 +0300 |
commit | 6c6c4da718c19443d2feef6fc8bde83cd37792a4 (patch) | |
tree | 2ba3f7da406cbbbde555024da0b592d0b330b4ba /source/blender/gpu/intern/gpu_init_exit.c | |
parent | bc6358a580081dfaf5e7711733c9cd9ba7b23eaa (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/gpu/intern/gpu_init_exit.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_init_exit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_init_exit.c b/source/blender/gpu/intern/gpu_init_exit.c index c2f14687ff5..7b596e6d76b 100644 --- a/source/blender/gpu/intern/gpu_init_exit.c +++ b/source/blender/gpu/intern/gpu_init_exit.c @@ -34,6 +34,7 @@ #include "GPU_init_exit.h" /* interface */ #include "GPU_immediate.h" #include "GPU_batch.h" +#include "GPU_texture.h" #include "BKE_global.h" #include "intern/gpu_codegen.h" @@ -56,6 +57,7 @@ void GPU_init(void) gpu_extensions_init(); /* must come first */ + GPU_texture_init_orphans(); gpu_codegen_init(); if (G.debug & G_DEBUG_GPU) @@ -80,6 +82,8 @@ void GPU_exit(void) gpu_batch_exit(); + GPU_texture_exit_orphans(); + if (G.debug & G_DEBUG_GPU) gpu_debug_exit(); |