Commit Graph

3399 Commits

Author SHA1 Message Date
Sybren A. Stüvel 8c8e1ebdd2 CMake: Use lld when using Clang compiler
When using the `WITH_LINKER_LLD` option, the logic to find the `ld.lld`
binary and actually tell the build system to use it was specific to GCC.

I've copied the Clang-specific logic for Mold and adjusted it to find
LLD.

Not entirely sure why this is necessary, as LLD is actually Clang's
linker. However, without this change, CMake would use regular old slow
`ld` to link.

Pull Request: https://projects.blender.org/blender/blender/pulls/108884
2023-06-16 10:34:01 +02:00
Campbell Barton 24fef21bf8 Cleanup: cmake indentation 2023-06-16 12:20:33 +10:00
Campbell Barton 6a75ff7afa Cleanup: use function style casts, trailing space 2023-06-16 12:20:31 +10:00
Campbell Barton 65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Ray Molenkamp 3d6a99d2aa Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-14 14:37:40 -06:00
Ray Molenkamp 977081d72b DepsBuilder: Update OIIO to include PSD fix
This fixes #108487 by applying upstream OIIO commit 8da473e254

This commit fixes the deps builder to include the patch, the actual
bug will not be fixed until the platform maintainers update the OIIO
library in SVN.
2023-06-14 14:36:22 -06:00
Anthony Roberts ee1b2f53cc Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC
Currently on Windows some dependencies are built with MinGW/GCC 3.x
this commit removes that, in favor of building them with MSVC
via msys2. This will make it easier in the future to offer Win/Arm64
builds of blender.

Notable changes:

- This change drops support for the external libxvid library in favor
of ffmpegs built in support for this format. This has been done with
permission from the VFX module.

Pull Request: https://projects.blender.org/blender/blender/pulls/108983
              https://projects.blender.org/blender/blender/pulls/105502
2023-06-14 21:57:48 +02:00
Campbell Barton 8f109712ee License headers: use SPDX-FileCopyrightText for build_files/ & tools/ 2023-06-14 23:36:23 +10:00
Campbell Barton 49594c37ae License headers: use SPDX-FileCopyrightText for CMake files 2023-06-14 23:36:23 +10:00
Ray Molenkamp 8ba32c65a3 Merge remote-tracking branch 'origin/blender-v3.6-release' 2023-06-12 08:52:31 -06:00
Ray Molenkamp 7f9021a92f deps_builder: fix deadlock in idiff
idiff sometimes locks up while shutting down when the CPU is
oversubscribed. While blender does not rely on the idiff tool
the tests that run on the CI environment do, which causes tests
to occasionally fail due to a timeout.

The root cause is a bit complex but can be found on the oiio tracker
at https://github.com/OpenImageIO/oiio/issues/3851

This change fixes idiff by :

1- Shutting down the thread pool before the main function exits
2- Have the shutdown wait for the pool threads to actually join, to
prevent the OS from forcefully terminating them while they could
potentially still be holding a lock.
2023-06-12 08:51:51 -06:00
Ray Molenkamp b7b2e08dcb Revert "Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC"
This reverts commit 451751380c.

Seems like this broke linux/mac, likely needs to detect of libxvid
is there or not. For now revert until we sort this out.
2023-06-10 16:24:17 -06:00
Anthony 451751380c Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC
Currently, Windows some dependencies are built with MinGW/GCC 3.x
this commit removes that, in favor of building them with MSVC
via msys2. This will make it easier in the future to offer Win/Arm64
builds of blender.

Notable changes:

- This change drops support for the external libxvid library in favor
of ffmpegs built in support for this format. This has been done with
permission from the VFX module.

Pull Request: https://projects.blender.org/blender/blender/pulls/105502
2023-06-10 23:05:49 +02:00
Brecht Van Lommel eb7ae2fb82 Merge branch 'blender-v3.6-release' 2023-06-07 12:40:24 +02:00
Brecht Van Lommel 741a2fa043 Build: patch Boost for incompatibility with Xcode and libc++ 15
This is fixed in newer boost versions, but stick to the existing version now
for VFX platform compatibility. This change only affects macOS libraries,
since no other platform uses libc++.
2023-06-07 12:13:17 +02:00
Brecht Van Lommel e562a8891f Fix deps build cmake error on macOS and Linux 2023-06-06 18:42:11 +02:00
Ray Molenkamp 82d3bf01d4 Deps_builder: Fix USD debug build on windows
Two issues there

- it was picking up release mode libs for oiio/tbb
- TBB had both debug and release libs in a variable that should only
have a single library causing a cmake error.
2023-06-01 09:12:18 -06:00
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00
Campbell Barton 393d4a6e14 Cleanup: duplicate words in comments
Also use doxygen-comments in files where this is already the convention.
2023-05-26 12:40:06 +10:00
Sergey Sharybin 5142d8c831 Merge branch 'blender-v3.6-release' 2023-05-23 17:51:02 +02:00
Sergey Sharybin d1254519ad Fix make update for upstream workflow and missing branch in submodule
Fix the issue when upstream workflow is used and the addons fork does
not yet have the release branch. In this case create a local branch
which is based on the upstream/<branch> but does not track anything.

