Commit Graph

62526 Commits

Author SHA1 Message Date
Sergey Sharybin
f5c978074c Cycles: Code cleanup: use scoped timer to measure parts of SVM compiler 2015-12-30 19:35:21 +05:00
Sergey Sharybin
4d2eb42cfd Cycles: Wrap SVM compiler state variables into a single struct
This way it's easier to pass stuff around and also much easier to add more
state variables.

So far should be no functional changes for artists.
2015-12-30 19:21:19 +05:00
Sergey Sharybin
3918c8b9a5 Cycles: Optionally output luminance from the shader evaluation kernel
This makes it possible to move some parts of evaluation from host to the device
and hopefully reduce memory usage by avoid having full RGBA buffer on the host.

Reviewers: juicyfruit, lukasstockner97, brecht

Reviewed By: lukasstockner97, brecht

Differential Revision: https://developer.blender.org/D1702
2015-12-30 19:04:04 +05:00
Sergey Sharybin
c8a551bf13 Cycles: Don't install CPU-related kernel files 2015-12-30 18:51:35 +05:00
Sergey Sharybin
2b5d60eb2d Cycles: Deduplicte CPU kernel declaration and definition code
Main goal is to make kernel signatures editing easier and less prone to the
errors caused by missing function signature update or so.

This will also make it easier to add new CPU architectures.

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: dingto, lukasstockner97, brecht

Differential Revision: https://developer.blender.org/D1703
2015-12-30 17:54:02 +05:00
Porteries Tristan
f320724195 BGE: Fix invalid operator< for microsoft compiler.
It fixes the strict weak ordering assertion failure, see : https://support.microsoft.com/en-us/kb/949171.
sybren and youle are the author of this commit.
2015-12-30 13:47:43 +01:00
Sergey Sharybin
4145a4d08c GLog: Solve some compilation warnings
Those are actually sent to a pull-request, see

  https://github.com/google/glog/pull/81
2015-12-30 17:25:54 +05:00
Sergey Sharybin
6b7ead4fe8 Libmv: Update to the latest upstream version
Main reason is to bring up new Glog which should have MSVC 2015
support.
2015-12-30 17:01:28 +05:00
Thomas Szepe
2583cc88de Fix Moto overflow warnings
This fault (level 2, C4056) was introduced by changing Moto from double to float.
2015-12-30 12:45:36 +01:00
Martijn Berger
939dd2e168 Skip some more workarounds when using MSVC 2015 2015-12-30 11:23:10 +01:00
Martijn Berger
5e974a350f Make cycles compile with MSVC 2015 2015-12-29 18:59:23 +01:00
Sergey Sharybin
a6b67ca802 Cycles: Add timing information to the SVM compiler stats 2015-12-29 21:20:10 +05:00
Sergey Sharybin
aff9fd60bc Cycles: Optimize nodes deduplication routines
The idea is to have separate sets per node name in order to speed up the
comparison process. This will use a bit more memory and slow down simple
shaders, but this extra memory is not so much huge and time penalty is
not really measurable (at least from initial tests).

