Commit Graph

62669 Commits

Author SHA1 Message Date
Bastien Montagne
2e77c413ab Sculpt: OMP -> BLI_task, step II.
This time, all tools' code itself.

Not much to say, except that we can also get rid of that OMP caching pre-process ugly stuff
for multires smoothing.

Together with previous commit, we have about 5% average speedup on stroke execution
(though this vary a lot, up to 30% speedup in rare cases, and in even rarer cases some
odd massive slowdowns...).

Tech note: we may want to add 'guided'-similar feature to our BLI_task threaded loop,
I suspect this could explain random massive slowdowns of new code (very rare, but annoying...).
2016-01-03 23:56:54 +01:00
Sergey Sharybin
da49ee30b0 Fix T47100: OpenCL compilation warnings due to missing space in the argument list 2016-01-03 23:13:49 +05:00
Campbell Barton
d57847ca5b Fix text wrapping off-by-one error w/ string width
Caused odd white space error in tooltip enum values.
2016-01-04 01:41:58 +11:00
Sergey Sharybin
a3df65dea8 Fix T47008: OSL Memory Corruption (Use after free)
The issue was caused by OSL using TLS which is required to be freed before the
Cycles session is freed. This is quite tricky to do in Cycles because different
render session are sharing the same task scheduler, so when one session is being
freed TLS might need to be active still.

In order to solve this, we are now doing JIT optimization ahead of the time
which ensures either TLS of JIT is freed before the render on multi-core system
or freed on OSLRenderSession destroy on single-core system.

This might increase synchronization time due to JIT of unused function, but
that we can solve later with some smart idea,
2016-01-03 18:28:33 +05:00
Campbell Barton
80a76030ae Improve system info tip 2016-01-03 23:24:00 +11:00
Antony Riakiotakis
d48abb8ffd Get rid of yet another instance of DM_DRAW_OPTION_NO_MCOL
Logic here is weird. Generally, textured drawing overrides
material color unless material uses object color instead?
It doesn't make sense, material color is a material color
whatever the circumstance.

Repeating: idea as always is to push all those options out of per-
polygon callbacks and make decisions such as color enable in the higher
level functions.
2016-01-03 00:26:28 +01:00
Antony Riakiotakis
09e3ef29c1 Get rid of three needless instances of DM_DRAW_OPTION_NO_MCOL.
It would be good to get rid of this entirely, ideally decision
about mcols can be taken at material level and not done per face. More
work needs to be done for that to work though.
2016-01-02 23:22:22 +01:00
Antony Riakiotakis
c2bd260122 GPU buffers: Add update functionality for existing buffers.
Only used for color for now, but we need this for any kind of buffer
updates actually.

This should get rid of some allocation/deallocation, making
vertex painting a bit faster.
2016-01-02 19:55:15 +01:00
Sergey Sharybin
66bea2d77e Fix compilation error on Windows 2016-01-02 13:17:39 +05:00
Lukas Stockner
b1a7fc2c51 Cycles: Force bottom-to-top tile order for viewport rendering
This commit overrides the user's choice of tile order in the case of viewport rendering and always uses bottom-to-top instead.
This was already done until the TileManager redesign, but since it removed the distinction between viewport and regular rendering
in the manager, the viewport was now also using the selected order. Since this requires sorting of the generated tiles,
it slows down rendering a bit. With the forced bottom-to-top order, this sorting step can now be avoided again.

Since the tile order is invisible anyways for viewport rendering, this commit won't have any impact on users (apart from a slight speedup).
2016-01-02 01:15:26 +01:00
Lukas Stockner
5c682a901b Cycles: Add Saw option to the wave texture
This commit adds "Bands Saw" and "Rings Saw" to the options for the Wave texture node in Cycles, behaving similar to the Saw option in BI textures.
Requested by @cekuhnen on BA.

Reviewers: dingto, sergey

Subscribers: cekuhnen

Differential Revision: https://developer.blender.org/D1699
2016-01-01 23:25:37 +01:00
Bastien Montagne
1991ee1738 Sculpt: OMP -> BLI_task, step I.
This gives usual nice boost in parallelized sections themselves, on global sculpting stroke
it's a bit hard to say, seems like we have an average 5% speedup, but it varies a lot...

Note that this area is only parallelized when you have a big brush over dense geometry, otherwise
there's no change at all.

As a side note, this commit also factorizes code here, three times nearly the same code, tst...
2016-01-01 21:27:16 +01:00
Campbell Barton
dc20db1c6c make.bat: only configure once 2016-01-02 06:31:11 +11:00
Thomas Dinges
1ed610ed73 Fix OSL compilation, cannot assign vector to color. 2016-01-01 18:05:34 +01:00
Campbell Barton
fe5efe4196 make.bat: add 'clean' command 2016-01-02 02:30:02 +11:00
Campbell Barton
4ccc62dbc8 make.bat: detect MSVC location
Now this can run from any command line (without having to be launched from MSVC Command Prompt)
2016-01-02 01:42:43 +11:00
Campbell Barton
0d2b2cd378 make.bat: sanity checks w/ useful error messages 2016-01-01 21:26:27 +11:00
Campbell Barton
b92f997cad make.bat correct name for cycles target 2016-01-01 18:47:30 +11:00
Campbell Barton
ef3f512007 Fix for make.bat
Build install target and config path was wrong.

