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>2019-05-21 01:54:03 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-22 14:29:04 +0300
commit21dc2816d6bb0a2a85e3a208830b629eb916ded0 (patch)
tree046dce1d360db51f00c6f293cd3454dcf4945622 /source/blender/draw/intern/draw_manager.c
parent657165db94f14150416c2ee2221eeeafa32603f3 (diff)
BLI_memblock: Refactor for faster iteration and allocation
Remove the clear allocation flag as it has little impact since there should be very few allocation per redraw. Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient removing them almost entirely from performance profiles.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 90e1ff708d9..5f0fb582c34 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -608,28 +608,28 @@ static void drw_viewport_var_init(void)
DST.vmempool = GPU_viewport_mempool_get(DST.viewport);
if (DST.vmempool->calls == NULL) {
- DST.vmempool->calls = BLI_memblock_create(sizeof(DRWCall), false);
+ DST.vmempool->calls = BLI_memblock_create(sizeof(DRWCall));
}
if (DST.vmempool->states == NULL) {
- DST.vmempool->states = BLI_memblock_create(sizeof(DRWCallState), false);
+ DST.vmempool->states = BLI_memblock_create(sizeof(DRWCallState));
}
if (DST.vmempool->cullstates == NULL) {
- DST.vmempool->cullstates = BLI_memblock_create(sizeof(DRWCullingState), false);
+ DST.vmempool->cullstates = BLI_memblock_create(sizeof(DRWCullingState));
}
if (DST.vmempool->shgroups == NULL) {
- DST.vmempool->shgroups = BLI_memblock_create(sizeof(DRWShadingGroup), false);
+ DST.vmempool->shgroups = BLI_memblock_create(sizeof(DRWShadingGroup));
}
if (DST.vmempool->uniforms == NULL) {
- DST.vmempool->uniforms = BLI_memblock_create(sizeof(DRWUniform), false);
+ DST.vmempool->uniforms = BLI_memblock_create(sizeof(DRWUniform));
}
if (DST.vmempool->views == NULL) {
- DST.vmempool->views = BLI_memblock_create(sizeof(DRWView), false);
+ DST.vmempool->views = BLI_memblock_create(sizeof(DRWView));
}
if (DST.vmempool->passes == NULL) {
- DST.vmempool->passes = BLI_memblock_create(sizeof(DRWPass), false);
+ DST.vmempool->passes = BLI_memblock_create(sizeof(DRWPass));
}
if (DST.vmempool->images == NULL) {
- DST.vmempool->images = BLI_memblock_create(sizeof(GPUTexture *), false);
+ DST.vmempool->images = BLI_memblock_create(sizeof(GPUTexture *));
}
DST.idatalist = GPU_viewport_instance_data_list_get(DST.viewport);