Age | Commit message (Collapse) | Author |
|
|
|
Our new guarded allocator implementation has much smaller memory
block size overhead and doesn't have any locks now. So in order
to make fuller track of what's happening in blender and avoid
confusion why certain circumstances reports much less memory than
others we'll now switch to guarded allocator.
This was actually one of the biggest reasons of the confusion in
the recent memory usage investigation. There's still some overhead
is happening due to non-freeing nature of arena allocator but the
things are not nearly as bad as they looked before: memory overhead
is measured in tens of megabytes, not hundreds as it looked before.
Plus with some smarter allocation policy we can almost eliminate this
overhead.
|
|
Allocating the iterator from a BLI_memarena wasn't threadsafe.
Change the API to use stack memory for iterators.
Thanks to @mont29 for finding exact cause of the bug.
|
|
also edit comments for knife tool
|
|
|
|
|
|
This seems to be giving speedup up to 10% in own tests.
--
svn merge -r60104:60105 ^/branches/soc-2013-depsgraph_mt
|
|
|
|
remove MEM_sys_types.h which was a duplicate.
|
|
Checked and subsurf level 11 gives over 3 million faces from a single triangle. So use this as a limit.
|
|
|
|
|
|
earlier on.
Also some minor formatting.
|
|
|
|
|
|
or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc
|
|
Subsurf on wire edges gave smooth results even if set to simple
subdiv. Added a field to the CCG meshIFC to flag simple subdivision,
then when syncing vertices simply skip moving vertices if in
simple-subdiv mode.
This change affects two places, the level-1 build in sync and the
subdivision up to other levels.
Fixes bug [#32268] Simple Subsurf Modifier gives unexpected results on
edges without faces
projects.blender.org/tracker/index.php?func=detail&aid=32268&group_id=9&atid=498
|
|
|
|
|
|
Changed the "exterior edge interior shift" section of subsurf calc to
always treat boundary edges the same, regardless of sharpness. We
should revisit subsurf creasing to see if more consistent and
predictable results are possible, but for now this a non-intrusive way
to avoid wavyness along the boundary.
Fixes bug [#31864] Artifacts when using Subsurf+Crease on plane
http://projects.blender.org/tracker/index.php?func=detail&aid=31864&group_id=9&atid=498
|
|
No functional changes.
|
|
also fix for building ghost test and fix double free in one of the tests
|
|
with ';' like normal function.
... without this some editors dont parse the source so well.
|
|
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
|
|
|
|
|
|
|
|
|
|
* Add new CCG function ccgSubSurf_setAllocMask(). Similar to to
ccgSubSurf_setCalcVertexNormals(), it sets whether the CCG elements
have a mask layer and what that layer's offset is. Unlike normals
however, it doesn't change any behavior during CCG calculation; it's
there only to give CCGKey information on the mask.
* Add a new flag to _getSubSurf(), CCG_ALLOC_MASK. If set, space for
an extra layer is allocated, but the number of CCG layers is not set
to include it. This is done because GridPaintMasks are absolute,
rather than being relative to the subdivided output (as MDisp
displacements are), so we skip subdividing paint masks here.
* Add a new flag to subsurf_make_derived_from_derived(),
SUBSURF_ALLOC_PAINT_MASK. This controls whether CCG_ALLOC_MASK is
set for _getSubSurf(). Related, masks are never loaded in during
ss_sync_from_derivedmesh(). After subdivision is finished, if the
alloc mask flag is set, the number of CCG layers is increase to 4
with ccgSubSurf_setNumLayers().
* Add a new flag to multires_make_from_derived(),
MULTIRES_ALLOC_PAINT_MASK. Not all multires functions need paint
mask data (e.g. multiresModifier_base_apply.) This flag is always
set in MOD_multires.c so that subdividing a mesh with a mask updates
properly even when not in sculpt mode.
* Update multiresModifier_disp_run() to apply, calculate, and add mask
elements. It's almost the same as the existing operations with xyz
coordinates, but treats masks as absolute rather than displacements
relative to subdivided values.
* Update multires_customdata_delete to free CD_GRID_PAINT_MASK in
addition to CD_MDISPS.
* Update multires_del_higher() to call the new function
multires_grid_paint_mask_downsample(), which allocates a
lower-resolution paint mask grid and copies values over from the
high-resolution grid.
|
|
CCGKey caches information about the CCGSubSurf element layout. This
data, along with the CCG_* inline functions, allows access to
CCGSubSurf elements with an arbitrary number of layers (as opposed to
the hardcoded DMGridData structure which assumes xyz coordinates
followed by three normal components.)
The CCGElem structure is declared but not defined anywhere, just used
as a convenient type.
|
|
The layout of vert data in CCGSubSurf is almost the same; previously
it was three floats (for xyz coordinate) optionally followed by three
floats for the normal. The only change is that the first three floats
can now be any number of floats.
* _getSubSurf takes a numLayers parameter to set the number of layers,
stored in CCGMeshIFC.numLayers.
* All calls to _getSubSurf currently have numLayers set to 3, except
for UV subsurf, where it is reduced to 2 (with a corresponding
change when reading the results out to use float (*)[2] rather than
float (*)[3].)
* The various VertData* macros in CCGSubSurf.c are now functions that
take a CCGSubSurf pointer, which provides access to CCGMeshIFC,
which has numLayers.
* Add ccgSubSurf_setNumLayers() to the API. Only changes the number of
layers that get subdivided, doesn't change the amount of memory
allocated. So if space for N layers is allocated, it's safe to set
the number of layers to less than N, but not more.
* The rest of the changes are just adding the 'ss' parameter.
|
|
|
|
were calculated 3 times, cuts 78 instructions from resulting assembly (gcc -O2).
|
|
when calling _face_getIFCoEdge. add asset so passing wrong value errors out in debug mode. gives small speedup to subsurf.
|
|
|
|
|
|
ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.
|
|
|
|
Remove 'CCGSubSurf *ss' parameter from ccgSubSurf_getFaceFaceHandle,
ccgSubSurf_getFaceVert, and ccgSubSurf_getFaceEdge.
|
|
|
|
|
|
Patch from Jason Wilkins:
http://projects.blender.org/tracker/index.php?func=detail&aid=30350&group_id=9&atid=127
|
|
|
|
The new functions are ccg_gridsize, ccg_edgesize, ccg_spacing, and
ccg_edgebase. These target most of the left-shift operations in the
code.
|
|
|
|
|
|
any face.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
faces,
Noted that a floating point exception caused by this r28953.
With the render engine using DerivedMesh normals this came up as a memory error when rendering some files.
for now zero the normals, could interpolate between vertex normals if needed.
|