Commit Graph

1324 Commits

Author SHA1 Message Date
Sergey Sharybin 161393805f Update Google libraries
This commit updates:

- gflags 2.2.0 -> 2.2.1
- glog 0.3.4 -> 0.3.4
- gmock 1.7.0 -> 1.8.0
- gtest 1.7.0 -> 1.8.0
2018-03-22 16:10:08 +01:00
Campbell Barton 585208e0e9 Merge branch 'master' into blender2.8 2018-03-14 02:15:37 +11:00
Campbell Barton bf8f5f5142 Cleanup: doxygen comments 2018-03-14 02:08:07 +11:00
Brecht Van Lommel c0d6627dc5 Merge branch 'master' into blender2.8 2018-02-28 03:11:17 +01:00
Brecht Van Lommel 8a7eb6c4c1 Update CUEW to latest version
Some Linux distribution have only libcuda.so.1, not libcuda.so.
2018-02-28 03:03:12 +01:00
Campbell Barton 9b9861578d Merge branch 'master' into blender2.8 2018-02-09 13:56:49 +11:00
Campbell Barton 8f9386596f CMake: include missing headers 2018-02-09 13:50:05 +11:00
Sergey Sharybin 9278614115 Merge branch 'master' into blender2.8 2018-02-08 16:27:28 +01:00
Sergey Sharybin e0597baed5 Remove Carve boolean
We've got quite comprehensive BMesh based implementation, which is way easier
for maintenance than abandoned Carve library.

After all the time BMesh implementation was working on the same level of
limitations about manifold meshes and touching edges than Carve. Is better
to focus on maintaining one boolean implementation now.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3050
2018-02-08 15:37:44 +01:00
Brecht Van Lommel ade2aaba09 Merge branch 'master' into blender2.8 2018-02-07 17:17:24 +01:00
Brecht Van Lommel 1dafe759ed Update CUEW to latest version
This brings separate initialization for libcuda and libnvrtc, which
fixes Cycles nvrtc compilation not working on build machines without
CUDA hardware available.

Differential Revision: https://developer.blender.org/D3045
2018-02-07 11:53:01 +01:00
Campbell Barton eeb621566a Merge branch 'master' into blender2.8 2018-02-04 10:46:34 +11:00
Ray Molenkamp a5052770b8 cycles: Add an nvrtc based cubin cli compiler.
nvcc is very picky regarding compiler versions, severely limiting the compiler we can use, this commit adds a nvrtc based compiler that'll allow us to build the cubins even if the host compiler is unsupported. for details see D2913.

Differential Revision: http://developer.blender.org/D2913
2018-02-03 10:59:09 -07:00
Dalai Felinto 781dd5edb5 Fix audaspace mess in 2.8
All these files were removed since accidental commit, revert and merge in 2.8.

ea31f0ac3b + 0a4e170c28 + 11f9a23a28 + 7b27b10fa6
2018-02-01 09:22:57 -02:00
Germano 7b27b10fa6 Merge branch 'master' into blender2.8 2018-01-31 22:36:16 -02:00
Germano 0a4e170c28 Revert "tmp"
This reverts commit ea31f0ac3b.
2018-01-31 22:35:46 -02:00
Germano ea31f0ac3b tmp 2018-01-31 22:11:01 -02:00
Campbell Barton 03a5eccc94 Merge branch 'master' into blender2.8 2017-11-30 18:30:41 +11:00
Campbell Barton 28d2148b09 Haiku OS Support
D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.
2017-11-30 18:05:21 +11:00
Sergey Sharybin e5a74f3ad3 Audaspace: Fix -Wreorder warning
Makes building less noisy, helps catching real introduced warnings/errors.

@xeXyon, mind having a look here and possibly apply to upstream? :)
2017-11-28 14:24:56 +01:00
Campbell Barton 619600a53f CMake: cleanup 2017-10-30 18:48:27 +11:00
Campbell Barton e8daf2e3ea CMake: cleanup 2017-10-30 12:59:36 +11:00
Sybren A. Stüvel 7530c54c3c Merge branch 'master' into blender2.8 2017-10-29 15:14:04 +01:00
Campbell Barton 560fa6db17 Curve Fitting: heap reinsertion optimization 2017-10-29 16:33:44 +11:00
Campbell Barton 4fae536f60 Merge branch 'master' into blender2.8 2017-09-15 22:44:07 +10:00
Sergey Sharybin 1a9217e222 Fix T52763: Boolean problem with vertex group 2017-09-15 16:33:52 +05:00
Jörg Müller 08094e8f23 Audaspace: cmake fixes, lowering to 3.0 minimum required. 2017-08-19 11:46:21 +02:00
Jörg Müller 986267300b Audaspace: Moving audaspace 1.3 into extern.
Deleting the old internal audaspace.

