Age | Commit message (Collapse) | Author |
|
* Don't link embree / OSL when WITH_CYCLES is disabled
* Simplify lite config by disabling Cycles as a whole using this
* Remove code handling the removed WITH_CYCLES_NETWORK option
|
|
Compressing blendfiles can help save a lot of disk space, but the slowdown
while loading and saving is a major annoyance.
Currently Blender uses Zlib (aka gzip aka Deflate) for compression, but there
are now several more modern algorithms that outperform it in every way.
In this patch, I decided for Zstandard aka Zstd for several reasons:
- It is widely supported, both in other programs and libraries as well as in
general-purpose compression utilities on Unix
- It is extremely flexible - spanning several orders of magnitude of
compression speeds depending on the level setting.
- It is pretty much on the Pareto frontier for all of its configurations
(meaning that no other algorithm is both faster and more efficient).
One downside of course is that older versions of Blender will not be able to
read these files, but one can always just re-save them without compression or
decompress the file manually with an external tool.
The implementation here saves additional metadata into the compressed file in
order to allow for efficient seeking when loading. This is standard-compliant
and will be ignored by other tools that support Zstd.
If the metadata is not present (e.g. because you manually compressed a .blend
file with another tool), Blender will fall back to sequential reading.
Saving is multithreaded to improve performance. Loading is currently not
multithreaded since it's not easy to predict the access patterns of the
loading code when seeking is supported.
In the future, we might want to look into making this more predictable or
disabling seeking for the main .blend file, which would then allow for
multiple background threads that decompress data ahead of time.
The compression level was chosen to get sizes comparable to previous versions
at much higher speeds. In the future, this could be exposed as an option.
Reviewed By: campbellbarton, brecht, mont29
Differential Revision: https://developer.blender.org/D5799
|
|
Change the dylib folder relative to `Blender` executable to be
the same as before rB652fbc200500497a67bd11d18b786587ba34e3d9 and same
as bpy.so : `@loader_path/../Resources/${BLENDER_VERSION}/lib`
|
|
|
|
For Blender.app: dropping libomp.dylib next to Blender executable is
enough for it getting picked up since `@executable_path` is an rpath.
For non-distributed binaries datatoc, makesdna, tests etc, code for
copying libomp.dylib to build folder is removed and replaced by
CMake's rpath option for *build* tree.
For bpy.so, the post build rpath change has also been replaced by CMake
rpath option for *install* tree.
Since -id has been changed in D11748, remove the
`install_name_tool -change ...` command.
Any dylib can just be dropped at `MAC_BLENDER_TARGET_DYLIBS_DIR`
hereafter. Appending dylib path to `CMAKE_BUILD_RPATH` will be needed
for datatoc etc if linked against one (instead of copying the
dylibs around).
Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D11997
|
|
Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D12021
|
|
|
|
Make `CMAKE_OSX_DEPLOYMENT_TARGET` independent of buildbot settings and
always set to `OSX_MIN_DEPLOYMENT_TARGET`. That fixes the launch error
on OS older than buildbot's.
Remove unused `MACOSX_DEPLOYMENT_TARGET`.
Fix T88419
Diff D11323
|
|
|
|
Correction in e5f0d176d4cfa020bfb4de78086007dcfd02e8f9
|
|
Only done in top level CMakeLists, and platform_apple.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D10343
|
|
|
|
Reviewed By: #platform_macos, brecht
Maniphest Tasks: T86579
Differential Revision: https://developer.blender.org/D10664
|
|
|
|
* Only try to find sse2neon if Neon detected
* Only run Neon support test once
|
|
The location of the shaders changed with OSL 1.11.10. This commit is therefore in addition to D10212.
@sybren With the latest SVN libraries, I am fairly certain there is a "OSL not found" in the CMake output. Can you check on Linux?
@LazyDodo Since you haven't pushed the new OSL libs yet, this should not be a problem on Windows. So this will only be needed whenever those land.
Reviewed By: LazyDodo
Differential Revision: https://developer.blender.org/D10552
|
|
Due to moving the code the test binary was incorrectly compiled with OpenMP
flags. Move setting of the OpenMP flags to the appropriate place.
|
|
Was disabled in rBc778fd981e63. Libraries have been updated in rBL62576.
|
|
New libs have not landed in the SVN repository. Once they are up, this commit will be reverted.
|
|
This bumps OSL to 1.11.10.0. OSL Has a new build time
dependency: Clang, and more importantly it expects
clang and llvm to share a library folder, which it
previously for us did not.
This patch changes:
-OSL Update to 1.11.10.0
-refactor the llvm/clang/clang-tools-extra builds into the llvm
build using the llvm-project tarball for building that has all
of the subprojects in it.
-update ispc/openmp builds since clang no longer its own dependency
and they have to depend on the llvm build now.
-Update the windows builder to use the 64 bit host tools since it
ran out of ram linking clang
-Since OSL now needs clang to link successfully a findclang.cmake
has been provided for linux/OSX
Differential Revision: https://developer.blender.org/D10212
Reviewed By: brecht, sebbas, sybren
|
|
* WITH_CPU_SSE was renamed to WITH_CPU_SIMD, and now covers both SSE and Neon.
* For macOS sse2neon.h is included as part of the precompiled libraries.
* For Linux it is enabled if the sse2neon.h header file is detected. However
this library does not have official releases and is not shipped with any Linux
distribution, so manual installation and configuration is required to get this
working.
Ref D8237, T78710
|
|
This required using a fork of Embree, newer LLVM version, unreleased ISPC
version and sse2neon directly from Git. Hopefully over time all the required
changes end up in official releases. For now we deviate from other platforms.
Based on contributions by Apple and Stefan Werner.
Ref D9527, D8237, T78710
|
|
Ref T84819
Build System
============
This is an API breaking new version, and the updated code only builds with
OpenColorIO 2.0 and later. Adding backwards compatibility was too complicated.
* Tinyxml was replaced with Expat, adding a new dependency.
* Yaml-cpp is now built as a dependency on Unix, as was already done on Windows.
* Removed currently unused LCMS code.
* Pystring remains built as part of OCIO itself, since it has no good build system.
* Linux and macOS check for the OpenColorIO verison, and disable it if too old.
Ref D10270
Processors and Transforms
=========================
CPU processors now need to be created to do CPU processing. These are cached
internally, but the cache lookup is not fast enough to execute per pixel or
texture sample, so for performance these are now also exposed in the C API.
The C API for transforms will no longer be needed afer all changes, so remove
it to simplify the API and fallback implementation.
Ref D10271
Display Transforms
==================
Needs a bit more manual work constructing the transform. LegacyViewingPipeline
could also have been used, but isn't really any simpler and since it's legacy
we better not rely on it.
We moved more logic into the opencolorio module, to simplify the API. There is
no need to wrap a dozen functions just to be able to do this in C rather than C++.
It's also tightly coupled to the GPU shader logic, and so should be in the same
module.
Ref D10271
GPU Display Shader
==================
To avoid baking exposure and gamma into the GLSL shader and requiring slow
recompiles when tweaking, we manually apply them in the shader. This leads
to some logic duplicaton between the CPU and GPU display processor, but it
seems unavoidable.
Caching was also changed. Previously this was done both on the imbuf and
opencolorio module levels. Now it's all done in the opencolorio module by
simply matching color space names. We no longer use cacheIDs from OpenColorIO
since computing them is expensive, and they are unlikely to match now that
more is baked into the shader code.
Shaders can now use multiple 2D textures, 3D textures and uniforms, rather
than a single 3D texture. So allocating and binding those adds some code.
Color space conversions for blending with overlays is now hardcoded in the
shader. This was using harcoded numbers anyway, if this every becomes a
general OpenColorIO transform it can be changed, but for now there is no
point to add code complexity.
Ref D10273
CIE XYZ
=======
We need standard CIE XYZ values for rendering effects like blackbody emission.
The relation to the scene linear role is based on OpenColorIO configuration.
In OpenColorIO 2.0 configs roles can no longer have the same name as color
spaces, which means our XYZ role and colorspace in the configuration give an
error.
Instead use the new standard aces_interchange role, which relates scene linear
to a known scene referred color space. Compatibility with the old XYZ role is
preserved, if the configuration file has no conflicting names.
Also includes a non-functional change to the configuraton file to use an
XYZ-to-ACES matrix instead of REC709-to-ACES, makes debugging a little easier
since the matrix is the same one we have in the code now and that is also
found easily in the ACES specs.
Ref D10274
|
|
Default to Python version 3.9.
Reviewed By: LazyDodo, sybren, sebbas
Ref D10380
|
|
Standard wiki build instructions for building Blender on macOS can now be used
on Macs with ARM processors.
This contains all libraries except for Embree and OpenImageDenoise, so Cycles
performance does not yet have full performance and features in this build. An
x86-64 build is likely to still render faster than arm64 until Embree is added.
Uses the new lib/darwin_arm64 folder. For simplicity and to keep download size
under control, both for end users and builders, we are not planning to ship
universal binaries. So this is a separate folder from lib/darwin.
Ref T78710
Differential Revision: https://developer.blender.org/D10276
|
|
|
|
Decision: https://lists.blender.org/pipermail/bf-committers/2020-December/050836.html
Adds CMake dependency builder support. Tested on
macOS and Windows (Thanks @LazyDodo).
Reviewed By: #platform_macos, LazyDodo, sebbas
Maniphest Task: T84836
Differential Revision: https://developer.blender.org/D9928
|
|
This adds an option (WITH_COMPILER_CCACHE) to build using Ccache if it's
found. Makefiles-based, Ninja-based and Xcode generators are supported.
Pass `-DWITH_COMPILER_CCACHE=ON` to cmake to enable Ccache.
Utility option in GNUmakefile is also added: for e.g.,
`make ninja ccache`.
Reviewed By: brecht, ankitm
Differential Revision: https://developer.blender.org/D9665
|
|
This commit expands the Windows-specific code in rBdca9aa0053f7 and Linux-specific code in rB33b7d53df08a.
It also fixes a capitalization issue in FindPugiXML.cmake
|
|
Reviewed By: ankitm
Maniphest Tasks: T83174
Differential Revision: https://developer.blender.org/D9664
|
|
Left out in {rB7f28a99dd5a57216fb477d844ae1fec5510ad5d5}
|
|
Causes link issues on Xcode's "New Build System" which was introduced
in Xcode 10 and is default on Xcode 12.
https://devtalk.blender.org/t/16273
Differential Revision: https://developer.blender.org/D9624
Reviewed by: brecht, #platform_macos
|
|
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
|
|
|
|
Until it is decided whether to ship JACK with pre-compiled libraries,
search for the same in system directories.
Ref T79261
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9436
|
|
|
|
The old code was added in {rBbaa4a9c7d4dd}
While the hotfix committed in {rB2ddecfffc3d3a3a1db4ae45e8665ca} fixed
the id_management test, the correct reason was found at
https://bugs.llvm.org/show_bug.cgi?id=47984
This matches the behavior on Linux.
|
|
Setting the stack size only works for executables, for shared libraries
the host application controls it.
|
|
Revert part of {rB83124856d05ee4da605ab247e6}
|
|
This is a stricter version of the change made in
{rBbb872b25f219d1a9bc2446228b6dc}
Cmake must never look into Frameworks when the system
library guards (`without_system_libs_begin`/`without_system_libs_end`)
are present.
OpenAL didn't follow this and OpenAL.framework in Xcode would be used.
The Cmake's `FindOpenAL.cmake` looks for both library (in this case,
the .framework file), and include dir.
Precompiled libraries don't contain the former. So `find_package`
cannot be used, or it becomes the hack that {rBb2c707747da9} removed.
So hardcode the include dir path, and other variables.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9267
|
|
https://devtalk.blender.org/t/libpng-version-mismatch/15799/
By default, `CMAKE_FIND_FRAMEWORK` is `FIRST`.
CMake searches headers and libraries separately. So library is found
in LIBDIR, and headers like those in Mono are detected before the
headers in LIBDIR, and we get a version mismatch.
So set the priority of Frameworks to `LAST`.
https://gitlab.kitware.com/cmake/cmake/-/issues/18921
https://gitlab.kitware.com/cmake/cmake/-/issues/16427
{rBbac91956ae97} tried to fix the same issue, but it didn't work.
It's fine to keep the changes made there, just removing the comment
that may give false sense of security.
|
|
{rB1f6b7387ad01}
|
|
https://devtalk.blender.org/t/libpng-version-mismatch/15799/
In this case, CMake finds libraries in `LIBDIR`, but picks headers from
`/Library/Frameworks/` (Mono framework).
CMP0074 is already enabled, so use it.
|
|
https://devtalk.blender.org/t/building-blender-on-macos-fails/15756/
In some cases, CMake finds the Zlib supplied with OpenCollada
pre-compiled libraries, and not the system one.
|
|
For multi-config generators, tests are in `bin/tests/<config>` folder.
and OpenMP cannot be found at `@executable_path/../Resources/lib`.
So create that folder and put the library there to be used by tests.
It is not ideal to copy the library around. When minimum CMake version
is changed to 3.12, FindOpenMP by CMake can be used for this whole
block of code. Then a nice rpath based solution can be used.
|
|
The "Apple" part is guaranteed by the platform file.
"Clang" is enough to differentiate it from other compilers.
Came across this due to the custom built LLVM toolchain I'm using.
|
|
Introduced by me in {rB1f6b7387ad0177c1dec9bb83b7}.
|
|
After tests were bundled in a single executable and cycles and libmv
created their own tests, the warnings on macOS have gone over 800.
The reason is setting `*_LIBRARIES` to names of the libraries
and later using `link_directories` to link them properly.
https://cmake.org/cmake/help/latest/command/link_directories.html
> Note This command is rarely necessary and should be avoided where
> there are other choices. Prefer to pass full absolute paths to
> libraries where possible, since this ensures the correct library
> will always be linked. The find_library() command provides the
> full path, which can generally be used directly in calls to
> target_link_libraries().
Warnings like the following popup for every target/executable,
for every library it links to.
```
ld: warning: directory not found for option
'-L/Users/me/blender-build/blender/../lib/darwin/jpeg/lib/Debug'
```
The patch completes a step towards removing `link_directories` as
mentioned in TODO at several places.
The patch uses absolute paths to link libraries and removes
all `*_LIBPATH`s except `PYTHON_LIBPATH` from
`platform_apple.cmake` file. (The corner case where it's used seems
like dead code. Python is no longer shipped with that file structure.)
Also, unused code for LLVM-3.4 has been removed.
Also, guards to avoid searching libraries in system directories have
been added.
`APPLE` platform now no longer needs `setup_libdirs`,
`cycles_link_directories`, and `link_directories`.
The number of warnings now is less than 100, most of them being
deprecation ones in dependencies.
This patch depended on {rBb746179d0add}, {rB2fdbe4d05011},
{rB402a4cadba49} and {rBd7f482f88ecb}.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8855
|
|
NanoVDB is a platform-independent sparse volume data structure that makes it possible to
use OpenVDB volumes on the GPU. This patch uses it for volume rendering in Cycles,
replacing the previous usage of dense 3D textures.
Since it has a big impact on memory usage and performance and changes the OpenVDB
branch used for the rest of Blender as well, this is not enabled by default yet, which will
happen only after 2.82 was branched off. To enable it, build both dependencies and Blender
itself with the "WITH_NANOVDB" CMake option.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8794
|
|
Original was added in rB83f8223543f58c3b0881a03b6e9ddffff91.
Duplicate was added in the merge rB9e09b5c418c0a436e3c84ccf.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8822
|