Blender Git Loki

Blender Git "depsgraph_refactor" branch commits.

Page: 24 / 59

June 19, 2014, 07:02 (GMT)
rootchan variables are unused for constructing relations.
June 19, 2014, 06:57 (GMT)
Simplified operation building: Use ID pointers and component identifiers
directly instead of passing around nodes.

This is to some degree a revert of previous changes to add such nodes
explicitly. However, it only applies to ID and component nodes, which
are really nothing more than categories (sorting operations by ID and
components).

The only exception now are the node tree build functions, which still
take a "owner_node" and need to be looked at.
June 19, 2014, 05:38 (GMT)
Moved function templates for operation binding into the main
depsgraph_build.h header.
June 18, 2014, 15:37 (GMT)
Wrapper for std::bind, which will allow us to catch operation arguments
and replace them by their respective result data types.

This is just a proof of concept, it will be used later to construct a
intermediate callback, which then performs the actual binding at
scheduling time, when all the input data of an operation is actually
available.

It uses a nifty recursion trick based on the tuple index and std::get
to apply a tuple as an argument pack in std::bind. The
bind_operation_tuple function appends tuple elements to the ArgsTail
pack one by one until N==0, at which point a template specialization is
used to issue the final std::bind call.
June 18, 2014, 07:53 (GMT)
Merge branch 'master' into depsgraph_refactor
June 14, 2014, 06:28 (GMT)
Fix for node lookup from RNA pointers, this has to ensure the pointer
is non-NULL before passing it to RNA functions.
June 12, 2014, 08:05 (GMT)
Utility math classes, to provide easier type wrappers around basic
BLI float arrays.

Not used currently, but could come in handy later.
June 12, 2014, 06:18 (GMT)
Removing operation node types from the node type enum, using only the
identifier strings.

This typing was already redundant, since operations are primarily
identified by their name string. Having to pass a type enum in addition
makes it more complicated and requires taking care of the component type
association as well, without adding any real benefit.

Operations could be defined in a more compact way in a central place
though (essentially using duck-typing).
June 10, 2014, 17:46 (GMT)
Use function binding instead of the generic PointerRNA for passing
constant arguments to operation functions.

This usually includes an ID datablock pointer and possibly some subdata
like a modifier, bone or particle system.

Note that this does not yet handle transient data that would get passed
only between operations during the depsgraph evaluation. Such a system
requires careful lifetime handling of the data and memory management.
June 9, 2014, 07:01 (GMT)
Removed void context pointer and generic PointerRNA arguments from the
operation functions.

These functions are now plain lambdas without any arguments. They should
be bound to the appropriate fixed arguments on construction.
June 8, 2014, 10:38 (GMT)
Use a generalized functor type for the operation eval callbacks instead
of a plain function pointer.

With std::bind the previous function pointer wrapper is also no longer
needed.
June 8, 2014, 09:17 (GMT)
New utility header for bind and function.
June 8, 2014, 08:41 (GMT)
Build file changes to make use of the C++11 standard.
June 7, 2014, 11:45 (GMT)
Removed current evaluation "contexts".

Using per-component context data as a way of sharing results between
operations is cumbersome and it prohibits any parallelism between
operations. This was unfinished anyway and needs work.
June 5, 2014, 16:08 (GMT)
Utility class DepsgraphOperation to bind the "context" arguments of an
operation to the evaluation function.

This can replace the simple callback function and avoid anonymous void*
context arguments, which would need to be casted explicitly. Further
the context arguments and the evaluation function can be combined in a
single struct.

Eventually it would be more elegant to have true function binding, but
this has only been added to the C++ standard in C++11. We could backport
boost implementation, but until then this is a usable compromise.
June 5, 2014, 04:55 (GMT)
Replaced the void* for operation arguments with a PointerRNA as used in
the operation node struct.

This could be done with templating or function argument binding later.
June 4, 2014, 18:01 (GMT)
Fix for nasty Heisenbug(tm): C++ enums can only be used as flag values
when the variable is of type int.

With short etc. any concatenation ("|" operator) of flags will generate
an int, and in this case was overwriting neighboring fields in
OperationDepsNode ("flag" and "done" fields), which was causing havoc
in the scheduler.

Alternatively a specialized flag type can be defined. See here for
further info on the issue:
http://stackoverflow.com/questions/1448396/how-to-use-enums-as-flags-in-c
June 4, 2014, 17:59 (GMT)
Clear the "scheduled" flag after evaluation.

Not strictly necessary (gets cleared before next eval anyway),
but less confusing.
June 4, 2014, 10:49 (GMT)
Scheduler fixes: Initialize mutexes correctly and make sure decrementing
the pending_links count in nodes is an atomic operation.

Also moved the child scheduling function into depsgraph eval, where it
is protected by a spin lock to avoid race conditions on
num_pending_links == 0.

NOTE: Apparently there is still a Heisenbug regarding this condition,
but reproducing only works sporadically, have to investigate ...
June 4, 2014, 07:18 (GMT)
Moved the depsgraph eval simulation into the task function, instead of
running it in the callback stubs.

It is now properly toggled by the debug_value magic numbers (14228 for
new depsgraph evaluation, 12345 for simulating with the new depsgraph
instead of using the operation callbacks).
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021