Commit Graph

502 Commits

Author SHA1 Message Date
Sergey Sharybin
a474409f0b OpenSubdiv: Enable by default on the supported platforms
This commit makes sure Linux and Windows buildbots are using OpenSubdiv
and also enables OpenSubdiv by default on Windows.

OSX is kept disabled still, this is due to OpenGL restrictions which are
not solved in any way yet.

Linux is defaults to OpenSubdiv disabled because it needs precompiled
library.

The documentation could be found there:

  http://wiki.blender.org/index.php/User:Nazg-gul/OpenSubdiv
2015-08-05 13:29:39 +02:00
Jörg Müller
a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
Sergey Sharybin
30772b6f09 SCons: Weirdly enough at some point scons became broken in OpenSubdiv branch 2015-07-20 22:43:13 +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
5a4b51992e SCons: Enable sm_52 CUDA kernel on all platforms 2015-06-20 17:01:21 +02:00
Sergey Sharybin
1d6c025c42 SCons: Fix missing file in kernel when building on OSX 2015-06-19 21:26:47 +02:00
Sergey Sharybin
037181cf1c SCons: Another attempt to fix bundling on OSX 2015-06-19 19:52:47 +02:00
Sergey Sharybin
27eb2b1017 SCons: Fix wrong bunding of Cycles kernel on OSX platform 2015-06-19 19:38:51 +02:00
Martijn Berger
0187356613 python tar.gz changed structure due to python.exe being added. remove /lib/ from cmake as lib and bin are both in the tar.gz 2015-05-30 09:44:44 +02:00
Campbell Barton
ddb1a068e9 SCons: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
Sergey Sharybin
bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
Sergey Sharybin
615414fa36 SCons: Ignore .svn folder when installing site-packages 2015-04-29 14:30:37 +05:00
Sergey Sharybin
029bd44bbd SCons: Fix wrong flags usage after recent stdc89 changes
CCFLAGS are used for both C and C++ compilers and one is better not to pass
C-related flags to C++ compiler. C-compiler flags are to be passed via CFLAGS
variable.
2015-04-29 13:57:02 +05:00
Campbell Barton
eee666583f Use gnu89 for GCC
GCC5 defaults to gnu11, which we may switch to later
but disable for now to prevent accidental use.
2015-04-28 18:59:52 +10:00
Jens Verwiebe
28e9058e7a OSX: add a license file for libiomp5 ( intel omp ) when compiled with 2015-04-06 19:12:23 +02:00
Sergey Sharybin
6f51df5384 SCons: Attempt to deal with branches without upstream configured 2015-03-20 14:03:54 +05:00
Sergey Sharybin
63ea8dd156 Initial compilation support with C++11 featureset enabled
This commit makes some preliminary fixes and tweaks aimed to make blender
compilable with C++11 feature set. This includes:

- Build system attribute to enable C++11 featureset.

  It's for sure default OFF, but easy to enable to have a play around with
  it and make sure all the stuff is compilable before we go C++11 for real.

- Changes in Compositor to use non-named cl_int structure fields.

  This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL
  does not use named fields in this case.

- Changes to TYPE_CHECK() related on lack of typeof() in C++11

  This uses decltype() instead with some trickery to make sure returned type
  is not a reference.

- Changes for auto_ptr in Freestyle

  This actually conditionally switches between auto_ptr and unique_ptr since
  auto_ptr is deprecated in C++11. Seems to be not strictly needed but still
  nice to be ready for such an update anyway/

This all based on changes form depsgraph_refactor branch apart from the weird
changes which were made in order to support MinGW compilation. Those parts of
change would need to be carefully reviewed again after official move to gcc49
in MinGW.

Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and
likely needs some more tweaks.

Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3

Differential Revision: https://developer.blender.org/D1089
2015-03-13 16:47:40 +05:00
Antony Riakiotakis
d58a15c0a6 Windows: Add stacktrace support when unhandled exception occurs.
We need to register the exception handler slightly differently here, as
well as adding DbgHelp as a library, but according to docs it should be
supported in recent Windows editions (Win XP included even).

