Commit Graph

531 Commits

Author SHA1 Message Date
Sergey Sharybin
57408177d2 SCons: Support compilation with 10.11 SK on OS X 2015-10-05 14:48:04 +05:00
Jörg Müller
be047fe455 Audaspace: building without audaspace.
- Fixed building without for cmake.
- Scons can now build without audaspace too.
2015-07-28 14:53:06 +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
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
73a104b8e8 Fix T44968: Python executable crashes due to missing .DLL
For now we work this around by copying python DLL to the
bin folder. Ideally the DLL should be shared between blender
and python, but that's a bit tricky to do on windows.
2015-06-10 13:41:06 +05:00
Sergey Sharybin
2c503d8303 Cycles: Restructure kernel files organization
Since the kernel split work we're now having quite a few of new files, majority
of which are related on the kernel entry points. Keeping those files in the
root kernel folder will eventually make it really hard to follow which files are
actual implementation of Cycles kernel.

Those files are now moved to kernel/kernels/<device_type>. This way adding extra
entry points will be less noisy. It is also nice to have all device-specific
files grouped together.

Another change is in the way how split kernel invokes logic. Previously all the
logic was implemented directly in the .cl files, which makes it a bit tricky to
re-use the logic across other devices. Since we'll likely be looking into doing
same split work for CUDA devices eventually it makes sense to move logic from
.cl files to header files. Those files are stored in kernel/split. This does not
mean the header files will not give error messages when tried to be included
from other devices and their arguments will likely be changed, but having such
separation is a good start anyway.

There should be no functional changes.

Reviewers: juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1314
2015-05-22 16:31:34 +05:00
Sergey Sharybin
7f4d5850fe SCons: Don't install SConscript into Cycles kernel folder 2015-05-22 16:00:26 +05:00
Sergey Sharybin
069adb8104 SCons: Fix for missing avx and avx2 cycles kernels
SCons was checking for a particular compiler version to see whether compiler
flags are available or not, but compiler ID was only set on OSX.

Now it should be set on Linux as well.
2015-05-21 18:46:57 +05:00
Sergey Sharybin
329f704601 Cycles: Move utility atomics function to util_atomic.h
No functional changes, just better to keep all atomic function in a single place,
they might become handy later.
2015-05-21 16:12:50 +05:00
Antony Riakiotakis
866532360c Fix T31546 fragment program gets created every frame
That was really crappy indeed. Now we have a separate API
for low level OpenGL programs, plus a nice interface for GPU, also
removes some GL calls from main code as a plus :)

The source for the programs is also moved to nice external .glsl files
(not sure which extension convention GPU assemply uses)
2015-04-09 20:20:50 +02:00
Sergey Sharybin
59740a6c98 SCons: cudakernels now depends on some configuration tests 2015-03-30 13:11:08 +05:00
Antony Riakiotakis
d5abff589e Fix scons build 2015-03-20 19:47:06 +01: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
Campbell Barton
2814039ee3 Remove version from readme, (replace on install) 2015-03-12 23:52:48 +11:00
Antony Riakiotakis
ff7220349d Compositing works with X-Ray.
Basically, before drawing X-Rays, we now bind a second depth buffer.
After drawing XRays, we do an extra resolve pass where we overwrite the
non-XRay depth buffer in pixels where the depth is not maximum (which
means background pixel, since depth is cleared before drawing X-Ray
objects).

This ensures both scene and X-Rays keep their depth values and are ready
for compositing. Well, the odd effect due to depth discontinuities can be
expected, and X-Rays are a bit more expensive (extra buffer + resolve pass)
but at least X-Rays won't invalidate depth values anymore. Whee!
2015-02-17 18:11:22 +01:00
Antony Riakiotakis
5e613198e5 Viewport compositing - first code
This commit introduces a few ready made effects for the 3D viewport
and OpenGL rendering.

Included effects are Depth of Field, accessible from camera view
and screen space ambient occlusion. Those effects can be turned on and
tweaked from the shading panel in the 3D viewport.

