[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27872] branches/render25/source/blender: Render Branch:
Brecht Van Lommel
brecht at blender.org
Tue Mar 30 17:26:11 CEST 2010
Revision: 27872
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27872
Author: blendix
Date: 2010-03-30 17:26:11 +0200 (Tue, 30 Mar 2010)
Log Message:
-----------
Render Branch:
* Option Use Local Coords for raytracing was enabled when the option
in the UI was disabled.
* Avoid creating tangents on high res mesh when doing tangents space
high to low baking.
* Gave memory arena's a name used for allocations for easier memory
usage debugging.
Modified Paths:
--------------
branches/render25/source/blender/blenkernel/intern/BME_tools.c
branches/render25/source/blender/blenkernel/intern/DerivedMesh.c
branches/render25/source/blender/blenkernel/intern/modifier.c
branches/render25/source/blender/blenkernel/intern/subsurf_ccg.c
branches/render25/source/blender/blenlib/BLI_memarena.h
branches/render25/source/blender/blenlib/intern/BLI_heap.c
branches/render25/source/blender/blenlib/intern/BLI_memarena.c
branches/render25/source/blender/editors/armature/meshlaplacian.c
branches/render25/source/blender/editors/sculpt_paint/paint_image.c
branches/render25/source/blender/editors/uvedit/uvedit_parametrizer.c
branches/render25/source/blender/imbuf/intern/allocimbuf.c
branches/render25/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
branches/render25/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
branches/render25/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
branches/render25/source/blender/render/intern/source/cache.c
branches/render25/source/blender/render/intern/source/convertblender.c
branches/render25/source/blender/render/intern/source/database.c
branches/render25/source/blender/render/intern/source/diskocclusion.c
branches/render25/source/blender/render/intern/source/object_mesh.c
branches/render25/source/blender/render/intern/source/object_strand.c
branches/render25/source/blender/render/intern/source/rayshade.c
branches/render25/source/blender/render/intern/source/shadowbuf.c
branches/render25/source/blender/render/intern/source/sss.c
Modified: branches/render25/source/blender/blenkernel/intern/BME_tools.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/BME_tools.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenkernel/intern/BME_tools.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -50,7 +50,7 @@
td = MEM_callocN(sizeof(BME_TransData_Head), "BMesh transdata header");
td->gh = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp);
- td->ma = BLI_memarena_new(bufsize);
+ td->ma = BLI_memarena_new(bufsize, "BME_TransData arena");
BLI_memarena_use_calloc(td->ma);
return td;
Modified: branches/render25/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/DerivedMesh.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenkernel/intern/DerivedMesh.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -2489,7 +2489,7 @@
tangent= DM_get_face_data_layer(dm, CD_TANGENT);
/* allocate some space */
- arena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ arena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "tangent layer arena");
BLI_memarena_use_calloc(arena);
vtangents= MEM_callocN(sizeof(VertexTangent*)*totvert, "VertexTangent");
Modified: branches/render25/source/blender/blenkernel/intern/modifier.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/modifier.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenkernel/intern/modifier.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -2790,7 +2790,7 @@
}
else {
if(!mesh->arena) {
- mesh->arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ mesh->arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "edgesplit arena");
BLI_memarena_use_calloc(mesh->arena);
}
Modified: branches/render25/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/subsurf_ccg.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenkernel/intern/subsurf_ccg.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -117,7 +117,7 @@
if (useArena) {
CCGAllocatorIFC allocatorIFC;
- CCGAllocatorHDL allocator = BLI_memarena_new((1<<16));
+ CCGAllocatorHDL allocator = BLI_memarena_new((1<<16), "subsurf arena");
allocatorIFC.alloc = arena_alloc;
allocatorIFC.realloc = arena_realloc;
Modified: branches/render25/source/blender/blenlib/BLI_memarena.h
===================================================================
--- branches/render25/source/blender/blenlib/BLI_memarena.h 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenlib/BLI_memarena.h 2010-03-30 15:26:11 UTC (rev 27872)
@@ -51,7 +51,7 @@
typedef struct MemArena MemArena;
-struct MemArena* BLI_memarena_new (int bufsize);
+struct MemArena* BLI_memarena_new (int bufsize, const char *name);
void BLI_memarena_free (struct MemArena *ma);
void BLI_memarena_use_malloc (struct MemArena *ma);
Modified: branches/render25/source/blender/blenlib/intern/BLI_heap.c
===================================================================
--- branches/render25/source/blender/blenlib/intern/BLI_heap.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenlib/intern/BLI_heap.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -69,7 +69,7 @@
Heap *heap = (Heap*)MEM_callocN(sizeof(Heap), "BLIHeap");
heap->bufsize = 1;
heap->tree = (HeapNode**)MEM_mallocN(sizeof(HeapNode*), "BLIHeapTree");
- heap->arena = BLI_memarena_new(1<<16);
+ heap->arena = BLI_memarena_new(1<<16, "heap arena");
return heap;
}
Modified: branches/render25/source/blender/blenlib/intern/BLI_memarena.c
===================================================================
--- branches/render25/source/blender/blenlib/intern/BLI_memarena.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/blenlib/intern/BLI_memarena.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -41,6 +41,7 @@
struct MemArena {
unsigned char *curbuf;
int bufsize, cursize;
+ const char *name;
int use_calloc;
int align;
@@ -48,10 +49,11 @@
LinkNode *bufs;
};
-MemArena *BLI_memarena_new(int bufsize) {
+MemArena *BLI_memarena_new(int bufsize, const char *name) {
MemArena *ma= MEM_callocN(sizeof(*ma), "memarena");
ma->bufsize= bufsize;
ma->align = 8;
+ ma->name= name;
return ma;
}
@@ -94,9 +96,9 @@
else ma->cursize = ma->bufsize;
if(ma->use_calloc)
- ma->curbuf= MEM_callocN(ma->cursize, "memarena calloc");
+ ma->curbuf= MEM_callocN(ma->cursize, ma->name);
else
- ma->curbuf= MEM_mallocN(ma->cursize, "memarena malloc");
+ ma->curbuf= MEM_mallocN(ma->cursize, ma->name);
BLI_linklist_prepend(&ma->bufs, ma->curbuf);
Modified: branches/render25/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- branches/render25/source/blender/editors/armature/meshlaplacian.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/editors/armature/meshlaplacian.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -1766,7 +1766,7 @@
else
mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
BLI_memarena_use_calloc(mdb->memarena);
/* make bounding box equal size in all directions, add padding, and compute
@@ -1806,7 +1806,7 @@
/* free temporary MDefBoundIsects */
BLI_memarena_free(mdb->memarena);
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
/* start with all cells untyped */
for(a=0; a<mdb->size3; a++)
Modified: branches/render25/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/render25/source/blender/editors/sculpt_paint/paint_image.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/editors/sculpt_paint/paint_image.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -3083,7 +3083,7 @@
ps->thread_tot = BLI_system_thread_count();
}
for (a=0; a<ps->thread_tot; a++) {
- ps->arena_mt[a] = BLI_memarena_new(1<<16);
+ ps->arena_mt[a] = BLI_memarena_new(1<<16, "project paint arena");
}
arena = ps->arena_mt[0];
@@ -3706,7 +3706,7 @@
pos_ofs[0] = pos[0] - lastpos[0];
pos_ofs[1] = pos[1] - lastpos[1];
- smearArena = BLI_memarena_new(1<<16);
+ smearArena = BLI_memarena_new(1<<16, "paint smear arena");
}
/* avoid a square root with every dist comparison */
Modified: branches/render25/source/blender/editors/uvedit/uvedit_parametrizer.c
===================================================================
--- branches/render25/source/blender/editors/uvedit/uvedit_parametrizer.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/editors/uvedit/uvedit_parametrizer.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -4027,7 +4027,7 @@
MEM_freeN(nodesx);
MEM_freeN(nodesy);
- arena = BLI_memarena_new(1<<16);
+ arena = BLI_memarena_new(1<<16, "param smooth arena");
root = p_node_new(arena, tri, esize*2, minv, maxv, 0);
for (v=chart->verts; v; v=v->nextlink)
@@ -4047,7 +4047,7 @@
PHandle *handle = MEM_callocN(sizeof*handle, "PHandle");
handle->construction_chart = p_chart_new(handle);
handle->state = PHANDLE_STATE_ALLOCATED;
- handle->arena = BLI_memarena_new((1<<16));
+ handle->arena = BLI_memarena_new((1<<16), "param construct arena");
handle->aspx = 1.0f;
handle->aspy = 1.0f;
Modified: branches/render25/source/blender/imbuf/intern/allocimbuf.c
===================================================================
--- branches/render25/source/blender/imbuf/intern/allocimbuf.c 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/imbuf/intern/allocimbuf.c 2010-03-30 15:26:11 UTC (rev 27872)
@@ -302,7 +302,7 @@
imb_freerectImBuf(ibuf);
size = ibuf->x * ibuf->y;
- size = size * sizeof(unsigned int);
+ size = size * sizeof(unsigned int);
if ( (ibuf->rect = MEM_mapallocN(size, "imb_addrectImBuf")) ){
ibuf->mall |= IB_rect;
Modified: branches/render25/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
===================================================================
--- branches/render25/source/blender/render/intern/raytrace/rayobject_qbvh.cpp 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/render/intern/raytrace/rayobject_qbvh.cpp 2010-03-30 15:26:11 UTC (rev 27872)
@@ -52,10 +52,10 @@
rtbuild_done(obj->builder, &obj->rayobj.control);
//TODO find a away to exactly calculate the needed memory
- MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "qbvh arena");
BLI_memarena_use_malloc(arena1);
- MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "qbvh arena 2");
BLI_memarena_use_malloc(arena2);
BLI_memarena_use_align(arena2, 16);
Modified: branches/render25/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
===================================================================
--- branches/render25/source/blender/render/intern/raytrace/rayobject_svbvh.cpp 2010-03-30 14:58:16 UTC (rev 27871)
+++ branches/render25/source/blender/render/intern/raytrace/rayobject_svbvh.cpp 2010-03-30 15:26:11 UTC (rev 27872)
@@ -63,10 +63,10 @@
rtbuild_done(obj->builder, &obj->rayobj.control);
//TODO find a away to exactly calculate the needed memory
- MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ MemArena *arena1 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "svbvh arena");
BLI_memarena_use_malloc(arena1);
- MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ MemArena *arena2 = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "svbvh arena2");
BLI_memarena_use_malloc(arena2);
BLI_memarena_use_align(arena2, 16);
Modified: branches/render25/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list