This saves orders of magnitude seconds when de-duplicating 17K nodes and
overall process now takes 0.01sec on my laptop,
2015-12-29 20:27:00 +05:00
Sergey Sharybin
3482cdb136 Cycles: Remove assert which is no longer valid
Was a left-over since 5b33115.
2015-12-29 19:19:53 +05:00
Bastien Montagne
3666ee9132 More from T47045: Add i18n translations to render status from compo.
Also fix inconsistency for freestyle translation - we use IFACE_ everywhere
(TIP_ may be more suited, but let's be consistent first!).
2015-12-29 12:42:12 +01:00
Campbell Barton
625381509f Building w/o OpenMP now works again
rename define since its no longer OpenMP specific.
2015-12-29 10:33:00 +11:00
5b30e823a7 Fix invalid memory access in multiview code during render, reported on irc. 2015-12-29 00:27:18 +01:00
d1a26437ef OS X: remove code for OS X <= 10.5, which is already not supported since 2 years. 2015-12-29 00:27:18 +01:00
Bastien Montagne
6ca6d29e6b Fix memleaks in our gtests. 2015-12-28 23:19:24 +01:00
Bastien Montagne
971f9e1c25 BLI_math_statistics: switch from OMP to BLI_task.
This time, with have over 300% speedup!

But no, this is not due to switch to BLI_task (which 'only' gives usal 15% speedup),
but to enhancement of the algorithm, flatten loop over covariance matrix items now allows
to compute (usually) all items in parallel, instead of having at most 3 or 4 working threads
(with unbalanced load even)...
2015-12-28 22:57:55 +01:00
Bastien Montagne
d08e9883bd BLI_kdopbvh: switch from OMP to BLI_task.
Gives the usual 10%-30% speedup on affected functions themselves (BLI_bvhtree_overlap() and
BLI_bvhtree_balance()), and about 2% speedup to overall cloth sim e.g. (measured from
main Cloth modifier func).
2015-12-28 21:40:22 +01:00
Antony Riakiotakis
49a30112d4 Fix opengl error when GLSL is on for basic shader: shader needs to be
bound before setting uniforms
2015-12-28 20:51:38 +01:00
Antony Riakiotakis
d346ed3b10 cdderivedmesh fix stippled faces not getting drawn at all
Also rearranged code here to not issue a draw call (explicit flush) per
face and not set shader per face either when stippled drawing is mixed
with regular drawing. Not good at all for performance.
2015-12-28 17:55:03 +01:00
Bastien Montagne
1dcae9e309 Fix T47045: add some missing UI i18n translations to texture buttons and freestyle render messages. 2015-12-28 17:46:48 +01:00
Bastien Montagne
6c99d342d8 Minor cleanup (paranoid checks) and fixes from coverity. 2015-12-28 16:48:35 +01:00
Bastien Montagne
6f1c44e611 Some fixes from coverity (only one really nasty, in paint_proj). 2015-12-28 16:09:06 +01:00
Sergey Sharybin
1a246afe03 Cycles: Use different approach for SVM summary report
Use Summary structure to collect all summary related on the shader compilation
process which then could be either simply reported to the log or be passed to
some user interface or so.

This is type of the summary / report which is most flexible and useful and
something we could use for other parts like shader optimization.
2015-12-28 19:42:37 +05:00
Campbell Barton
b26fb531f3 Cleanup: style, indentation 2015-12-29 01:08:41 +11:00
Campbell Barton
61d6fa92c5 Correct recent error passing NULL to fclose 2015-12-29 01:01:20 +11:00
Sergey Sharybin
0ae2ade17a Cycles; Fix typo in the comment 2015-12-28 19:01:26 +05:00
Sergey Sharybin
18ccc6f960 Cycles: Log basic statistics of SVM compilation process 2015-12-28 19:01:07 +05:00
Sergey Sharybin
bb53c28704 Ceres: Remove suitesparse related files
It's quite small chance we'll be supporting suitesparse for Blender due to all
the complexity of 3rd party libraries, so removing implementation files which
are only needed when suitesparse is enabled.
2015-12-28 16:37:48 +05:00
Sergey Sharybin
738f6d8127 Cycles: Implement node deduplication routines
The idea of this commit is to merge nodes which has identical settings
and matching inputs into a single node in order to minimize number of
SVM instructions.

This is quite simple bottom-top graph traversal and the trickiest part
is how to compare node settings without too much trouble which seems to
be solved is quite clean way.

Still possibilities for further improvements:

- Support comparison of BSDF nodes
- Support comparison of volume nodes
- Support comparison of curve mapping/ramp nodes

Reviewers: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1673
2015-12-28 16:37:48 +05:00
Thomas Beck
daf6f5f81e White Balance modifier for the VSE
This snippet creates a white balance modifier for the video sequence editor. It is useful for everyone who likes to set a new white point in the video source (easily via the eyedropper). Just select a point in the source file where you know that it should be white. The algorithm will then shift the colors towards your new white point.

See attached the image for a quick demo.

{F270576}

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: Blendify

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1698
2015-12-28 12:16:48 +01:00
Campbell Barton
225b02fcd6 Fix for building ghost-tests 2015-12-28 21:40:49 +11:00
Campbell Barton
c6e8353462 Fix possible invalid-index use /w link/path select 2015-12-28 21:26:02 +11:00
Campbell Barton
641d4e2b7f Cleanup: use BLI_libblock prefix for id functions
- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI)
- BKE_rename_id -> BKE_libblock_rename (always pass valid main)