Major changes from there are:
- The whole library was refactored to use C++11.
- Many stability and performance improvements.
- Major Python API refactor:
 - Most requested: Play self generated sounds using numpy arrays.
 - For games: Sound list, random sounds and dynamic music.
 - Writing sounds to files.
 - Sequencing API.
 - Opening sound devices, eg. Jack.
- Ability to choose different OpenAL devices in the user settings.
2017-08-18 08:24:12 +02:00
Bastien Montagne e8b6bcd65c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/object/object_add.c
	source/blender/python/intern/bpy_app_handlers.c
2017-08-08 16:43:25 +02:00
Sergey Sharybin d85af2aa3f Update CUEW to latest version
Previous update pulled too much of system-wide typedefs.
2017-08-08 14:27:28 +02:00
Sergey Sharybin 12834fe0f0 Update CUDA wrangler to latest version
Brings new declarations from toolkit version 8.0, also fixes some
pointers used in function declarations.
2017-08-08 13:58:42 +02:00
Campbell Barton 8ddaa6a4e2 Merge branch 'master' into blender2.8 2017-08-01 10:38:36 +10:00
Campbell Barton b425e94381 Correct accidental variable declaration 2017-08-01 07:55:01 +10:00
Bastien Montagne 8ead56c4c9 Merge branch 'master' into blender2.8 2017-05-28 17:48:59 +02:00
Aaron Carlisle 9f044cb422 Remove MinGW support
The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648
2017-05-27 15:34:55 -04:00
Campbell Barton fbd172a00a Merge branch 'master' into blender2.8 2017-04-30 03:06:42 +10:00
Campbell Barton 47769b5f40 Curve Fitting: minor change to re-fitting method
Avoid calculating a new split-index when re-fitting.

While checking if a knot can be removed, the index with the highest error
can be used as a candidate to replace the knot
(in the case it can't be removed).
2017-04-30 00:01:16 +10:00
Mike Erwin ef640ecf10 OpenGL: remove use of GLEW MX
MX (Multiple conteXt) support was dropped from the GLEW 2.0 library to make core profile support cleaner.

Our WITH_GLEW_MX build option was OFF by default already; this commit removes the inactive code paths.

I'm working on a plan for multiple GPUs, contexts, resource sharing, etc. This commit gives us a cleaner starting point for that upcoming work.

Tested on Mac, will test on Linux & Windows immediately after pushing.
2017-04-22 00:35:04 -04:00
Sybren A. Stüvel 81011679dd Merge branch 'master' into blender2.8 2017-04-21 14:19:05 +02:00
Sergey Sharybin c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
Dalai Felinto 2d158a425d Upgrade glew to v2.0 2017-04-10 14:53:32 +02:00
Sergey Sharybin a14fb77fee Update CLERW to the latest version 2017-03-24 09:43:03 +01:00
Sergey Sharybin a41240439b Update CLEW to latest version
Needed to get access to some AMD extensions.
2017-03-21 12:01:03 +01:00
Sergey Sharybin 05dfe9c318 Fix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~
Patch by Bruno d'Arcangeli (@arcangeli), thanks!
2017-03-08 13:38:01 +01:00
Sergey Sharybin 2ae39ff6b1 Fix strict compiler warning in the gflags code 2017-01-23 11:52:41 +01:00
Sergey Sharybin bd3de93557 Gtest: Fix/workaround MSVC complains about use of struct with alignment 2016-12-15 17:53:57 +01:00
Sergey Sharybin ec2fd74f47 Fix strict warnings on Windows 2016-12-13 16:46:04 +01:00
lazydodo df687837f8 [msvc2017] remove eigen vector workaround for msvc2017. 2016-11-28 10:12:21 -07:00
Sergey Sharybin cb694d6595 GLog: Workaround compilation error on Hurd
There is syscall headers but no SYS_Write syscall.
2016-11-22 12:43:59 +01:00
Sergey Sharybin bd8cbf5c07 Glog: Fix compilation error on ppc64el
This was fixed in upstream already. Time to re-bundle?
2016-11-21 21:04:48 +01:00
Sergey Sharybin dd51ec592f CLEW: Workaround compilation error on ppc64el
Something was conflicting here, causing C++ to consider bool as
a __vector(4) bool.
2016-11-21 21:03:34 +01:00
Campbell Barton 2c26a7b71e Cleanup: harmless mistake in rangetree 2016-11-20 09:11:26 +11:00
Sergey Sharybin bf1e9bc613 Ceres: Update to the latest actual version
Brings all the fixes and improvements done in upstream within the last 13 months.
2016-11-01 11:29:33 +01:00
Nathan Letwory 03b8531cea Compile fix for Windows.
__inline instead of inline is needed.
2016-10-28 11:54:01 +03:00
Campbell Barton 72921a1e43 RangeTree API rewrite
Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.

- every call to `take_any` (called for all verts & faces)
  removed and added to the set.
- further range adjustment also took 2x btree edits.

This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.

Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.
2016-10-26 23:33:41 +11:00
Sergey Sharybin 5845d52bf3 CUEW: Use latest upstream version
Fixes typo in README :)