Also use less verbose output and enable multiprocess builds.
2016-01-01 16:05:11 +11:00
Campbell Barton
b519a73326 Add helper make.bat file for ms-windows builders
See --help for options (currently still quite basic)
2016-01-01 05:44:34 +11:00
Sergey Sharybin
ade35bac93 Cycles: Implement rolling shutter effect
This is an attempt to emulate real CMOS cameras which reads sensor by scanlines
and hence different scanlines are sampled at a different moment in time, which
causes so called rolling shutter effect. This effect will, for example, make
vertical straight lines being curved when doing horizontal camera pan.

This is controlled by the Shutter Type option in the Motion Blur panel.

Additionally, since scanline sampling is not instantaneous it's possible to have
motion blur on top of rolling shutter.

This is controlled by the Rolling Shutter Time slider which controls balance
between pure rolling shutter effect and pure motion blur effect.

Reviewers: brecht, juicyfruit, dingto, keir

Differential Revision: https://developer.blender.org/D1624
2015-12-31 20:44:27 +05:00
Sergey Sharybin
c81e6ffdf9 Fix T46915: Non-intuitive behavior of Vector Curve Mapping node
Vector mapping node was doing some weird mapping of both original and mapped
coordinates. Mapping of original coordinates was caused by the clamping nature
of the LUT generated from the node. Mapping of the mapped value again was quite
totally obscure -- one needed to constantly keep in mind that actual value will
be scaled up and moved down.

This commit makes it so values in the vector curve mapping are always absolute.
In fact, it is now behaving quite the same as RGB curve mapping node and the
code could be de-duplicated. Keeping the code duplicated for a bit so it's more
clear what exact parts of the node changed.

Reviewers: brecht

Subscribers: bassamk

Differential Revision: https://developer.blender.org/D1672
2015-12-31 20:40:22 +05:00
Bastien Montagne
70fa2f69c9 Fix T47046: Exporting Max and Maya keymap throws RNA warnings in console.
Totally harmless, but let's silence this bpyrna warning in case enum_items
is a DummyRNA_NULL_items, which is by definition empty...
2015-12-31 14:57:48 +01:00
Sergey Sharybin
702372f6c5 Fix wrong format used in the recent python exit code commit 2015-12-31 18:02:54 +05:00
Sergey Sharybin
619946253e Libmv: Yet again update to the latest version
Again brings some fixes for MSVC-2015 and keeps it easier to backport
the fixes into upstream.
2015-12-31 17:56:57 +05:00
Sergey Sharybin
99da8e1ed8 Cycles: Fix viewport rendering with multiple GPU devices 2015-12-31 17:49:25 +05:00
Campbell Barton
82a1adfbdf Command line argument to exit on Python errors
eg:
  blender -b --python-exit-code 1 --python script.py --render-anim

This causes blender not to continue parsing command line arguments and exit if the script raises an exception.
2015-12-31 22:37:32 +11:00
Campbell Barton
3236f1ab54 Add parse_int_strict_range utility for command line input 2015-12-31 22:37:32 +11:00
Sergey Sharybin
8e1fae3e38 Libmv: Update to latest upstream version
Brings some extra fixes for MSVC-2015
2015-12-31 16:16:52 +05:00
Sergey Sharybin
6046a86522 Update CUDA wrangler to latest upstream
Brings support of NVRTC bindings and also makes it easier to tweak
libraries paths and use multiple alternative names for libraries.
2015-12-31 16:02:24 +05:00
Sergey Sharybin
0b4abd08b3 Cycles: Experiment with use of runtime tag instead of set for SVM generation
This gives about 2x speedup (3.2sec vs. 11.9sec with 32716 handled nodes) when
updating shader for the shader tree.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1700
2015-12-31 15:58:18 +05:00
Campbell Barton
0ffc603553 Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
Sergey Sharybin
16e1bbf1db Fix T47076: Memory issues when closing Blendera after Cycles baking 2015-12-31 14:49:58 +05:00
Campbell Barton
8a9e20495c Fix T47089: View rotate fails w/ auto depth+perspective 2015-12-31 19:09:04 +11:00
Martijn Berger
b6697b4d2a MSVC 2015 fix: do not redefine snprintf, even MS is getting standards complient 2015-12-31 08:53:06 +01:00
Campbell Barton
88477fe2bf Fix T47094: Crash w/ sequencer white-balance 2015-12-31 18:15:45 +11:00
Campbell Barton
7a702ba1d5 Cleanup: warning 2015-12-31 18:15:45 +11:00
Bastien Montagne
ac8105a72d Usual i18n/UI messages fixes... 2015-12-30 21:44:53 +01:00
Bastien Montagne
e11ed68af0 Fix (unreported) memleak in mesh remapping auto-transform code. 2015-12-30 21:11:07 +01:00
Bastien Montagne
6472810c96 Grr, forgot those ones in previous commit...
Never believe QTCreator when it comes to finding all usages of a func, kids... grep ftw!
2015-12-30 21:05:57 +01:00
Bastien Montagne
511e3c5d9d BLI_task: change BLI_task_parallel_range_ex() to just take a bool whether to use threading or not, instead of threshold.
From recent experience, turns out we often do want to use something else than basic
range of parallelized forloop as control parameter over threads usage, so now BLI func
only takes a boolean, and caller defines best check for its own case.
2015-12-30 20:39:56 +01:00
d9bb4a200c Fix OS X (with 10.11 SDK) glog build errors due to using deprecated code.
Some values are now restored to the ones from before the upgrade today.
2015-12-30 19:52:25 +01:00
cf2005d942 Fix T47081: laplacian smooth edit mode tool crash. 2015-12-30 17:26:51 +01:00
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