Blender Git Commit Log

Git Commits -> Revision f505dcc

Revision f505dcc by Sergey Sharybin (opensubdiv-modifier)
May 30, 2014, 08:15 (GMT)
Bring new OpenSubdiv with CUEW support

WARNING: Latest fork of OpenSubdiv is to be used to be able to compile
this revision:

https://github.com/Nazg-Gul/OpenSubdiv/tree/cuda-dynload

We'll work on pull-request when our branch would be proved to work on
Linux (which seems to work already) and Windows (need to test this,
that's why commit is happening now -- stashing changes, creating a
milestone, easier access from Windows!).

NOTE: Would ask platform maintainers to not bother trying to make this
revision to work yet. Lemme test things on Windows first and it it
all work i'll prepare libs for windows and do a pull-request to an
upstream.

Main idea is to make OpenSubdiv to detect OpenCL and CUDA on runtime.
Before this Blender was linking against libOpenCL and libcuda which
is not good for portability.

OpenCL part was already kind of done, but wasn't properly integrated.
Not sure why it compiled even :)

CUDA is now does the same trick as Cycles does with dynamic load of
cuda driver api library.

That would have been real straightforward change if we wouldn't try
to de-duplicate CUDA/CL wrappers in the Blender sources. The thing
is, Cycles, Compositor and OpenSubdiv all requires wrappers for this
libraries and it was real stupid to have two clew (for Cycles and
Compositor) already.

The idea to solve this is: move clew/cuew to extern/ and make all
the bits which requires cuda/cl to use those wrappers instead of
shipping their own. This is real straightforward change to make
Cycles and Compositor happy since it's easy to re-arrange libraries
we're maintaining in the sources. Making it so OpenSubdiv libraries
can use symbols from our extern_{clew,cuew} was rather a black
magic but it appeared to work pretty well here on Linux. Let's
see how it works on Windows now.

TODO:
- Make sure Windows works
- Remove cuda/cl wrappers from intern/cycles
- Make sure Cycles stadalone works

As for Cycles standalone it's real easy to make it compiled when
building from inside Blender. When/if we'll move Cycles to own
repo it's still easy to make it use clew/cuew by putting them to
extern/ or third_party/ folder in Cycles repo.

Commit Details:

Full Hash: f505dccd5fe571d7dc8b92f09892a7c041f33805
Parent Commit: 41eaae2
Lines Changed: +1288, -52

4 Added Paths:

/extern/cuew/CMakeLists.txt (+40, -0) (View)
/extern/cuew/include/cuew.h (+624, -0) (View)
/extern/cuew/SConscript (+35, -0) (View)
/extern/cuew/src/cuew.c (+463, -0) (View)

15 Modified Paths:

/build_files/cmake/Modules/FindOpenSubdiv.cmake (+0, -12) (Diff)
/build_files/scons/config/linux-config.py (+2, -2) (Diff)
/build_files/scons/config/win32-vc-config.py (+1, -1) (Diff)
/build_files/scons/tools/Blender.py (+0, -1) (Diff)
/extern/clew/SConscript (+1, -1) (Diff)
/extern/CMakeLists.txt (+1, -0) (Diff)
/extern/SConscript (+1, -0) (Diff)
/intern/opensubdiv/clInit.h (+26, -7) (Diff)
/intern/opensubdiv/CMakeLists.txt (+7, -0) (Diff)
/intern/opensubdiv/cudaInit.h (+47, -11) (Diff)
/intern/opensubdiv/opensubdiv_capi.cc (+16, -5) (Diff)
/intern/opensubdiv/SConscript (+5, -7) (Diff)
/SConstruct (+7, -2) (Diff)
/source/blenderplayer/CMakeLists.txt (+6, -0) (Diff)
/source/creator/CMakeLists.txt (+6, -3) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021