Typically with such workflow the local branches will track origin, but
since the origin does not have the branch yet it is not possible to
track it.

Test plan:
- Use upstream workflow
- Have a fork of addons, which does not have blender-v3.6-release
- Run make update

The error message:
```
Updating scripts/addons ...
git fetch origin
git fetch upstream
git checkout -t origin/blender-v3.6-release
fatal: 'origin/blender-v3.6-release' is not a commit and a branch 'blender-v3.6-release' cannot be created from it
make: *** [update] Error 128
```

Pull Request: https://projects.blender.org/blender/blender/pulls/108197
2023-05-23 17:49:43 +02:00
Bastien Montagne 552c262cee Merge branch 'blender-v3.6-release' 2023-05-19 23:00:34 +02:00
Bastien Montagne 575772d70d install_linux_packages: update library versions for 3.6 release.
Following #104895 specs for versions.
2023-05-19 22:47:53 +02:00
Ray Molenkamp 4368b0e296 Merge branch 'blender-v3.6-release' into main 2023-05-17 16:41:37 -06:00
Ray Molenkamp 96867a713b CMake/Windows: Blacklist MSVC 17.6.x
Code gen bugs can happen, ad usually they can be worked around
MSVC 17.6 is not one of those cases:

59% tests passed, 120 tests failed out of 296

There really is no other choice than to refuse to build with this
compiler. Alternates that CAN be used are both 17.5 and the current
17.7 preview builds.

Upstream tracking ticket kindly submitted by @deadpin :
https://developercommunity.visualstudio.com/t/vs176/10293729

If a compiler is released in the 17.6.x series that has the bug
fixed, we can contract the range of blacklisted compiler versions
to cover just the affected range, for now however all of 17.6 marked
bad
2023-05-17 16:40:51 -06:00
Thomas Dinges feaeb7e6ad Revert "Release cycle: 3.6 enters beta, Bcon3."
This reverts commit 2dd0a08aff.
2023-05-17 13:05:32 +02:00
Thomas Dinges 2dd0a08aff Release cycle: 3.6 enters beta, Bcon3.
Splash screen: Pet Projects, Blender Studio.
2023-05-17 13:02:49 +02:00
Campbell Barton 0099f51cdd Cleanup: sort file, uppercase booleans, add missing headers
Also update files to ignore for check_cmake.
2023-05-17 13:13:10 +10:00
Sahar A. Kashi b196109dac Cycles: enable HIP-RT for AMD hardware ray-tracing
Upgrade to the latest SDK, and enable in daily and release builds where it's
available as an option under Preferences > System.

There are some known limitations, see #104110 and release notes.

Pull Request: https://projects.blender.org/blender/blender/pulls/105538
2023-05-15 13:46:06 +02:00
Sebastian Parborg 84c5953882 Add the sm_89 arch to the default CUDA binaries
Without this, support for newer NVIDIA cards will not be compiled with pre-compiling the CUDA binaries.

Includes changes needed for the buildbot building pipeline.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107585
2023-05-12 16:30:23 +02:00
Xavier Hallade 3d53078dbe deps_builder: update Embree to 4.1.0
This allows to drop patches and workarounds, and reenable Hardware
Raytracing support for MNEE and Raytrace kernels for oneAPI device.

Pull Request: https://projects.blender.org/blender/blender/pulls/107853
2023-05-12 14:53:53 +02:00
Campbell Barton cddbd2dfb3 CMake: use a custom message when Python is not found
When Python is not found, inform developers how they can use a newer
version. Even though it's not officially supported - we typically keep
the latest stable version of Python working.
2023-05-12 17:00:12 +10:00
Ray Molenkamp 53bccfe34a CMake/Win: fftw adjust for filename changes in 3.6
Preparation for the the 3.6 library update landing.

The filenames for these libs will change a little bit and 3.6 will add
new library for the fp32 version of fftw.
2023-05-11 08:36:33 -06:00
Ray Molenkamp ab106607bd deps_builder: 3.6 library update
- OIIO 2.4.11.0
- OpenEXR 3.1.7 with additional fix for threadpool shutdown
- FreeType 2.13.0
- Fmt 9.1.0
- Python 3.10.11
- Flac 1.4.2
- FFMpeg 6.0
- OpenSSL 1.1.1t
- SQLite 3.40.1
- USD 23.05 with MaterialX Support and Render module

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107783
2023-05-10 16:20:16 +02:00
Brecht Van Lommel aefda7cb0b Fix Blender failing to start to due to missing sycl shared library
After recent Linux library updates. The EMBREE_SYCL_SUPPORT variable that
this relied on was not cached.

