diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-11 02:58:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-13 15:20:24 +0300 |
commit | ac60a67b3f6eacbcff5b5c4716fd5e3902511a29 (patch) | |
tree | 486054624ca8c881751b2569cc872b37fb0b8695 /source/blender/gpu | |
parent | efc97b3919ea4fd46b9d2e931ca3fea27e7ea31c (diff) |
Cleanup: GPU: Remove Batch vao cache reset
This is done at drawtime automatically.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/GPU_batch_presets.h | 3 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.cc | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_batch_presets.c | 25 |
4 files changed, 0 insertions, 35 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 33d539e3a9e..d57739156f8 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -112,8 +112,6 @@ void GPU_batch_clear(GPUBatch *); void GPU_batch_discard(GPUBatch *); /* verts & elem are not discarded */ -void GPU_batch_vao_cache_clear(GPUBatch *); - void GPU_batch_instbuf_set(GPUBatch *, GPUVertBuf *, bool own_vbo); /* Instancing */ void GPU_batch_elembuf_set(GPUBatch *batch, GPUIndexBuf *elem, bool own_ibo); diff --git a/source/blender/gpu/GPU_batch_presets.h b/source/blender/gpu/GPU_batch_presets.h index 1674cf776db..7a235dd0e12 100644 --- a/source/blender/gpu/GPU_batch_presets.h +++ b/source/blender/gpu/GPU_batch_presets.h @@ -46,11 +46,8 @@ struct GPUBatch *GPU_batch_preset_panel_drag_widget(const float pixelsize, void gpu_batch_presets_init(void); void gpu_batch_presets_register(struct GPUBatch *preset_batch); bool gpu_batch_presets_unregister(struct GPUBatch *preset_batch); -void gpu_batch_presets_reset(void); void gpu_batch_presets_exit(void); -void GPU_batch_presets_reset(void); - #ifdef __cplusplus } #endif diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 995e1afb236..7b006bdc6c2 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -48,11 +48,6 @@ using namespace blender::gpu; -void GPU_batch_vao_cache_clear(GPUBatch *UNUSED(batch)) -{ - /* TODO remove */ -} - /* -------------------------------------------------------------------- */ /** \name Creation & Deletion * \{ */ diff --git a/source/blender/gpu/intern/gpu_batch_presets.c b/source/blender/gpu/intern/gpu_batch_presets.c index 3d9b4326c7e..71c971d8656 100644 --- a/source/blender/gpu/intern/gpu_batch_presets.c +++ b/source/blender/gpu/intern/gpu_batch_presets.c @@ -380,18 +380,6 @@ bool gpu_batch_presets_unregister(GPUBatch *preset_batch) return false; } -void gpu_batch_presets_reset(void) -{ - BLI_mutex_lock(&g_presets_3d.mutex); - /* Reset vao caches for these every time we switch opengl context. - * This way they will draw correctly for each window. */ - LISTBASE_FOREACH (LinkData *, link, &presets_list) { - GPUBatch *preset = link->data; - GPU_batch_vao_cache_clear(preset); - } - BLI_mutex_unlock(&g_presets_3d.mutex); -} - void gpu_batch_presets_exit(void) { LinkData *link; @@ -404,17 +392,4 @@ void gpu_batch_presets_exit(void) BLI_mutex_end(&g_presets_3d.mutex); } -/** - * This function only needs to be accessed externally because - * we are drawing UI batches with the DRW old context. - * - * And now we use it for drawing the entire area. - * - * XXX (Clément) - to cleanup in the upcoming 2.91 refactor. - **/ -void GPU_batch_presets_reset() -{ - gpu_batch_presets_reset(); -} - /** \} */ |