From ac60a67b3f6eacbcff5b5c4716fd5e3902511a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 11 Aug 2020 01:58:23 +0200 Subject: Cleanup: GPU: Remove Batch vao cache reset This is done at drawtime automatically. --- source/blender/gpu/intern/gpu_batch_presets.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'source/blender/gpu/intern/gpu_batch_presets.c') 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(); -} - /** \} */ -- cgit v1.2.3