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:
authorGermano Cavalcante <mano-wii>2021-06-21 22:25:53 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-06-21 22:41:50 +0300
commitb11a463e4fcd98f2fff6e05a03e97e71b93b8274 (patch)
tree6d6e3a294e19c75f3dfe2f9a1d06ab96875be04f /source/blender/editors/space_view3d/space_view3d.c
parentb665ad8621a0db265fd666542d26aed463025db1 (diff)
Refactor: Do not keep a copy of depth buffer in RegionView3D
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 8c356bc1600..c9f345b3123 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -786,12 +786,6 @@ static void view3d_main_region_free(ARegion *region)
RE_engine_free(rv3d->render_engine);
}
- if (rv3d->depths) {
- if (rv3d->depths->depths) {
- MEM_freeN(rv3d->depths->depths);
- }
- MEM_freeN(rv3d->depths);
- }
if (rv3d->sms) {
MEM_freeN(rv3d->sms);
}
@@ -815,7 +809,6 @@ static void *view3d_main_region_duplicate(void *poin)
new->clipbb = MEM_dupallocN(rv3d->clipbb);
}
- new->depths = NULL;
new->render_engine = NULL;
new->sms = NULL;
new->smooth_timer = NULL;