Age | Commit message (Collapse) | Author |
|
Simple fix: just make pointiness aware of bump offset.
|
|
Seems it got changes by accident to int during guarded allocation work,
causing bad memory allocations.
|
|
Perhaps became broken after rather recent change about which entry point
to kernel to use.
|
|
Ideally we should get rid of those temporary vectors anyway, but
it's not so trivial because of the alignment. For untl then we'll
just have a bit worse solution. This part of code is not the root
of the issue of memory spikes for now anyway.
But since we're getting rid of temporary memory earlier actual spike
is a bit smaller as now. For example in franck_sheep file it's now
5489.69MB vs. previously 5599.90MB.
|
|
Simple change: just get rid of intermediate data a bit earlier, before
final pixels array is being allocated. This gives around 30% of memory
save during light update (this is about 60meg in the frank sheep file
i'm using here).
This isn't really visible by artists a lot, because actual spike happens
on BVH construction. But it doesn't mean we shouldn't be accurate with
memory usage in other areas.
|
|
This is a bit more logical, as it better represents the 3 primitive types we have.
|
|
Otherwise statistics could be really funny looking.
|
|
OpenCL doesn't let you to get address of vector components, which
is kinda annoying. On the other hand, maybe now compiler will have
more chances to optimize something out.
|
|
|
|
D1107 by @kevindietrich
|
|
|
|
We don't like when NULL is send to MEM_freeN(), but there was some
differences between lockfree and guarded allocators:
- Lockfree would have silently crash, in both release and debug modes
- Guarded allocator would have printed error message, abort in debug
but keep working in release build.
This commit makes lockfree allocator behavior to match guarded one.
|
|
Title pretty says it all actually. Can only briefly mention that we're
indeed entering that state when after applying some WIP patches having
much fuller statistics about memory usage would help giving exact memory
benefit.
|
|
'cmake_consistency_check.py' relies on this formattng.
|
|
This flag is global for all the sessions and never changes. so it doesn't
really make sense to pass it around to all sessions and synchronization
routines.
Switched to a static member of BlenderSession now, but it's probably more
logical to introduce some sort of BlenderGlobals. Doesn't currently worth
a hassle for a single boolean flag tho.
|
|
We only have a non-singular volume closure and therefore no need to distinguish it.
|
|
sc->T and sc->data2 were behind __HAIR__ ifdef, now they are not anymore, so we can always assign the correct value.
|
|
This is deprecated since Boost 1.48.
|
|
|
|
This will save some memory during BVH Build.
|
|
harmless but may as well initialize.
|
|
It could have happened with really long rays and small steps.
Step size will be adjusted to the clamped number of steps in order
to preserve render result compatibility as much as possible.
We should probably reformulate this a bit, so it will give the
same looking results without step tweaks. But this new behavior
should already be much better that it was before.
|
|
|
|
|
|
|
|
|
|
|
|
* Avoid duplicative fabs(g) check in sample code.
* Avoid dot product in eval code.
Helps like ~1% when Scatter Anisotropy is 0.
|
|
switch.
Most compilers will probably optimize that out, but I still don't see a reason to keep it.
|
|
This way we can do some more aggressive policy about releasing temporary
data during synchronization.
|
|
Simple fix: all vertex attributes should be filled in before split.
|
|
|
|
for.
|
|
|
|
|
|
|
|
|
|
|
|
The workaround for generated texture coordinates is to be done before
calculating number of elements for attribute, otherwise counter wouldn't
include those attributes.
|
|
The idea behind the change is to pre-allocate attribute arrays in advance,
which avoids re-allocation of arrays later for each of meshes being handled.
This reduces peak memory used by Cycles database from 1.3G to 0.9G for
victor.blend from Gooseberry.
It doesn't mean every file will benefit from this change since peak memory
usage is happening in the different places of the rendering code.
Also, unfortunately, attributes export might not cause the peak of render
preparation stage. That said, it's actually object_to_mesh() which causes
the memory to peak in the same test file. So we really need to optimize that
part first in order to get visible results for artists. But in any case it's
now quite easy to track hotspots in Cycles itself which is good.
|
|
It's actually a bad level call, but it's inside ifdef block and disabled by
default and only intended to be used for development purposes.
Main idea of this change is to combine statistics coming from Cycles and
Blender during scene synchronization step, to see if further changes are
actually reducing memory footprint.
|
|
The method is called vector::free_memory(). Use with care since it'll invalidate
all the pointers to vector memory, all iterators and so on.
Currently unused, but might become handy when clearing unused data.
|
|
This only happens when built with WITH_CYCLES_DEBUG flag, memory statistics
is coming from guarded STL allocator.
|
|
The commit implements a guarded allocator which can be used by STL classes
such as vectors, maps and so on. This allocator will keep track of current
and peak memory usage which then can be queried.
New code for allocator is only active when building Cycles with debug flag
(WITH_CYCLES_DEBUG) and doesn't distort regular builds too much.
Additionally now we're using own subclass of std::vector which allows us
to implement shrink_to_fit() method which would ensure capacity of the
vector is as big as it should be (without this making vector smaller will
still use all previous memory allocated).
|
|
This replaces our own implementation of aligned malloc with system calls,
which depends on which operation system you're on.
This is probably really minor noticeable change, but in the same time it
might reduce amount of wasted memory.
|
|
|
|
Simplify branching here a bit, helps ~3% in volume_light_sampling.blend (Branched MIS scene).
|
|
|
|
Yes, for me tablets (both wacom and no-name) were again broken - curse X11!
So now, we want ButtonPress, Button1Motion does not work anymore...
Anyway, this patch makes things much cleaner, storing each event type
in its own variable!
Patch by cedricp (Cédric PAILLE) from T43367, thanks a bunch!
|
|
|