Off screen rendering will use the settings of the current camera.

WIP documentation can be found here:

http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-02-12 18:54:41 +01:00
Sergey Sharybin
dc1043dda0 Cycles: Add fast math function module
It is based on fmath.h from OIIO and could be used to give some speedup
in areas where absolute accuracy is not so critical.
2015-01-31 01:49:41 +05:00
Martijn Berger
ce52e781b0 Switch windows MSVC builds to OpenAL-soft 2015-01-28 10:36:19 +01: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
Antony Riakiotakis
8fa55d95e4 World background working on cycle nodes.
This is added in the spirit of the general cycles GLSL system
which is pretty much WIP still.

This will only work on cycles at the moment but generating for blender
internal is possible too of course though it will be done in a separate
commit.

This hasn't been tested with all and every node in cycles, but
environment and regular textures with texture coordinates work.

There is some difference between the way cycles treats some coordinates,
which is in world space and the way GLSL treats them, which is in view
space.
We might want to explore and improve this further in the future.

...also </drumroll>
2014-11-26 15:07:26 +01:00
Sergey Sharybin
e05be6bdbd SCons: Proper solution for local symbols map
Configuration used to override the link flags, it better restore them
once the configuration is done.
2014-11-20 15:27:10 +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
Martijn Berger
96ca64629d Windows (MSVC2013) move to SDL2 2014-11-13 16:23:27 +01: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
bd671f1005 Fix scons leaving partially generated files when aborting 2014-09-12 22:56:37 +06:00
Sergey Sharybin
feba2d3edf Attempt to fix compilation error on ubuntu linux 2014-09-08 14:29:34 +06:00
Martijn Berger
cebf728250 Add sqlite3 dll's on windows.
Fix T41144
2014-08-31 09:08:07 +02:00
Sergey Sharybin
526ae635d1 Fix T41629: Won't open blend files with non-Latin charasters in the name 2014-08-29 23:06:11 +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
Thomas Dinges
fb3f32760d Cycles: Add an experimental CUDA kernel.
Now we build 2 .cubins per architecture (e.g. kernel_sm_21.cubin, kernel_experimental_sm_21.cubin).
The experimental kernel can be used by switching to the Experimental Feature Set: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Experimental_Features

This enables Subsurface Scattering and Correlated Multi Jitter Sampling on GPU, while keeping the stability and performance of the regular kernel.

Differential Revision: https://developer.blender.org/D762
Patch by Sergey and myself.

Developer / Builder Note:
CUDA Toolkit 6.5 is highly recommended for this, also note that building the experimental kernel requires a lot of system memory (~7-8GB).
2014-08-26 17:02:26 +02:00
Jens Verwiebe
664f8e9048 OSX/Scons: make sure BF_OSL implies BF_LLVM 2014-08-14 12:16:11 +02:00
Sergey Sharybin
e438c450b4 Manifest used to be installed on non-windows platforms 2014-08-11 17:26:20 +06:00
Sergey Sharybin
0e9c677343 Add blender launcher application when building with MSVC
Main idea of this change is to make a small executable which
will set OMP_WAIT_POLICY environment variable and then will
launch blender itself.

This is a teporary solution for the time being we'll have a
more clear solution to high CPU usage with OpenMP when building
with MSVC.

Reviewers: campbellbarton, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D717
2014-08-07 21:45:24 +06:00
Martijn Berger
d1217cc4b2 change scons default to be visual studio 2013 2014-08-07 10:06:13 +02:00
Sergey Sharybin
77b7e1fe9a Deduplicate CUDA and OpenCL wranglers
For now it was mainly about OpenCL wrangler being duplicated
between Cycles and Compositor, but with OpenSubdiv work those
wranglers were gonna to be duplicated just once again.

This commit makes it so Cycles and Compositor uses wranglers
from this repositories:

  - https://github.com/CudaWrangler/cuew
  - https://github.com/OpenCLWrangler/clew

