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/gpu/GPU_texture.h
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/gpu/GPU_texture.h')
-rw-r--r--source/blender/gpu/GPU_texture.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 737b4a542c8..2427301782c 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -173,6 +173,11 @@ void GPU_invalid_tex_free(void);
void GPU_texture_free(GPUTexture *tex);
+void GPU_texture_init_orphans(void);
+void GPU_texture_exit_orphans(void);
+/* This has to be called from a thread with an ogl context bound. */
+void GPU_texture_delete_orphans(void);
+
void GPU_texture_ref(GPUTexture *tex);
void GPU_texture_bind(GPUTexture *tex, int number);
void GPU_texture_unbind(GPUTexture *tex);