Always install the sycl shared libraries regardless of build options, as
we do for other shared libraries.
2023-05-09 18:36:32 +02:00
Brecht Van Lommel 521e79b869 Fix oslc error missing libtbb.so.2 after recent Linux libs update
A wrong ; separator in LD_LIBRARY_PATH broke the TBB path.
2023-05-09 17:20:17 +02:00
Brecht Van Lommel f6b492c43d Build: use versioned TBB library to avoid conflicts with Linux system libs
Other shared libraries already do this, but for TBB it was off by default.

The conflict would happen when LD_LIBRARY_PATH is set which overrides rpath,
either manually by the user or by the Steam launcher.

Ref #107385, #104895

Pull Request: https://projects.blender.org/blender/blender/pulls/107587
2023-05-08 12:47:32 +02:00
Campbell Barton 7f8495c44b CMake: add WITH_STRSIZE_DEBUG option, RNA support
Support string size debug so it can be used for regular development.

It works be writing values into strings, ensuring the buffer size
given is actually available. Developers can use this with memory
checking tools such as ASAN/valgrind to force an error when
the value used for the size of a buffer is larger than the buffer.

Resolve remaining issue with RNA using BLI_strncpy* in generated
callback functions where the size argument didn't represent the
size of the destination buffer.

This is automatically enabled along with ASAN for the
blender_developer.cmake configuration.

Ref PR !107602.
2023-05-07 13:52:49 +10:00
Sebastian Herholz 3298c61d1f Deps: Updating to Open PGL 0.5.0
Pull Request: https://projects.blender.org/blender/blender/pulls/107343
2023-04-29 12:58:08 +02:00
Sergey Sharybin 5e217fdec1 Deps: Bump version of sse2neon
This brings the following improvements:

- Implementation of _MM_SET_FLUSH_ZERO_MODE and _MM_SET_DENORMALS_ZERO_MODE
- Implementation of _mm_round_ss

Does not seem to be any performance impact with just this upgrade.

Pull Request: https://projects.blender.org/blender/blender/pulls/107396
2023-04-28 17:36:04 +02:00
Sahar A. Kashi 7026d9ac43 HIP: hipew and build system updates for new APIs, including HIP-RT
* Add HIP-RT API functions and library loading
* Add more HIP API types and functions
* Find HIP linker executable in CMake module
* New CMake module to find HIP-RT SDK

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Ref #105538
2023-04-25 20:19:43 +02:00
Brecht Van Lommel 19899a8dee Cleanup: remove removed variable from CMake config 2023-04-25 20:19:11 +02:00
Sebastian Parborg 32c7d41b76 Make missing libdecor only fail in strict build mode
libdecor is not a hard requirement, so only fail the configure phase if
the building in strict mode.

This makes it behave like most other dependencies in Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/107304
2023-04-24 16:21:33 +02:00
Campbell Barton b44dace9d8 Build: remove smatch, sparse & splint checking scripts
These checkers were all C-only making them increasingly less useful.
2023-04-21 23:32:55 +10:00
Sergey Sharybin 88b125e75d Fix regression tests failure on the latest Xcode
When using Xcode version 14.3 on Apple Silicon hardware a number of
regression tests fails. This change fixes this problem.

The root cause comes to the floating point contraction. It was already
disabled for GCC on Linux, but not for Clang on neither of Linux or
macOS.

Also corrected the comment about Clang default, as it as set to on
somewhere in 2021.

Pull Request: https://projects.blender.org/blender/blender/pulls/107136
2023-04-20 08:56:55 +02:00
Brecht Van Lommel d5757a0a10 Cycles: re-enable AMD GPU binaries on Windows
Using the new HIP SDK 5.5 that includes a fix for the compiler bug.

This also enables the light tree.

For Linux the binaries are still disabled. ROCm 5.5 is planned to
include the same fix but not released yet. When that happens we
should be able to enable Linux as well.

Ref #104786
Fix #104085

Pull Request: https://projects.blender.org/blender/blender/pulls/107098
2023-04-19 18:18:05 +02:00
Ray Molenkamp a7422f3cd7 deps_builder/windows: Cleanup dpcpp harvest
The dpcpp folder grew from 200M to 500M with the last update
due to lld being enabled and having 5 different copies in the bin
folder. We do not need to ship lld so it can be safely removed.

However previous harvest cleaned up the build folder before copying
the libs to their final destination in output, this will no longer
work, since we actually do need lld to build embree.

So copy to the full build folder to output first, then remove the
binaries we do not need. Embree will use the binaries in the build
folder so it will be unaffected by this.
2023-04-19 07:57:46 -06:00
Campbell Barton 88f5dd3c72 Cleanup: format 2023-04-19 08:02:42 +10:00
Xavier Hallade 887022257d Cycles: update DPCPP to 2022-12 release
We also backport a patch to program_manager to it as
61e51015a5
helps avoid unnecessary recompilation when enumerating available
kernels.
2023-04-18 22:09:41 +02:00
Xavier Hallade 5cdf0c9ee9 Cycles: update compute-runtime to 23.05.25593.18
This fixes oneAPI AoT compilation on Linux when using Embree on GPU.
2023-04-18 22:09:41 +02:00