also rename:
- name_uiprefix_id -> BKE_id_uiprefix
2015-12-28 17:21:29 +11:00
Bastien Montagne
12874c703c Cleanup typo.
Harmless but irritating... :P
2015-12-28 00:37:07 +01:00
Bastien Montagne
f30b0c60cf Switch BKE_smoke from OMP to BLI_task.
Gives a global speedup of about 5% in smoke simulation (as usual, parallelized chunks themselves
are about 15-25% quicker with BLI_task than with OMP), using a simple setup with two generators
(one from mesh, one from particles), an obstacle and a windfield.
2015-12-28 00:37:07 +01:00
Bastien Montagne
d617de965e Fix (unreported) broken BLI_task's forloop func in case we have less iterations that workers.
When called with very small range, `BLI_task_parallel_range_ex()` would generate a zero `chunk_size`,
leading to some infinite looping in `parallel_range_func` due to `parallel_range_next_iter_get` returning
true without actually increasing the counter!

So now, we ensure `chunk_size` and `num_tasks` are always at least 1 (and avoid generating too much tasks too).
2015-12-28 00:37:07 +01:00
Kévin Dietrich
7ef10decdb Fix for heap-use-after-free happening in GHOST_EventManager.
Issue was that dispatchEvent might call removeWindowEvents/
removeTypeEvents which will delete the event before we can do so.

To address this, handled events are now put in a separate list.

Reported by psy-fi and reviewed by brecht in IRC.
2015-12-28 00:35:47 +01:00
Antony Riakiotakis
540ab7a55a Changes to rename_id function:
* Don't copy name before entering new_id function. new_id does that for
us already.

* Take a main argument to make the function possible to use with
different databases

* Append BKE_ to rename_id
2015-12-27 23:22:43 +01:00
Kévin Dietrich
c4c3d84d58 Addendum to previous GHOST commit: remove redundant check. 2015-12-27 21:32:19 +01:00
Antony Riakiotakis
c09ed363bf Minor UI incosistency reported by erickblender on irc. Twist brush is
renamed to Rotate to match the tool name.

It is not actually compulsory that the two must match since users can
change the name of a brush arbitrarily but at least try to have
consistent naming in our defaults.
2015-12-27 21:16:16 +01:00
Kévin Dietrich
3e35e32e9d Fix memory leak in GHOST Event Manager.
The events are allocated on the heap, then pushed on a stack. Before
being processed, they are popped from the stack, and deleted after
processing is done. When the manager is destroyed (e.g. application
closing), any remaining event in the stack is detroyed.

Issue is that when the "application closing" event is processed, it is
never freed, because the manager gets destroyed before the call to
`delete` is made and the event is not on the stack anymore.

Now events are left on the stack while they are processed, and only
popped and deleted after processing is done.

As a slight bonus refactor: use void as return type for dispatch events
functions, as no caller is checking the return value, and it is not
clear what it means (suggested by the reviewer).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1695
2015-12-27 18:08:44 +01:00
Antony Riakiotakis
a36b522869 CMake: make install prefix option irrelevant for MinGW too. 2015-12-27 16:57:43 +01:00
Jörg Müller
fcc68a02e9 Fix T47064: Change Audio defaults to 48 kHz
Historically blender had an audio sample rate of 44.1 kHz as default which is mostly popular because it's the sample rate of audio CDs. Audaspace kept using this default from the pre 2.5 era. It was about time to change to 48 kHz, which is a more widespread standard nowadays, especially in video. It is the recommended sampling rate of the Audio Engineering Society.

Further reading: https://en.wikipedia.org/wiki/44,100_Hz#Status
2015-12-27 16:33:54 +01:00
Campbell Barton
0a118317fc BMesh Path Select: Face Stepping Option
Supports diagonal paths for verts and faces,
Selects edge-rings with edges.
2015-12-27 22:39:25 +11:00
Campbell Barton
3afa72b6c7 BMesh: BM_loop_share_edge_check utility func 2015-12-27 22:39:22 +11:00
Bastien Montagne
3fcf535d2e Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.

This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.

id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.

New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.

Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.

Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1683
2015-12-27 12:00:33 +01:00