We can try it first and revert if there are issues.
2015-03-03 13:39:15 +01:00
Thomas Dinges
bd5154bb2c Fix Cycles OpenCL error with scons, util_math_fast.h was missing.ø 2015-02-18 22:44:17 +01:00
Joshua Leung
c62c44bdc1 Fix for scons + mingw64 warning flags fix
So, it turns out my changes here the other day were a bit too over-eager:
  -Wdeclaration-after-statement and -Wstrict-prototypes only applied to C code
and not C++ (which that set of flags was getting included for too).

  However, -Wno-char-subscripts is fine where it is now, so I've left it in place
2015-02-06 23:51:31 +13:00
Sergey Sharybin
40f237675f Some tweaks to support upcoming OSL-1.6
Doesn't mean we're 100% ready for the transition, but need to start somewhere
anyway. Changes:

- OSL is no longer supporting cpp and requires usage of Boost Wave.
  So now Wave component of Boost is optionally demanded when looking for the
  Boost libraries if OSL is enabled.

  Only did this for Linux, MSVC seems already using Wave. Not sure about OSX.

- Because of the same reason OSL should be moved prior Boost for linker.

- Whole archive trick makes it so linking fails with duplicated symbols, so
  removed it for the new OSL. Didn't see issues with this so far.

- Added some code to check OSL version on Linux. Would need to move all that
  to FindOpenShadingLanguage.cmake which we can get from Cycles standalone
  repository.

  So in theory no affect on current stup would be made at all.

- Added some tweaks to buildbot files. It now seems to be happy with the new
  OSL libraries, but again, those tweaks are not in action yet.

All this was tested on Linux only. Win/OSX might still need some tweaks to
support new OSL.