Thanks to @jesterKing!
2016-09-30 10:36:11 +02:00
Campbell Barton 6dd87f2abb Curve Fitting: re-fitting heap pre-allocated too much 2016-09-25 12:19:43 +10:00
Campbell Barton 6b5ad4a4d7 Curve Fitting: 'offset' method used sign when it shouldn't 2016-09-25 12:19:42 +10:00
Campbell Barton 05dbd65098 Curve Fitting: inline dot-product (avoid temp vector) 2016-09-25 12:19:42 +10:00
Campbell Barton d9b242f5fb Curve Fitting: de-duplicate cubic evaluation 2016-09-25 12:19:42 +10:00
Campbell Barton ff57589afc Curve Fitting: correct initial handle sign
In practice the initial values are almost never used.
2016-09-02 02:58:34 +10:00
Sergey Sharybin f7263b8b1a Cleanup: Reduce amount of misleading indentation
Was polluting compile output too much.
2016-09-01 12:14:16 +02:00
Sergey Sharybin f732293147 OpenCL: Support multiple ABI libraries on Linux
Solves issue reported in T49144.
2016-08-23 12:23:37 +02:00
Campbell Barton a8b3ff9e16 Curve Fitting: fix off by one error
In practice this wasn't likely to cause problems, but better fix.
2016-08-05 18:50:49 +10:00
Campbell Barton 7812d821a5 Add upstream information to curve_fit_nd library 2016-08-05 08:36:17 +10:00
Campbell Barton e1a4219523 Curve Fitting: sync with upstream
Correct accidental float use
2016-08-05 08:36:17 +10:00
Campbell Barton 3fe7aacdf7 Curve Fitting: circular fit could give NAN handles
Fitting lines that exactly double back on themselves could give NAN length handles.
2016-07-31 13:58:14 +10:00
Sergey Sharybin 4d79fa8382 Gtests: Re-apply strict compiler fixes 2016-07-29 22:19:30 +02:00
Sergey Sharybin ac655be0e3 Add GMock library which is responsive for dealing with mock objects 2016-07-29 22:19:30 +02:00
Sergey Sharybin c6f468d8ed GTests: Update to a newer Git version
Required to get GMock working with GTest.
2016-07-29 22:19:30 +02:00
Campbell Barton 3673a5adba Curve Fitting: Use normalized projection function 2016-07-28 18:33:14 +10:00
Campbell Barton d60acd0e94 Fix crash fitting single point curve 2016-07-28 14:37:55 +10:00
Campbell Barton 4da8543d0d Resolve undefined M_PI w/ MSVC2013 2016-07-26 05:28:13 +10:00
Campbell Barton a4db868092 Resolve build error on OSX 2016-07-25 20:30:24 +10:00
Campbell Barton f4cb6d45d5 Error in curve update, uninitialized var use 2016-07-25 15:12:46 +10:00
Campbell Barton 2418daede5 Curve Fitting: Add alternate 'refit' method
This is an alternative method for fitting a curve which incrementally simplifies the curve, then re-fits.

Generally gives better results, also improves corner detection.
2016-07-25 14:55:08 +10:00
Sergey Sharybin 5fae2503bf Revert "OpenJPEG: update to 2.1 from 1.5"
This reverts commit f12204196f.

Campbell, sorry. have to revert this for the time being.

We've missed some very important bits, such as:

- FFmpeg is usually linked against OpenJPEG
- OIIO needs OpenJPEG as well.

