Commit Graph

1129 Commits

Author SHA1 Message Date
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 f12204196fb1ee985ab9745cf9c70877601145f9.

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