P.S. This doesn't mean we're pushing OSL update yet, just making some
preliminary tweaks to avoid entropy of PITA when we'll actually want to
switch.
2015-02-06 14:57:32 +05:00
Joshua Leung
31425f9225 Compiler warnings tweak for scons + mingw64
The warning flags in C_WARN were not actually getting included
(most notably, the one disabling the pointless + braindead one
about using chars to index into arrays - given that we only use
unsigned chars everywhere). Maybe this should get done for the
other scons platforms too?
2015-02-05 00:50:50 +13:00
Martijn Berger
ce6e71ea90 Make MSVC 2013 win32 also use new OpenEXR 2.2 2015-02-02 21:30:28 +01:00
Martijn Berger
d7ad64cc5e Bump OpenEXR to 2.2 for windows MSVC 2013 2015-02-02 19:44:49 +01:00
Sergey Sharybin
424100cecb Update scons build documentation
- fix dead blender.org link (build dependencies)
  - rewrite $BLENDERHOME/{config,tools}/* to $BLENDERHOME/build_files/scons/{config,tools}/*

Patch by David Creswick, thanks!

Reviewers: jesterking

Differential Revision: https://developer.blender.org/D798
2015-01-28 23:40:41 +05:00
Martijn Berger
ce52e781b0 Switch windows MSVC builds to OpenAL-soft 2015-01-28 10:36:19 +01:00
Sergey Sharybin
f80eb37e21 Remove executable flag from the build configuration files
They're not intended to be executed directly and seems mode change happened
by accident.

Setting -x for this files to avoid possible incidents by trying to run this
files in shell.
2014-12-31 14:05:53 +05:00
Sergey Sharybin
47788b5e68 Switch to numpy 1.9 for windows platform 2014-12-10 13:50:51 +05:00
Sergey Sharybin
7b6c9d23cf Cycles: Fix compilation error with MinGW and logging enabled 2014-12-08 19:37:41 +05:00
Severin
e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
Joshua Leung
abab4f19e6 Fix scons+mingw64 compiling - Ensure WITH_BF_CYCLES_LOGGING is defined and turned off 2014-12-05 13:13:34 +13:00
Sergey Sharybin
2f637004d5 Buildbot: Enable sm_52 for OSX
This actually enables it in the darwin scons config, that's how it always
used to be configured there.
2014-12-04 19:30:35 +05:00
Sergey Sharybin
9ae458362a Cycles: Enable logging by default
Default configuration already includes libmv and glog, so all
the dependencies are met. And logging is nice to have anyway.

This wouldn't give any slowdown, because all the logging is
silenced unless '--debug-cycles', plus no logging is done
from the speed critical code.
2014-12-03 22:46:56 +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
Thomas Dinges
4649f17c38 Cycles: Enable native sm_52 kernel for Windows. 2014-12-02 13:41:43 +01:00
Sergey Sharybin
82d2718c8f Switch to SDL2 on OSX 2014-11-19 19:41:41 +01: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
Jens Verwiebe
fa821a969e OSX/buildsystems: unify openmp handling by changing iomp5 id to @loader_path/../Resources/lib/libiomp5.dylib
This makes install_name_tool usage obsolete here and also assures cmake builds can be codesigned.
IMPORTANT: update lib (darwin-9.x.universal/openmp)
2014-11-16 17:03:44 +01:00
Martijn Berger
96ca64629d Windows (MSVC2013) move to SDL2 2014-11-13 16:23:27 +01:00
Sergey Sharybin
3248be1fbf SCons: Expose missing command line arguments controlling GLEW 2014-10-31 22:51:59 +05:00
Sergey Sharybin
778afc8082 Disable GLEW_MX in scons
This was already disabled in CMake and we need to keep build systems
in 100% synchronized state.

P.S. Would it be a real fix to drop SCons?
2014-10-31 22:51:44 +05:00
Campbell Barton
5e6d878318 Revert "Scons/funstuff: notify when the binaries are compiled"
This reverts commit cdf53701599ace0b3410cbb75b0313bd969c417c.

Please always keep build-systems simple, boring & functional,
anyone who liked notification popups can write a simple build script.
2014-10-31 10:41:12 +01:00
Jens Verwiebe
cdf5370159 Scons/funstuff: notify when the binaries are compiled 2014-10-23 19:19:02 +02:00
Jens Verwiebe
c8a62319cf Linux/scons: fix compile, BF_BOOST_LIB_STATIC string was miising a space 2014-10-21 18:47:52 +02:00
Jason Wilkins
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Sergey Sharybin
27d660ad20 Cycles: Add support for debug passes
Currently only summed number of traversal steps and intersections used by the
camera ray intersection pass is implemented, but in the future we will support
more debug passes which would help checking what things makes the scene slow.
Example of such extra passes could be number of bounces, time spent on the
shader tree evaluation and so.

Implementation from the Cycles side is pretty much straightforward, could only
mention here that it's a build-time option disabled by default.

From the blender side it's implemented as a PASS_DEBUG with several subtypes
possible. This way we don't need to create an extra DNA pass type for each of
the debug passes, saving us a bits.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D813
2014-10-04 19:00:26 +06:00
Sergey Sharybin
bcab08c50a Libmv: Fix wrong variable use in scons 2014-10-02 17:12:49 +02:00
Sergey Sharybin
178f8400ee Libmv: Add an option to disable schur specializations build-time
This way folks with few ram or those who wants to hack into Ceres
code might compile Blender much faster.
2014-10-02 13:01:34 +06:00
Sergey Sharybin
feba2d3edf Attempt to fix compilation error on ubuntu linux 2014-09-08 14:29:34 +06:00
Sergey Sharybin
9b9ddb4669 Make SCons's DEBUG/_DEBUG consistent with CMake
Also move this to a generic place in SConstruct instead of having this
defines in 6 different configurations.

Should not be functional changes, but please verify all the platforms.
2014-08-27 14:49:47 +06:00