For FFmpeg issues we can either disable OpenJPEG there (since
we don't really use it), or bump FFmpeg to version 3.1.1 which
can use either of OpenJPEG 1.5 or 2.1.

For OIIO we do need OpenJPEG support (otherwise Cycles will
not be able to use j2k/j2c textures) and currently there is
NO solution to make OIIO working with OpenJPEG 2.1.

According to Matthias Fauconneau (aka mfv) Larry is working
on the patch to get OIIO work with OpenJPEG 2.1, but it'll
take some time still.

I've tried to look into support of some sort of build system
flag and do ifdefs, but it all becomes quite nasty, especially
with bundled OpenJPEG bumped to 2.1.

Surely such an update is something we'll have to apply to
but at this exact moment it causes quite some pain for all
developers.

Suggest to wait for until OIIO supports OpenJPEG 2.1 and then
go with the updates for real.
2016-07-12 17:38:26 +02:00
Campbell Barton f12204196f OpenJPEG: update to 2.1 from 1.5
Stream handling has changed so this required changes to how files & memory are accessed.
2016-07-12 23:13:30 +10:00
Campbell Barton e41abdb907 CMake: suppressing indentation warning for extern 2016-07-11 17:16:35 +10:00
Campbell Barton abb9d0b0ad Curve Fitting: add high-quality flag
When this flag is set - even when the curve error is under the threshold,
keep attempting a better fit.

Enable this for freehand drawing, since it gives nicer results and isn't noticeably slower.
2016-06-14 02:27:32 +10:00
Campbell Barton 2033f47e55 Curve Fitting: offset based fallback to calculate cubics
Add a new fallback method that uses offset distance from the curve to the line between both points,
for freehand drawing it typically only fives minor improvements (1-3% fewer points),
for curve dissolve the improvements are more noticeable.
2016-06-12 22:25:43 +10:00
Campbell Barton cd768a8df1 Add upstream information to wcwidth library 2016-06-03 02:43:24 +10:00
Campbell Barton 108b36f1ce Add upstream information to libraries 2016-05-27 20:03:27 +10:00
Sergey Sharybin c3eb7c4e9d Add some more information about extern libraries 2016-05-27 09:27:44 +02:00
Campbell Barton cb2b776332 dd upstream information to libraries 2016-05-25 22:27:53 +10:00
Sergey Sharybin 0b588f0905 Forgot this in previous commit 2016-05-24 11:48:19 +02:00
Sergey Sharybin 8f04a228f7 Add upstream information to libraries 2016-05-24 11:46:53 +02:00
Campbell Barton 89df6720be CMake: use signed char for recastnavigation
External libraries may need char to be signed.
2016-05-19 07:36:32 +10:00
Campbell Barton 20678138f7 Cleanup: CMake indentation
Also remove outdated comment
2016-05-19 07:12:14 +10:00
Sergey Sharybin 6988061bf1 Cuda wrangler: Fix very nasty bug with multiple scalar type qualifiers 2016-05-18 18:01:37 +02:00
Campbell Barton 2b02e03973 Cleanup: simplify checks calculating tangents 2016-05-17 02:18:11 +10:00
Campbell Barton a1a640f614 Curve Fitting: correct circular tangent length calculation
Method for scaling is still not perfect but quite close.
2016-05-16 07:45:50 +10:00
Joshua Leung d4ed5c398e A "better" (?) fix for msvc silliness - used in one other place in all of Blender 2016-05-09 01:46:18 +12:00
Joshua Leung e43ee5563b Fix compiling on MSVC - M_PI undefined 2016-05-09 01:31:13 +12:00
Campbell Barton e5b4e6b0a3 Clamp dot-product to avoid precision error
Would only happen in degenerate cases.
2016-05-08 00:04:05 +10:00
Campbell Barton a3b42d638b Cleanup: whicespace 2016-05-07 23:58:04 +10:00
Campbell Barton 68e856da03 Curve Fitting: better fallback when least-square solution fails
Take curvature into account when calculating handle length.

Gives significantly better results for curve dissolve and 10-20% more efficient freehand drawing.
2016-05-07 21:48:00 +10:00
Campbell Barton d2296cd5ec Fix error copying cubic data 2016-05-07 21:38:48 +10:00
Campbell Barton 9b8bf57361 Curve Fitting: avoid clamping fallback handles. 2016-05-05 20:31:13 +10:00
Campbell Barton 122496dda1 Correct header (can't use uint here) 2016-05-02 21:08:02 +10:00
Campbell Barton ec9cb57b01 Curve Fitting: expose function for fitting a single curve 2016-05-02 18:50:04 +10:00
Campbell Barton b1f6cd5a6a Slight adjustment to curve fitting tangents
Don't let the point spacing give bias to a side.
2016-04-30 16:27:43 +10:00
Sergey Sharybin 87dcee0c0c Silence some annoying warnings when doing full build with strict flags
This mainly touches extern libraries and few debug-only places in intern.

Some summary:

- External libraries are not strict at all about missing declarations,
  so we can rather safely remove such warning together with other strict
  flags.

- Bullet has some static functions which are not used.
  Those were commented out.

- Carve now has some unused debug-only functions commented out as well.
  While we're on the way of getting rid of Carve, it makes sense to make
  things a bit cleaner for the time being.

- In LZMA we have some parts disabled which gives some set but unused
  variables which is rather correct.

- Elbeem had quite some variables set and never used because their usage
  is inside of debug-only code which is commented out.

Note about patching upstream libraries: surely one might say that we
have to make local patchset against this, but own experience says it
only gives extra work trying to merge such tweaks to a new upstream
version and usually it's just faster to re-apply such fixes again after
bundling new upstream library.
2016-04-22 10:59:15 +02:00
Sergey Sharybin 75c9fe428f Update bundled openjpeg from 1.5.0 to 1.5.2
Solves following issues:

- Quite reasonable amount of paranoid warnings were solved by an upstream
- Upstream seems to have all fixes needed for FreeBSD and OSX already
- Brings all fixes and such from upstream
2016-04-20 10:36:58 +02:00
Campbell Barton 2ca4d21976 Cleanup: rename cos-angle to match BLI_math 2016-04-20 07:50:48 +10:00
Campbell Barton 8ac662c77a New freehand curve drawing tool
- Access with Shift-LMB or from the 'Create' toolbar tab.
- Uses curve fitting for bezier curves, with error and corner angle options.
- Optional tablet pressure to curve radius mapping.
- Depth can use the cursor or optionally draw onto the surface,
  for the entire stroke or using the stroke start.
- Stroke plane can optionally be perpendicular to, or aligned to the surface normal.
- Optional radius tapering and for start/end points.
- Supports operator redo and calling from Python.
2016-04-15 20:36:38 +10:00
Campbell Barton e56e7bd1ec Add lib for n-dimensional cubic curve fitting
This will be used for calculating bezier curves from freehand drawing,
may be used for other areas too.

Original code from GraphicsGems, 1990 (FitCurve.c),
with updates from OpenToonz, under 3 clause BSD license.
with own minor modifications for integration with Blender:
- support adding extra custom-data.
- improved handle clamping.
2016-04-15 20:33:58 +10:00
Sergey Sharybin dc7d6643e1 Remove any wrangler utility scripts 2016-04-12 11:07:23 +02:00
Campbell Barton 4fae162bce CMake: ignore header 2016-04-12 18:50:08 +10:00
Sergey Sharybin b1ef786a73 CMake: Partially revert recent missing headers commit
The header which was put to the CMake project is not by any means used
during compilation, it is only used when manually updating CUDA wrangler
from CUDA headers.
2016-04-12 08:54:34 +02:00
Campbell Barton a2db16ba58 CMake: add missing headers 2016-04-12 11:22:30 +10:00
Reinier de Blois 176538f613 Update Recast version to 1.5.0
The version of Recast that Blender ships with is from 2009.  This patch updates the Recast version to the latest version, 1.5.0.  The Detour version remains untouched.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1747
2016-04-05 21:38:52 +02:00
Brecht Van Lommel e14324daa7 Fix T47758: rigidbody bug with constraint breaking and disable collisions.
This is a regression in Bullet, reverted the problematic change for now with
a custom patch.
2016-03-27 01:32:28 +01:00
Sergey Sharybin 12ca20e6c3 Attempt to fix GLog compilaton on FreeBSD
Copied some config variables from an original config file.
2016-02-21 13:40:22 +01:00
Sergey Sharybin d9bf6b2d33 Carve: Silence 32/64 bit shit warning
There's no need to mix ints and size_t here at all
because all the values fits into integer.

It's unlikely we'll be re-bundling Carve, so didn't
bother with the patchset.
2016-02-20 14:06:10 +05:00
Sergey Sharybin aff60520bd Fix some warnings in GLog/GFlags when buildingwith MSVC2013
Those warnings were only addressed for MSVC2015 so far.
2016-02-20 14:06:05 +05:00
Sergey Sharybin d81dd2da0f Fix/workaround static object initialization in gflags 2016-02-17 15:01:40 +01:00
Campbell Barton 9ab7482657 Imbuf: remove libredcode
D1751, remove this library since its quite a specific - only supports an older version of this codec.

Also ffmpeg has added support for recent versions of the codec.
2016-02-03 18:39:37 +11:00
Brecht Van Lommel deef941208 Fix build error on OS X in previous commit, this define should stay. 2016-02-02 00:41:32 +01:00
Brecht Van Lommel fae710a213 Fix T47293: game engine crashes since Bullet upgrade.
This restores a modification that was there before.
2016-02-02 00:19:09 +01:00
Brecht Van Lommel b64d5809e7 Upgrade Bullet to version 2.83.
I tried to carefully preserve all patches since the last upgrade.

Improves T47195, cloth collision detection bug.

Differential Revision: https://developer.blender.org/D1739
2016-01-25 22:14:46 +01:00
Joshua Leung 445f7910e8 Hacky compile fix for mingw compile issue reported by bat3a on bf-committers
I've been using this fix in another branch locally, so it seems to work fine.
The other #ifdef checks should be checked on too, as __MINGW32__ and __MINGW64__
do NOT seem to be defined when compiling that file
2016-01-22 13:59:54 +13:00
Sergey Sharybin 5feb3688fb Carve: Remove empty implementation files 2016-01-19 22:56:37 +01:00
Sergey Sharybin 90e827ba66 CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.

Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.
2016-01-14 12:38:46 +05:00
Sergey Sharybin 2af7637f20 Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
2016-01-14 12:27:22 +05:00
Martijn Berger 425a4b23fd MSVC 2015 do not redefine snprintf 2016-01-09 08:55:58 +01:00
Sergey Sharybin c35ad8d4a3 GTest: Fix some strict compiler warnings
Those changes are to be backported to the upstream actually, for until then
it should be good enough to have it locally.
2016-01-04 23:54:02 +05:00
Sergey Sharybin ba432299cd Move Libmv from extern/ to intern/
Logically it is intern library since being mainly developed by 1.5 blender guys.
2016-01-04 19:39:13 +05:00
Sergey Sharybin 6fb6a08bf8 Move Ceres to extern/
Even tho it's currently only used by Libmv we might use it for something
else in the future. Plus, it's actually where it logically belongs to.
2016-01-04 19:39:13 +05:00
Sergey Sharybin 0b856dd97e Move GLog/GFlags to extern/
This is where the libraries belongs to actually, they are not only used by
Libmv now, but also by tests and Cycles.
2016-01-04 19:39:13 +05:00
Sergey Sharybin 69f4080839 Re-organize structure of GLog/GFlags CMake libraries
The idea is to split them into two separate targets and have dedicated include
directories list for each of them in order to avoid some annoying include header
modifications in comparison with upstream.

Reviewers: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1706
2016-01-04 19:39:13 +05:00
Sergey Sharybin 5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
Sergey Sharybin 66bea2d77e Fix compilation error on Windows 2016-01-02 13:17:39 +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 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
Martijn Berger b6697b4d2a MSVC 2015 fix: do not redefine snprintf, even MS is getting standards complient 2015-12-31 08:53:06 +01:00
Brecht Van Lommel 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
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
Martijn Berger 5e974a350f Make cycles compile with MSVC 2015 2015-12-29 18:59:23 +01: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
Martijn Berger e9825ad9f3 MSVC 2015 fix hack around internal compiler crash on openmp atomic
Eigen3 bug report: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1131
2015-12-10 15:00:30 +01:00
Martijn Berger 9ad13d70fa Update Eigen to version 3.2.7
The main purpose of this is to get MSVC 2015 fixes
2015-12-10 12:37:46 +01:00
Brecht Van Lommel f9047c3f8c Eigen: fold remaining OpenNL code into intern/eigen.
Differential Revision: https://developer.blender.org/D1662
2015-12-10 01:58:10 +01:00
Brecht Van Lommel 858b680a50 Eigen: move C API into intern/eigen. 2015-12-10 01:58:06 +01:00
Campbell Barton fc9505c9c5 Cleanup: warnings & spelling 2015-12-02 13:15:52 +11:00
Sergey Sharybin d2a822fe07 CUEW: Update to latest version
It is now updated against CUDA Toolkit 7.5. Currently should be no functional
changes, just begin some ground work for the future.
2015-11-25 23:30:46 +05:00
Campbell Barton ae8e4d3718 Cleanup: redundant 'break', minor edits 2015-11-19 22:52:13 +11:00
Sergey Sharybin 6005bb5846 OpenCL wrangler: Update to latest version to fix issues with -1001 error code 2015-10-29 20:37:38 +05:00
Sergey Sharybin ced1c34f74 Ceres: Update to the latest version
It brings all the performance improvements, bug fixes and stability improvements
which were done in the last year of Ceres development.
2015-10-28 19:20:50 +05:00
Campbell Barton 93bc81f495 Upgrade glew to v1.13 2015-10-11 12:53:41 +11:00
Brecht Van Lommel b098609186 Fix various compiler warnings. 2015-10-10 17:35:30 +02:00
Brecht Van Lommel 64e4f9967f Fix T46403: motion tracking not workig with Xcode 7 on OS X.
Caused by use of the uninitialized shape_ variable in Resize().
2015-10-10 04:09:37 +02:00
Bastien Montagne 8159718faf BLI: add SVD solver for mat3 (using eigen3). 2015-10-09 21:26:33 +02:00
Sergey Sharybin 9744c8ca58 CMake: Another attempt to solve compilation error on Windows 2015-09-17 14:29:56 +05:00
Sergey Sharybin a712459603 CMake: Attempt to fix compilation error on Windows after recent changes 2015-09-17 14:17:00 +05:00
Sergey Sharybin 0b959458ff CMake: Don't modify global CFlags when enabling/disabling OpenJpeg 2015-09-16 19:10:41 +05:00
Sergey Sharybin 42e15b9dd3 Fix T46051: Loading certain Jpeg causes system alert sound (Win32)
The issue was caused by RedCode library printing binary string to the terminal.
2015-09-09 16:18:37 +05:00
Sergey Sharybin dfc672f8bb SCons: Fix for really nasty bug with polluting configuration environment
The issue was caused by the following construction:

  def = env['SOMETHING']
  defs.append('SOMETHING_MORE')

Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-08-04 18:06:28 +02:00
Sergey Sharybin 3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
Sergey Sharybin bbed6af857 CMake: Disable Werror in extern/libmv for now
It gives issues with Glog compiled in release mode.

Need to revisit the directory layout here and compiler flag, because technically
libmv is now more an intern/ library and i'll actually prefer it to be covered
with strict flags as well. But it's a bit tricky because of libraries which we
don't maintain are in the libmv subfolder.
2015-07-18 11:16:25 +02:00
Sergey Sharybin 2199a3e38b CMake: Add option to enable -Werror cflag in some areas
It is rather annoying attitude nowadays to use const qualifier all over the
place, including using it for multi-dimensional arrays. This isn't really
supported in GCC prior to version 5.0 because it considers such an arrays
to be a "pointer to a const pointer" which gives implicit casting errors.

It's not possible to disable this particular type of warnings treated as
errors in any GCC version prior to 5.0 as well, meaning currently usage of
-Werror globally in Blender code is not possible at all.

This commit makes it possible to use -Werror in areas which are complaint
with older GCC versions. New advanced CMake options are:

- WITH_COMPOSITOR_WERROR
- WITH_LIBMV_WERROR
- WITH_CYCLES_WERROR
2015-07-18 10:49:51 +02:00
Bastien Montagne 582e7a6347 Add a skeleton of C API for Eigen3.
Title says pretty much everything. For now, only thing available is a solver of eigen
values/vectors for self-adjoint matrices.

We can easily add more when needed.

Thanks to Sergey and Campbell for quick review.
2015-07-13 18:05:38 +02:00
Campbell Barton cd7853be22 CMake: quiet warnings in GTest 2015-06-23 14:34:52 +10:00
Campbell Barton 36d47ce203 Fix leak in BMesh convex hull operator 2015-05-30 16:17:04 +10:00
Campbell Barton 5d30c23c35 doxygen: corrections/updates
Also add depsgraph & physics
2015-05-20 14:12:22 +10:00
Sergey Sharybin 650fbd09f7 OpenCL wrangler: Add some of the extension defines 2015-05-15 13:22:47 +05:00
Campbell Barton 6f0f1dc3be Cleanup: warnings 2015-04-19 22:03:42 +10:00
Campbell Barton 15d3d8560d Cleanup: remove unused face normals
also use const
2015-04-17 23:50:23 +10:00
Sergey Sharybin 917b8754f9 Tracking: Fix one frame memory leak when tracking last frame 2015-03-25 13:20:37 +05:00
Sergey Sharybin 0f0e080a26 Fix T44110: Plane track doesn't work when built with scons
For some reason recent change in avoiding non-aligned eigen vectors
was behaving differently for cmake and scons. Made it a bit different
now by storing scalars. This is more robust approach anyway, because
it's not really guaranteed Mat.col() gives a pointer inside data,
depending on column-major vs. row-major storage.

This is to be backported to 2.74 branch.
2015-03-24 14:05:49 +05:00
Campbell Barton 4b88541d59 CMake: unbundle eigen3
Optionally use systems eigen3 library.

T41989 by @hasufell with edits
2015-03-19 15:41:41 +11:00
Campbell Barton 2df4444def CMake: exclude Colamd when OpenNL's disabled 2015-03-19 14:48:52 +11:00
Campbell Barton bb825d02f8 CMake: unbundle LZO library
Patch T41989 by @hasufell
2015-03-13 22:36:01 +11:00
Sergey Sharybin 3f572fe7d2 Fix T43905: Crash happens when press Create Plane Track
It was only happening on 32bit platforms because of alignment
differences when allocating class.

Now got rid of copy of eigen matricies stored by value in the
residual block which solves aligment issues and should also
give some unmeasurable speedup.
2015-03-06 14:58:16 +05:00
Campbell Barton d17e6c10df Cleanup: quiet minilzo warnings 2015-03-06 17:47:23 +11:00
Ines Almeida b7033e3d4e BGE physics: adding links to bullet documentation 2015-02-19 11:20:18 +00:00
Campbell Barton 65574b0b03 cleanup: shebang lines
D888 by @sambler
2015-01-29 15:56:23 +11:00
Sergey Sharybin 653c6f2edd SDL wrangler: Support loading SDL2 libraries of different names
Seems different distros might have different naming rules, so need
to adopt our code for that.
2015-01-14 00:26:43 +05:00
Campbell Barton 72ca952641 correct permissions 2015-01-08 23:01:15 +11:00
Sergey Sharybin 59742167ce Just another attempt to make MSVC happy
No idea why standalone libmv remo was all fine with the code..
2014-12-31 19:04:29 +05:00
Sergey Sharybin bca434de78 Hopefully fix compilation error after recent update 2014-12-31 16:42:40 +05:00
Sergey Sharybin caa2306d16 Libmv: Update to latest upstream version
Main purpose of this is to bring new gflags library which is more likely
to have a fix for undefined order of static variables initialization and
also to bring new glog where some compilation error are fixed (which are
only visible with more strict checks with clang and c++11 enabled).
2014-12-31 16:02:04 +05:00
Sergey Sharybin 2617d37034 Libmv: Reshuffle CMake and SCons configuration files
The main idea is to share as much code between cases when feature-full built
is done and only logging is needed, so all the defines and include directories
are guaranteed to be the same.

This would hopefully make it so MinGW compilation is all happy about Cycles
logging for both CMake and SCons.
2014-12-11 11:58:03 +05:00
Sergey Sharybin 8600dc6365 Fix T42800: Blender suddenly closes after pressing solve camera motion
Couple of issues:

- Fist/last frame calculation was wrong

- Keyframe selection might silently fail leading to unpredictable math
  errors all over the place. Now if keyframe selection fails solver wouldn't
  run.
2014-12-04 20:02:05 +05:00
Sergey Sharybin 627f27502f Cycles: Support logging when building with SCons
Basically, title says ti all, the option is called WITH_BF_CYCLES_LOGGING
2014-12-03 22:46:56 +05:00
Sergey Sharybin 80d1d624d3 Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.

We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D878
2014-11-17 17:43:18 +05:00
Sergey Sharybin fa6c45b092 Cycles: Fix compilation error with enabled looging but disabled libmv 2014-11-15 04:01:31 +05:00
Sergey Sharybin f82f1513e0 Booleans: Boost is no longer a dependency for Carve
SCons is currently broken on my laptop, so can't test if it works for sure,
so please do tests of that.
2014-11-13 18:26:21 +05:00
Sybren A. Stüvel 53297e62eb Fixed warning about redefining the __SSE__ macro in VS2013 2014-11-05 21:55:17 +05:00
Sergey Sharybin aa91a36864 Libmv: Code cleanup, avoid C11 feature with structure re-definition 2014-11-01 03:18:40 +05:00
Sergey Sharybin 26e440838f Libmv: Code cleanup, mixed class/struct in declaration/definition 2014-11-01 02:57:05 +05:00
Sergey Sharybin f312f890f1 Libmv: Support disabled color channels in tracking settings
This was never ported to a new tracking pipeline and now it's done using
FrameAccessor::Transform routines. Quite striaghtforward, but i've changed
order of grayscale conversion in blender side with call of transform callback.

This way it's much easier to perform rescaling in libmv side.
2014-10-30 23:29:53 +05:00
Sergey Sharybin 606329d0f8 Libmv: Replace region tracker with autotracker in Blender
The title actually tells it all, this commit switches Blender to use the new
autotrack API from Libmv.

From the user point of view it means that prediction model is now used when
tracking which gives really nice results.

All the other changes are not really visible for users, those are just frame
accessors, caches and so for the new API.
2014-10-30 23:12:19 +05:00
Sergey Sharybin 7013d55580 Libmv: Add autotrack API to the C-API
Pretty much straightforward changes, nothing to be mentioned specially.
2014-10-30 23:07:46 +05:00
Keir Mierle b15a056230 Libmv: Initial commit of unfinished AutoTrack API
This starts the creating the new AutoTrack API. The new API will
make it possible for libmv to do full autotracking, including
predictive tracking and also support multiple motion models (3D
planes etc).

The first goal (not in this patch) is to convert Blender to use
the new API without adding any new functionality.

This API currently contanins:

- Frame accessor to access frames which are stored in Blender side.
- New Tracks implementation
- New Reconstruction implementation

Currently this API only tested on doing the same frame-to-frame
tracking as the old API allowed to do. But it also supports now
predictive tracking which is based on the Kalman filter.
2014-10-30 23:03:34 +05:00
Jens Verwiebe c8d10d115c OSX/CLEW: silence hundreds of warnings: 'weak_import' attribute only applies to variables and functions 2014-10-24 14:25:02 +02:00
Jason Wilkins 88fe896243 Checked each of my (jwilkins) XXX notes.
The ones in extern/glew-es have been changed to NOTE instead of XXX

GHOST_ContextEGL.cpp: It really does seem that it is not possible to query the swap interval using EGL

GHOST_WidnowCocoa.h: The comment referring to Carbon is clearly out of date, so I removed it.

math_geom.c: The node about not using tmax again is correct, but the code is kept for a future maintainer who will need to know how to compute it if they modify that code.

paint_image_proj.c (2698): The question about integer truncation does not appear to have been resolved.  It still seems to be an incorrectly implementation of rounding (I'd suggest using the round function instead of this hack).
2014-10-22 20:03:25 -05:00
Sergey Sharybin ad4980ce5e Code cleanup: Mostly whitespace 2014-10-10 02:17:46 +06:00