blender/source/gameengine/Rasterizer
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
..
RAS_OpenGLFilters code cleanup: bge warnings 2013-04-04 23:16:23 +00:00
RAS_OpenGLRasterizer BGE: Making sure m_drawingmode is initialized in the various RAS_Storage constructors. 2013-08-03 05:02:03 +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
RAS_2DFilterManager.cpp fix for strange error with BGE 2d filter code, 2013-08-03 23:40:15 +00:00
RAS_2DFilterManager.h fix for strange error with BGE 2d filter code, 2013-08-03 23:40:15 +00:00
RAS_BucketManager.cpp BGE: Adding partial support for LibLoaded lights with GLSL materials. 2013-08-17 04:37:25 +00:00
RAS_BucketManager.h style cleanup 2013-03-29 06:21:28 +00:00
RAS_CameraData.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_Deformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
RAS_FramingManager.cpp BGE: Extend Framing Mode + Camera sensor 2013-04-18 23:34:32 +00:00
RAS_FramingManager.h style cleanup 2012-09-16 04:58:18 +00:00
RAS_ICanvas.h BGE: Adding vsync control. Users can enable vsync, disable vsync, or use adaptive vsync via UI options in the render properties, or by using the new Python method bge.render.setVsync(). Win32 and X11 support are done via EXT_swap_control. Support for using EXT_swap_control on OS X still needs to be added to Ghost. 2013-07-29 22:31:32 +00:00
RAS_IPolygonMaterial.cpp style cleanup 2012-10-14 13:08:19 +00:00
RAS_IPolygonMaterial.h style cleanup: comment format 2013-02-02 04:48:21 +00:00
RAS_IRasterizer.h BGE: Adding mipmapping control to bge.render via bge.render.setMipmapping() and bge.render.getMipmapping(). 2013-04-14 00:40:24 +00:00
RAS_IRenderTools.cpp remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
RAS_IRenderTools.h BGE Profile : visual feedback bars and improvements 2013-01-28 01:26:36 +00:00
RAS_LightObject.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_MaterialBucket.cpp fix for typo in r53145 2012-12-19 01:42:28 +00:00
RAS_MaterialBucket.h add 2 new utility functions to the BGE mesh py api. 2012-11-10 09:45:43 +00:00
RAS_MeshObject.cpp Optimization and threading fix for shapekeys weights calculation 2013-08-19 10:36:39 +00:00
RAS_MeshObject.h Optimization and threading fix for shapekeys weights calculation 2013-08-19 10:36:39 +00:00
RAS_ObjectColor.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_Polygon.cpp fix [#34609] mesh.getVertex doesn't work as spected with poly.getMaterialIndex() and poly vertex indexes 2013-05-01 22:41:55 +00:00
RAS_Polygon.h fix [#34609] mesh.getVertex doesn't work as spected with poly.getMaterialIndex() and poly vertex indexes 2013-05-01 22:41:55 +00:00
RAS_Rect.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_texmatrix.cpp BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include: 2012-12-18 20:56:25 +00:00
RAS_TexMatrix.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_TexVert.cpp code cleanup: bge - was converting float[] to MT_Vector's just to compare. use BLI_math instead. 2013-02-23 01:57:56 +00:00
RAS_TexVert.h BGE: Cleaning up the VBO code to use RAS_TexVert more directly instead of copying out pieces. This also gets rid of MapBuffers, which isn't available in OpenGL ES. Scenes that require constant VBO updates (like my skeletal mesh stress test) are now 10~13% faster. 2013-04-05 01:28:38 +00:00
SConscript remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00