blender/source/gameengine/Converter
Sergey Sharybin 9f7961b6b1 Optimization and threading fix for shapekeys weights calculation
This commit fixes two different issues, which were caused by
how weights are being calculated for relative shapekeys.

Weights for key block used to saved in KeyBlock DNA structure,
which lead to situations when different objects could start
writing to the same weights array if they're sharing the same
key datablock.

Solved this in a way so weights are never stored in KeyBlock
and being passed to shapekeys routines as an array of pointers.
This way weights are still computed run-time (meaning they're
calculated before shapekey evaluation and freed afterwards).

This required some changes to GameEngine as well, to make it
never cache weights in the key blocks.

Another aspect of this commit makes it so weight for a given
vertex group is only computed once. So if multiple key blocks
are using the same influence vertex group, they'll share the
same exact weights array. This gave around 1.7x speedup in
test chinchilla file which is close enough to if we've been
caching weights permanently in DNA (test machine is dual-code
4 threads laptop, speedup measured in depsgraph_mt branch,
trunk might be not so much high speedup).

Some further speed is optimization possible, but it could be
done later as well.

Thanks Brecht for idea of how the things might be solved in
really clear way.

--
svn merge -r58786:58787  ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:36:39 +00:00
..
BL_ActionActuator.cpp BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
BL_ActionActuator.h BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
BL_ArmatureActuator.cpp style cleanup 2012-09-16 04:58:18 +00:00
BL_ArmatureActuator.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BL_ArmatureChannel.cpp BLI_math rename functions: 2013-05-26 18:36:25 +00:00
BL_ArmatureChannel.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
BL_ArmatureConstraint.cpp fix for BL_ArmatureConstraint::UpdateTarget(), was getting the pose from the target, not the subtarget. 2013-08-04 16:48:10 +00:00
BL_ArmatureConstraint.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
BL_ArmatureObject.cpp BGE: Finally adding support for additive layer blending. 2013-08-14 23:31:49 +00:00
BL_ArmatureObject.h BGE: Finally adding support for additive layer blending. 2013-08-14 23:31:49 +00:00
BL_BlenderDataConversion.cpp BGE fix [#35563] Object colour setting for objects and fonts not using colour management like materials 2013-07-19 22:54:02 +00:00
BL_BlenderDataConversion.h BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include: 2012-12-18 20:56:25 +00:00
BL_DeformableGameObject.cpp style cleanup 2013-03-18 11:44:56 +00:00
BL_DeformableGameObject.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BL_MeshDeformer.cpp style cleanup 2012-10-22 08:15:51 +00:00
BL_MeshDeformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BL_ModifierDeformer.cpp code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
BL_ModifierDeformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BL_ShapeActionActuator.cpp code cleanup: 2013-03-25 02:41:30 +00:00
BL_ShapeActionActuator.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
BL_ShapeDeformer.cpp Optimization and threading fix for shapekeys weights calculation 2013-08-19 10:36:39 +00:00
BL_ShapeDeformer.h BGE: Cleaning up BL_ShapeDeformer's use of Blender's Key. This also fixes a bug with replicas (added objects) crashing when using shape keys. 2013-04-14 18:54:06 +00:00
BL_SkinDeformer.cpp code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BL_SkinDeformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
BlenderWorldInfo.cpp style cleanup 2012-09-16 04:58:18 +00:00
BlenderWorldInfo.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
CMakeLists.txt clang/cmake - quiet warnings for external libs and reference moto as a system include. 2013-07-15 08:26:16 +00:00
KX_BlenderScalarInterpolator.cpp code cleanup: remove redundant casts 2012-10-14 08:49:01 +00:00
KX_BlenderScalarInterpolator.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
KX_BlenderSceneConverter.cpp code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name. 2013-08-04 03:45:30 +00:00
KX_BlenderSceneConverter.h BGE: Fix for [#36023] "Objects of added scene are lit by lights of current scene" reported by Raf Colson (raco). 2013-07-15 22:35:09 +00:00
KX_ConvertActuators.cpp BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
KX_ConvertActuators.h style cleanup: bge 2012-10-15 04:16:34 +00:00
KX_ConvertControllers.cpp BGE: Some various tweaks to try and get async lib loading to be a bit more stable on more complex scenes. 2012-12-25 08:11:21 +00:00
KX_ConvertControllers.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
KX_ConvertProperties.cpp BGE: Committing patch #32422 "Debug properties for added objects" by HG1. 2013-07-09 20:06:36 +00:00
KX_ConvertProperties.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
KX_ConvertSensors.cpp code cleanup: remove redundant NULL checks 2013-08-04 19:13:07 +00:00
KX_ConvertSensors.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
KX_LibLoadStatus.cpp Fix for building without python. 2013-02-22 15:54:10 +00:00
KX_LibLoadStatus.h BGE: Committing async LibLoad from Swiss. This does the lib loading in a separate thread to keep the BGE from freezing. Here is an example from the docs: 2012-12-22 05:38:32 +00:00
KX_SoftBodyDeformer.cpp make bullet optional again 2013-01-23 07:26:39 +00:00
KX_SoftBodyDeformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
SConscript split bge includes for scons onto their own lines (for easier merging) 2013-05-29 21:56:55 +00:00