Commit Graph

228 Commits

Author SHA1 Message Date
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
86991fbcb0 Fixed render time regression in Blender Internal
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.

The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.

The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.

To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
  buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
  image and user. Pool could be NULL and in this case fallback to
  BKE_image_acquire_ibuf will happen.

  This helps to avoid lots to if(poll) checks in image sampling
  code.

- BKE_image_pool_release_ibuf releases image buffer. In fact, it
  will only do something if pool is NULL, in all other case it'll
  equal to DoNothing operation.
2013-01-21 08:49:42 +00:00
101660c809 code cleanup: give rng functions BLI prefix. 2012-10-23 13:50:44 +00:00
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
40186a8c11 remove BLI_noise from BLI_blenlib.h, not that many files need this. 2012-10-12 00:18:32 +00:00
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
6ddc574d9d Fix #31953: Forcefield Texture using image file, gradient mode not working 2012-06-29 11:44:46 +00:00
Lukas Toenne
c2be2fd408 Fix 2 #29846. Effector point ave variable can be NULL. 2012-05-28 19:10:57 +00:00
Lukas Toenne
666667bd83 Fix #29846, Dynamic rotation of particles not affected by forcefields 2.61 64 bit. Patch by Arno Mayrhofer (azrael3000).
Minor fix by me to initialize the effector point angular velocity vector correctly.
2012-05-28 16:58:12 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
22a1ad61f9 svn merge ^/trunk/blender -r42372:42416 2011-12-04 18:39:19 +00:00
f4eb0f507f #if 0 use of Object.nlastrips, there is no way to add or remove these from blender so better not run. 2011-12-04 17:24:34 +00:00
7508540c53 svn merge -r41575:41602 ^/trunk/blender 2011-11-07 07:01:24 +00:00
d8717d2628 more macro --> bli math lib replacements. 2011-11-06 15:39:20 +00:00
bd86ba2c88 svn merge -r41335:41371 2011-10-30 01:27:49 +00:00
f837b46a2b Modifier compilation tweaks (Blender conference commit)
* Fluid compilation: Inverse the compile flag from DISABLE_ELBEEM to WITH_MOD_FLUID for consistency. (scons/cmake)
* Use WITH_BF_FLUID in your user config (scons) 

* Add support for scons to disable build with Decimate and Boolean modifier. 
(WITH_BF_DECIMATE and WITH_BF_BOOLEAN)
2011-10-29 23:56:07 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
ad1d3dd30f svn merge ^/trunk/blender -r41175:41200 --- will need to apply fix after 2011-10-24 07:56:42 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
e417e011d5 Code cleanup: file operations merged into single header, some function names
made less cryptic and changed to indicate if they work on files or directories.
2011-10-22 15:35:49 +00:00
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
4e118bb22f svn merge ^/trunk/blender -r40890:40950 2011-10-14 01:35:20 +00:00
bc40f11093 header cleanup (no functional changes) 2011-10-10 09:38:02 +00:00
17f0ff5f7f svn merge -r40279:40295 ^/trunk/blender 2011-09-17 13:15:38 +00:00
d4898f9c40 use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0 2011-09-17 09:43:51 +00:00
fddc655aec svn merge -r40140:r40148 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-12 04:57:20 +00:00
4bd0a2ba2d replace VECCOPY -> copy_v3_v3, added copy_v*_v*_short too for typesafe copying, some parts of the code are copying float -> short normals without scaling. fix coming next. 2011-09-12 04:14:12 +00:00
42b87af8a7 svn merge -r38600:38700 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-26 04:31:59 +00:00
a22de3f73c Effector calculations are now thread safe.
* where_is_object_time was called for every effector evaluation only to determine the object velocity in some rare cases.
* Calculating the effector velocity is now done in the effector precalculation stage.
* Removing this makes the code thread safe and also should give some nice performance boosts when simulating a lot of points.
* Thanks to MiikaH for noticing this problem.
2011-07-24 17:44:22 +00:00
c98148a963 =bmesh= merge from trunk at r36153 2011-04-15 01:19:13 +00:00
69bd72c3b6 quiet gcc float -> double promotion warnings. 2011-04-02 02:08:33 +00:00
74e044065b Fix for [#26665] Force field absorption does not work
* Old bug fix led to all kinds of wrong behavior with "plane" shaped effectors, now things are working properly again.
2011-03-29 12:50:43 +00:00
c2ee06a4b2 Particle charge effector wasn't working properly.
* Probably just forgot this code somewhere a long time ago.
2011-03-24 12:12:54 +00:00
Nathan Letwory
0ff06e21cd doxygen: blender/blenkernel tagged. 2011-02-27 20:40:57 +00:00
f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00