This repositories are based on the wranglers we used before
and they'll be likely continued maintaining by us plus some
more players in the market.

Pretty much straightforward change with some tricks in the
CMake/SCons to make this libs being passed to the linker
after all other libraries in order to make OpenSubdiv linked
against those wranglers in the future.

For those who're worrying about Cycles being less standalone,
it's not truth, it's rather more flexible now and in the future
different wranglers might be used in Cycles. For now it'll
just mean those libs would need to be put into Cycles repository
together with some other libs from Blender such as mikkspace.

This is mainly platform maintenance commit, should not be any
changes to the user space.

Reviewers: juicyfruit, dingto, campbellbarton

Reviewed By: juicyfruit, dingto, campbellbarton

Differential Revision: https://developer.blender.org/D707
2014-08-05 13:57:50 +06:00
Jens Verwiebe
02b66f8a55 OSX/buildsystem: prepare usage on OSX 10.10 - Yosemite
- important: requires cmake >= 2.8.12 to read minor version right,
aka older cmake rates 10.10 lower than 10.6 for example ! ( sigh )
2014-08-03 12:51:35 +02:00
Martijn Berger
bcbbed0ccf Use dynamically linked SDL 1.2.15 on windows x64 2014-07-31 16:43:02 +02:00
Jens Verwiebe
a9c8a117a2 OSX/scons: Fix linking if llvm is not used ( new osl/llvm/oiio related ) 2014-07-29 10:59:57 +02:00
Antony Riakiotakis
f745564e4e GSOC 2013 paint
Yep, at last it's here!

There are a few minor issues remaining but development can go on in
master after discussion at blender institute.

For full list of features see:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting

Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
2014-07-21 12:02:05 +02:00
Sergey Sharybin
30b4d0c0ec Need to disable Libmv for cudakernels target
This way no access to automated tests variables will happen.

Ideally it should be something more like using blenderlite
with just Cycles enabled, but let's keep it for a bigger
clean up.
2014-07-10 10:56:38 +06:00
Sergey Sharybin
430efd4228 SCons: Hopefully final fix for 32bit linux buildbot
No need to run automated tests for cudakernels target. TThis could
be harmless because CUDA binaries are built in the another chroot.
2014-07-10 10:48:31 +06:00
Sergey Sharybin
b2e9fffc3d Further tweaks to SCons's auto tests
We should do autotests only after setting path to sconsign,
otherwise using the same working directory and different
build directories will eventually break.
2014-07-10 03:53:37 +06:00
Sergey Sharybin
f0c06e71ba Another attempt to fix issues with 32bit OSX and scons 2014-07-10 02:33:44 +06:00
Jens Verwiebe
1c329fc54b OSX/Scons: after doublechecking. take out sdk_flags from cflags again, looks as we always get sdk properly fron ccflags in subcompiles 2014-07-06 15:46:16 +02:00
Jens Verwiebe
2440b3e158 OSX/scons: Try to get rid of buildproblems with openjpeg enabled in certain build environments and prepend SDK_FLAGS to CFLAGS always 2014-07-06 14:10:41 +02:00
Sergey Sharybin
d7d9e98352 Fix compilation error on OSX+Scons
Issue was caused by OSX tweaks happening in the SConstruct
after the old location of autotest.
2014-06-29 20:27:54 +06:00
Sergey Sharybin
72ac596e19 Update Ceres to latest upstream version
Brings new bounds limiting and also prepares build system
for the changes in the upstream.

Namely shared_ptr header and namespace is now being detected
by a build system rather than by hacks in the code.

This commit includes some changes to auto-detection flags
in SCons, presumably adding more consistency there. This
is main changes which are suppoed to be reviewed here.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D581
2014-06-27 14:08:27 +06:00
Sergey Sharybin
283abdf3b2 Fix compilation error with scons and older pythons 2014-06-26 16:03:52 +06:00
Campbell Barton
2dce13d213 Python: Remove deprecated uses of os.popen
T40415 by Lawrence D'Oliveiro
2014-06-20 02:00:46 +10:00