Commit Graph

3705 Commits

Author SHA1 Message Date
Brecht Van Lommel 802ac5ba5a Build: Library updates for 4.1
Update libraries to match VFX platform 2024, and a few other upgrades to
latest versions.

boost 1.82.0
deflate 1.18 (new)
ffi 3.4.4
freeglut (deleted)
ispc 1.12.1
llvm 17.0.6
materialx 1.38.8
mesa 23.3.0
numpy 1.24.3
opencolorio 2.3.0
openexr 3.2.1
openimageio 2.5.6.0
opensubdiv 3.6.0
openvdb 11.0.0
osl 1.13.5.0 (now dynamic)
python 3.11.6
sqlite 3.42.0
sse2neon 0d6e9b3dd4
usd 23.11
vulkan 1.3.270
xm2 2.12.3

This only updates the build scripts, the precompiled libraries for each
platform will land over the coming weeks.

Ref #113157

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/116420
2023-12-21 19:16:11 +01:00
Brecht Van Lommel 7df6d9eb52 Build: update Windows ocloc to store binaries per generation
Same as #115750 for Linux, to gain space and compile time.

Pull Request: https://projects.blender.org/blender/blender/pulls/116159
2023-12-14 11:25:23 +01:00
Stefan Werner fd8bb41224 Cycles: Enable HIP devices for OpenImageDenoise
This enables the HIP backend of OpenImageDenoise on supported devices.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115854
2023-12-13 21:38:19 +01:00
Xavier Hallade 9d5164d472 Build: Linux: patch ocloc to store binaries per-generation
When storing multiple binaries in a fatbinary, ocloc stores Intel
Graphics binaries for specific devices and these don't get found when
the device doesn't match fully.

Blender compiles one binary per generation rather than per device, to
gain space and compile time.

We introduce a patch at ocloc level to work around this behavior that
otherwise leads to binaries not being found and recompilation being
attempted.

Pull Request: https://projects.blender.org/blender/blender/pulls/115750
2023-12-12 18:24:27 +01:00
Jeroen Bakker c11004579e GPU: Remove the Word OpenGL from Build Scripts
The build scripts are still referring to gpu tests as being opengl.
Although they can also use Metal or Vulkan. This PR only replaces
the work `opengl` with `gpu` for build options.

Special note is that the windows argument `with_opengl_tests` is
also replaced with `with_gpu_tests` for consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/116030
2023-12-12 16:02:29 +01:00
Brecht Van Lommel 6cdb43195e Refactor: replace NanoVDB kernel side implementation by own code
The NanoVDB headers are not compatible with Metal due to missing address
space qualifiers. We currently have a big patch for NanoVDB header
files, which is difficult to update for OpenVDB 11. Instead extract a
few hundred lines of code from NanoVDB to do just what we need.

Pull Request: https://projects.blender.org/blender/blender/pulls/115992
2023-12-10 19:37:36 +01:00
Campbell Barton 0e64c959be Fix "project_source_info" use with clang
Simple string replacement failed when one compiler was the exact
prefix of another (`clang` & `clang++` in this case),
resolve by performing string replacement on the list items.
2023-12-10 17:35:18 +11:00
Campbell Barton ecd307041e CMake: suppress warning in flag removing macros
Without quotes, empty flags would warn that string(..) was called
without enough arguments.
2023-12-08 13:13:38 +11:00
Ray Molenkamp 7e916474db CMake/MSVC: Remove stale OIIO sse flag
We disabled SSE for OIIO headers in the days we still supported
32 bit builds, as it was giving build errors there. OIIO handles
this internally now so we no longer need to explicitly disable it,
also we stopped shipping 32 bit quite a while ago
2023-12-07 09:02:52 -07:00
Ray Molenkamp 44ac2e8a8d CMake: Allow asserts to be enabled for release builds.
Asserts historically only have been on in debug builds, however
running the tests in a debug configuration takes a while especially
if Cycles is enabled.

This adds WITH_ASSERT_RELEASE to enable asserts in release
configurations. It is enabled for "make developer" , and will also
be used for CI.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115071
2023-12-06 23:49:42 +01:00
Campbell Barton 7aa3d967ba Build: update wayland protocols to 1.32
Adds cursor-shape-v1 which simplifies setting cursors.
2023-12-02 15:42:21 +11:00
Ray Molenkamp f644c936b6 shader_builder: Fix startup error on windows
needed shaderc_shared.dll to be available in the path
2023-11-27 08:35:37 -07:00
Iyad Ahmed 631f1ad133 Build: update rocky8 setup script to install the Jack audio library
Ref: !115256
2023-11-27 11:24:52 +11:00
Campbell Barton c7ead98d4e License headers: add SPDX copyright entries 2023-11-27 09:27:52 +11:00
Ray Molenkamp 23430f4db8 CMake: Disable vcpkg for msbuild based builds
vcpkg somewhat forcefully injects itself into the build system
causing some work stations to use the vcpkg headers/libs rather than
the headers from our lib folder,we added some mitigation against this
in 34b3a9583a but still the occasional
user with build issues showed up, this should nip that in the bud once
and for all.
2023-11-23 17:19:06 -07:00
Harley Acheson 6ae5e1ade8 Core: Allow Optional Use of Harfbuzz and FriBiDi
Harfbuzz and FriBiDi are included in our external libraries for all
platforms. This PR adds the glue to make them available as optional
build components (off by default).

Pull Request: https://projects.blender.org/blender/blender/pulls/114947
2023-11-23 23:35:03 +01:00
Bastien Montagne dfc00e8a18 `install_linux_packages`: Add libdeflate library.
Re. #113157
2023-11-22 15:32:39 +01:00
Bastien Montagne 90f83f71f2 `install_linux_packages`: update for 4.1 libraries, and some fixes.
Fixes:
  - Debian `libfreetype` package has been renamed from `libfreetype6` to
    `libfreetype`.
  - Increased MEX version of python-certifi to 2025, since most distros
    are shipping a '2023' version now.

Updates (following #113157):
  - NumPy: 1.24.3
  - Python: 3.11.6
  - Boost: 1.82.0
  - OpenColorIO: 2.3.0
  - OpenEXR & IMath: 3.2.1
  - OpenSubDiv: 3.6.0
  - OpenVDB: 11.0.0
  - MaterialX: 1.38.8
  - OpenImageDenoiser: 2.1.0
2023-11-22 15:24:40 +01:00
Brecht Van Lommel cb9b7eaa34 Build: fix macOS OpenImageDenoise 2.1 library not loading correctly
Version symlinks are not used on macOS due to notarization issues.
2023-11-16 19:21:30 +01:00
Brecht Van Lommel fa3c283780 Build: fix ffmpeg dependency build failing with new texinfo
There is an incompatibility in the latest texinfo that makes our current
ffmpeg version fail to build. Disable unnecessary ffmpeg docs building.
2023-11-15 17:40:05 +01:00
Brecht Van Lommel 25cfd64afa Build: remove outdated bf-committers email from bpy package
Mailing lists are no longer active.
2023-11-15 17:40:05 +01:00
Sebastian Parborg eaef914487 CMake: Allow building with system Vulkan and ShaderC
Previously the cmake code would try to run the LIBDIR specific "findX.cmake" files for both vulkan and shaderc.

However these would pick up system headers and libraries when LIBDIR were not present. This would lead to compilation errors as the system library configurations were not taken into account or queried.

This changes it so that if LIBDIR is not present, the proper pkgconfig files will be used instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/114639
2023-11-10 18:10:41 +01:00
Campbell Barton 4e6bca79cd Cleanup: quiet unused variable warnings in CMake
OpenMP_LIBRARIES was used when it wasn't defined.
2023-11-10 09:15:49 +11:00
Brecht Van Lommel ffd701ab58 Build: auto update CMake config for shared library OpenImageDenoise 2023-11-09 18:23:52 +01:00
Campbell Barton 5ebaf8af59 Build: correct package name & code-comment for WESTON in lib/ 2023-11-09 14:57:09 +11:00
Werner, Stefan b414187efb Build: Update OpenImageDenoise to 2.1.0
Major new feature in v2 is GPU support. This is not enabled yet,
this commit only changes the library version without enabling new
functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/112143
2023-11-08 10:12:05 +01:00
Campbell Barton 9550fba6df Merge branch 'blender-v4.0-release' 2023-11-07 23:25:58 +11:00
Campbell Barton 5c6c71e6e8 Build: prevent OpenSSL using /etc/ssl on macOS & Linux
Using /etc/ssl only makes sense when the versions of SSL on the system
is compatible with the version Blender uses.

Failure to load the configuration for e.g. causes SSL to fail entirely
(causing downloading over HTTPS to fail).

Recently [0] de facto standard directory `/etc/ssl` was used however we
can't guarantee files in this path are compatible with Blender's SSL.

Use a known invalid path to resolve #114452.

Ref !114569

[0]: 60a8ae7830
2023-11-07 23:21:16 +11:00
Campbell Barton b771ce8ce4 Build: disable some unnecessary tools & options for WESTON 2023-11-07 14:14:54 +11:00
Campbell Barton 865944734f Build: add the WESTON compositor for Linux
WESTON is used when WITH_UI_TESTS is enabled.

Note that the system WESTON installation can be used by setting
WESTON_BIN to a path on the users system.

Ref !114164.
2023-11-07 12:57:45 +11:00
Campbell Barton 944905c394 CMake: mark X11 & openpgl variables as advanced 2023-11-04 16:41:26 +11:00
Campbell Barton 637fd13957 CMake: mark FFTW3_LIBRARY_{F,D} as advanced, update doc-string
Missed from [0].

[0]: 1015bed2fd
2023-11-04 16:41:24 +11:00
Campbell Barton 1a82019ba2 CMake: mark internal SSL deps variable as internal
_PYTHON_SSL_CERT_FILE_DEPS was showing up in CMake's options
when it's intended only as internal cache to track changes.
2023-11-04 16:41:22 +11:00
Campbell Barton 5d3f735fea CMake: remove "_" prefixed "LEVEL_ZERO_" variables
These look as if they were meant to be internal but they showed up in
configuration were the only way to configure level zero libraries.
2023-11-04 16:41:20 +11:00
Campbell Barton efef0bac5f CMake: remove redundant white-space as part of multi-line strings 2023-11-04 16:41:19 +11:00
Campbell Barton 2b508f7ae3 Cleanup: cmake indentation 2023-11-04 16:41:18 +11:00
Xavier Hallade 1161455084 Build: upgrade Intel Graphics Compiler on Linux
In order to speedup compilation, we upgrade IGC to 1.0.14828.26 along
with ocloc and the associated dependencies.
We also bump min-driver version accordingly to 26918.

Ref !114341
2023-11-02 22:27:38 +11:00
Campbell Barton 67b078aa6f Merge branch 'blender-v4.0-release' 2023-10-31 10:45:28 +11:00
Campbell Barton b27ff093ca Build: resolve error configuring FFMPEG on Linux
Configure failed to find vorbis & vorbisenc on Linux with the errors:

ERROR: vorbis not found using pkg-config
ERROR: vorbisenc not found using pkg-config

the issue was caused by configures test program failing to link the test
code against the static library because functions in libm weren't found.

Resolve by adding `$libm_extralibs` to libvorbis.

Note that it's strange this issue didn't come up before,
since it occurs on a clean build it seems necessary.
2023-10-31 10:38:49 +11:00
Brecht Van Lommel 39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Campbell Barton 14e92decd0 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:24 +11:00
Campbell Barton 60a8ae7830 Build: use /etc/ssl for OPENSSLDIR on Linux & macOS
Define the OPENSSLDIR so the local build paths from the build systems
aren't being searched on users systems.
2023-10-25 11:05:34 +11:00
Brecht Van Lommel 68e06704a6 Merge branch 'blender-v4.0-release' into main 2023-10-23 19:09:12 +02:00
Brecht Van Lommel 3a483004c8 Fix SSL cert file path not working on second cmake configure
Always create the non-cached relatve from the cached absolute path.

Ref #102300
2023-10-23 19:06:47 +02:00
Campbell Barton 6b0769c448 Merge branch 'blender-v4.0-release' 2023-10-17 20:01:00 +11:00
Campbell Barton e21dfb4c42 Correct comment in 5ac392ca40 2023-10-17 19:59:58 +11:00
Campbell Barton 5ac392ca40 Fix #102300: SSL/HTTPS Request Unable to Get Local Issuer Certificate
Resolve an error with SSL using a hard coded path to certificates on
Linux causing HTTPS access to fail.
request.urlopen(..) couldn't access any HTTPS URL's.
2023-10-17 19:58:34 +11:00
Brecht Van Lommel 4fe903bef7 Merge branch 'blender-v4.0-release' into main 2023-10-16 20:10:09 +02:00
Brecht Van Lommel 0c958129a3 Fix deps build issues with Ogg/Vorbis on new Xcode, switch to CMake
These were already building with CMake on Windows, do the same for
Linux on macOS.
2023-10-16 20:09:41 +02:00
Brecht Van Lommel 4a376326c9 Fix OpenImageIO wrong dependency builder hash after repository moved
And update to new URL.
2023-10-16 20:09:41 +02:00
Xavier Hallade ef80392721 Cycles: oneAPI: update windows ocloc to 101.4723
The first public Windows driver version with a higher number is
101.4824, so we bump the min-required driver version on Windows to this
one to ensure compatibility.
2023-10-11 14:47:48 +02:00
Campbell Barton b0a6c6c1de Merge branch 'blender-v4.0-release' 2023-10-11 10:44:23 +11:00
Campbell Barton 58442a420e Cleanup: comment for release configuration, quote-style & remove parens 2023-10-11 10:41:16 +11:00
Brecht Van Lommel 03b2523df8 Merge branch 'blender-v4.0-release' into main 2023-10-09 16:14:39 +02:00
Brecht Van Lommel c3c631ebcf Build: make Linux cmake release config consistent with buildbot
Enable dynamic sound library loading so that "make release" produces
binaries that are as portable as buildbot builds.

Remove unnecessary linker flags that are already set by default, and
don't specifiy explicit lib directoy since it is also found by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/113360
2023-10-09 14:41:34 +02:00
Campbell Barton 0c91466785 GHOST/Wayland: remove WITH_GHOST_WAYLAND_DBUS
This was only used for accessing cursor themes which only worked
with gnome and wasn't used in official releases.
Use the default theme or the theme defined by XCURSOR_THEME.

Eventually wp_cursor_shape_manager_v1 can be supported which avoids
having to access the theme.
2023-10-07 21:31:15 +11:00
Campbell Barton f482e5979d CMake: set_and_warn_incompatible now warns if arguments are undefined
Previously this caused an error which can happen on other platforms that
don't define the features being checked.
2023-10-07 21:22:13 +11:00
Campbell Barton 1dafc2786f CMake: fix building on macOS 2023-10-07 20:21:52 +11:00
Campbell Barton 149d80946e Cleanup: CMake formatting 2023-10-07 19:46:38 +11:00
Campbell Barton 833eddafa3 CMake: add set_and_warn_incompatible macro, use for HEADLESS & GHOST_SDL
When WITH_GHOST_SDL or WITH_HEADLESS were used, the message didn't make
much sense, especially since the features warned about weren't
necessarily enabled or even supported by the platform.

Replace with a `set_and_warn_incompatible` macro which only reports
configuration changes based on incompatible features.
2023-10-07 19:11:51 +11:00
Campbell Barton b434d40dbf CMake: quiet noisy messages on every run
Printing that a library is found every time CMake runs isn't helpful.
Restrict these messages for the first execution so messages are limited
to information developers may need to know such as features being
disabled because of incompatible configurations.
2023-10-07 18:20:30 +11:00
Jeroen Bakker 1aca58cf16 Vulkan: Enable as Experimental Option
This PR enables vulkan backend as experimental option.
It will only be available in alpha builds on Linux and Windows.

This option is highly experimental and enabled to get some insight
on supported platforms. Don't expect a fully working Blender
yet. Also don't expect it to have usable performance.

**What is known to not work?**

* OCIO textures are not supported on Intel and AMD GPUs. sRGB/Standard is supported
  on those platforms.
* AMD Polaris based GPUs on Linux will generate a crash when drawing the 3d cursor as it
  doesn't support the needed vertex format. Comment out `DRW_draw_cursor` in `DRW_draw_region_info`.
* The colors in the node editor and sequencer are of as sRGB viewports aren't detected correctly.
* The image / UV editor isn't working as many texture formats haven't been tested yet. Some
  tweaks are also needed to do correct depth testing.
* 3D Viewport is known to be flickering. Sometimes workbench doesn't display anything.
* 3D Viewport wireframe will crash as it uses a framebuffer with gaps between color attachments,
  which isn't supported yet. (#113141)
* Rotate the view widget is partially drawn due to incompatible depth clipping.
* GPU Selection isn't working. It is expected to be solved when Overlay-Next will become the
  default engine. For now disable GPU depth picking in the preferences.
* Cycles/EEVEE are known to not work with Vulkan yet. Cycles requires Vulkan Pixel Buffer.
   Cuda <-> Vulkan interop might require a different approach than OpenGL as Vulkan doesn't allow
  importing memory from a Cuda context. EEVEE uses features that aren't available yet in the backend
* Workbench is working, except Workbench shadows.
* EEVEE-Next basics are working. Shadows, lights are known to be not working. Materials/Shading
  works in simple scenes. Changes are expected in EEVEE-Next that will break Vulkan compatibility
  in the near future.
* Systems with multiple GPUs is not expected to work.
* Wayland support is in development and requires some iterations. You can start Blender, but
  the protocols are not aligned yet.
* OpenXR hasn't been modified and is expected to fail.
* The backend is very strict when mis-using the GPU module. In debug builds it may crash
  on asserts.
* Older drivers/GPUs might not have all the features that we require. The workarounds
  for the missing features still need to be implemented.

**A word about performance**

In the project planning we focus first on stability and platform support. The performance of Vulkan is
around 20% of what we want to achieve. The reason is that each command sent to the
GPU is done one at a time. The implementation even waits until we have feedback that the GPU
is idle again.

Geometry is currently stored in System RAM. The GPU will read and cache the data when
accessing geometry. This slows down when using objects with much geometry.
Some performance features like MDI (Multi-Draw-Indirect) hasn't been implemented and
falls back to Single Draw Indirect.

**Why enable it is an experimental option?**

* Ensures that new features are being tested with Vulkan
* Ensure that building with Vulkan is possible on supported platforms
* Get feedback from developers if Vulkan can run on their system or that
  there are special cases that we are not aware of. Main development
  environment has been Linux/X11 with occasionally testing using Windows.
* Validate Add-ons that use the `gpu` module.
* Possible to enable GLSL validation on the buildbot. (Needs more work).
* Does it compile on all machines or does it require more changes to cmake
  config. We expect it to be able to compile without installing the Vulkan SDK.
  The Vulkan SDK is a very powerful tool, but only when actually doing GPU
  development. Otherwise it is an overhead which slows down other
  activities.

**How can the backend be enabled?**

Currently the Vulkan backend can be enabled per Blender session by starting
using the command line argument `--gpu-backend vulkan`. In the future, when
the backend is more mature, we will add a user preference to switch between
OpenGL and Vulkan.

Pull Request: https://projects.blender.org/blender/blender/pulls/113057
2023-10-06 15:24:21 +02:00
Campbell Barton c5d01df691 Merge branch 'blender-v4.0-release' 2023-10-06 21:48:34 +11:00
Campbell Barton 8974ca8f24 Tools: set the number of jobs to the CPU count for various utilities
Previously this was the double the CPU count because:

- Modern CPU's from AMD & Intel support SMT/hyper-threading which
  present twice as many cores, doubling again has little to no benefit.
- Using 2x or 4x the number of physical cores number can use a lot of
  memory on systems with many cores which are becoming more common.
2023-10-06 21:47:03 +11:00
Campbell Barton 273af6855a CMake: cache the HAVE_BROTLI result
Avoid detecting HAVE_BROTLI every time CMake runs,
only re-detect if the freetype includes change.
2023-10-06 17:58:26 +11:00
Campbell Barton a03b1e5df5 Merge branch 'blender-v4.0-release' 2023-10-05 10:51:48 +11:00
Campbell Barton 2f71d9f807 Build: quiet GCC warning for extern/fmtlib 2023-10-05 10:50:58 +11:00
Ray Molenkamp 384d9c9a07 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-09-27 18:03:38 -06:00
Ray Molenkamp 751c9ef620 CMake/MSVC: Fix build error for RelWithDebInfo configuration
CMake decided to link the Debug libs for MaterialX because no specific
RelWithDebInfo configuration was provided, strange default imho but
not difficult to fix.
2023-09-27 18:03:16 -06:00
Hans Goudey afaa30b1eb Merge branch 'blender-v4.0-release' 2023-09-27 18:22:16 -04:00
Hans Goudey 1badb464b0 Fix: Compile error from unused module requested in CMake
The `clangSupport` module isn't provided in the precompiled
libraries anymore, and Blender compiles without it.

Pull Request: https://projects.blender.org/blender/blender/pulls/112981
2023-09-27 23:58:03 +02:00
Thomas Dinges ab26ddc455 Revert "Release cycle: Bcon3 for Blender 4.0"
This reverts commit 8c25952886.
2023-09-27 12:53:52 +02:00
Thomas Dinges 8c25952886 Release cycle: Bcon3 for Blender 4.0 2023-09-27 12:52:04 +02:00
Brecht Van Lommel 2ed8df333b Fix Hydra not being disabled when USD library not found on Linux 2023-09-26 18:53:05 +02:00
Ray Molenkamp 974bb38c51 CMake: Update platform_win32.cmake with webp 1.3 support
WebP 1.3 changed the library filenames to include a lib prefix and
added an additional library.
2023-09-22 08:59:03 -06:00
Ray Molenkamp 3735a4d104 deps_builder: Fix missing Webp support in OIIO build on windows
webp 1.3 changed the filenames on windows to include a `lib` prefix
(ie libwebp.lib rather than webp.lib) now this is a common thing
on linux and cmake has a `CMAKE_FIND_LIBRARY_PREFIXES` variable that
has a list of prefixes to look for during a `find_library` call.

`CMAKE_FIND_LIBRARY_PREFIXES` gets set during the call to the
`project` method in the main CMakeLists of a project. Now for windows
`lib` is *not* a common prefix by CMake, and it doesn't add "lib" to
CMAKE_FIND_LIBRARY_PREFIXES during that call.

so find library doesn't look for it, the libs are not found and an
unhappy time is had by all. Now the most obvious solution would be to
pass `-DCMAKE_FIND_LIBRARY_PREFIXES=lib` to CMake to sidestep this
however, the `project` call will set the variable overwriting
anything you passed through the CLI.

So the fix here is to have `find_library` counter-intuitively look
for both `libwebp` and `webp`
2023-09-22 08:47:23 -06:00
Ray Molenkamp af9523d7c2 deps_builder: OIIO validate deps at configure time
The last webp update changed the filenames of the webp libraries
on windows causing oiio not to find them and oiio silently build
without webp support, which only came to light after all of
blender was build and a test failed.

This change makes the OIIO validate and error out if certain
dependencies are not found at configure time so these mistakes
are caught early.
2023-09-22 08:32:26 -06:00
Brecht Van Lommel 3d15a07bde Revert "install_linux_packages: Raise LLVM default version to 15.0.7."
This reverts commit 607adbca47.

The LLVM upgrade is being postponed to 4.1.

Ref #109244
2023-09-21 18:46:30 +02:00
Brecht Van Lommel f0840cee2a Build: update 4.0 libraries to address CVEs and bugs
And ignore a few CVEs that do not affect Blender.

openimageio 2.4.15
openssl 3.1.2
python 3.10.13
sndfile 1.2.2
webp 1.3.2

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/112529
2023-09-21 17:02:46 +02:00
Brecht Van Lommel d387ef224f macOS: upgrade to Xcode 15
For Blender 4.0 only, 3.3 and 3.6 keep using the older Xcode version.

The new linker in Xcode 15 gives many warnings due to duplicated
libraries, generated by CMake to resolve circular dependencies. For now
use the old linker to silence these warnings.

Remove legacy flags for libc++, this is the default for a long time and
generates warnings with the new linker.

Reason for upgrade is to take advantage of MetalRT curve support.

Pull Request: https://projects.blender.org/blender/blender/pulls/110243
2023-09-20 16:25:14 +02:00
Ray Molenkamp bf9b699089 Fix: make.bat showhash
This broke when we moved the submodules around and no one ever noticed

This will now list:
-The current branch
-The current branch hash
-Addons branch
-Addons branch hash
-Libs url
-Libs revision
-Libs last-changed-date

So it'll be a little easier to diagnose what exactly the state of
things are when someone asks for help building.
2023-09-16 10:32:30 -06:00
Ray Molenkamp cf973a2d16 deps_builder: Fix zlib URI
zlib's uri is a bit unstable as when they release a new version they
move the last release "elsewhere"

This change switches the upstream URI over to github, which should be
a bit more reliable.
2023-09-12 10:23:03 -06:00
bsavery 281fbf72f0 Cycles: support building with Windows ROCm 5.5 SDK
The official SDK was released, add correct paths for that version. The
old paths can be removed once the buildbot uses this SDK.

The SDK installer sets a HIP_PATH environment variable. This is used to
automatically detect the location when HIP_ROOT_DIR is not manually
specified.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/110519
2023-09-07 17:22:18 +02:00
Brecht Van Lommel 526f935981 Fix broken OPTIX_ROOT_DIR environment variable for setting up build
Changes in 42713bf made it ignore the environment variable if there is a
defined but empty CMake variable. Also make similar changes for other
GPU compute APIs, to guard against future problems like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111928
2023-09-04 17:28:00 +02:00
Brecht Van Lommel 19da2fba83 Fix macOS Arm build of OSL library dependency
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
2023-09-04 15:08:02 +02:00
Xavier Hallade 400f7c22bc Cycles: update ocloc to 101.4369 on Windows
As discussed on #108314, oidn 2.0 needs an updated version of ocloc.
No need to bump the min required driver version as it's already
high enough on Windows (101.4644).

Pull Request: https://projects.blender.org/blender/blender/pulls/111729
2023-09-01 15:21:54 +02:00
Marcos Perez 1015bed2fd VSE: Sound equalizer modifier
The sound equalizer is using the Audaspace FFT Convolver.
The blender part creates an array of descriptions of power per "band"
and orders the creation of Equalizer (ISound) in the Audaspace.

Modifier can be created on sound strips. It lets you define
amplification or attenuation over frequency range from 30Hz to 20 kHz.
The power is limited to -30 db - 30 db. This is done using curve
mapping widget.

Co-authored-by: menda <alguien@aqui.es>
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/105613
2023-08-30 22:36:36 +02:00
Brecht Van Lommel 62c898f2e0 Fix (DY)LD_LIBRARY_PATH ignored for oslc and shader builder in build
Accidentally used CMake instead of environment variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/111234
2023-08-30 17:00:02 +02:00
Campbell Barton 46edf61180 CMake: adjust the error message when a non-default version wasn't found
The error message was written assuming the default version was set,
making the error confusing.
Adjust the error message when the non-default version is missing.
2023-08-30 15:20:50 +10:00
Campbell Barton 3de8900ed6 Cleanup: spelling in comments 2023-08-25 09:40:42 +10:00
Bastien Montagne 607adbca47 install_linux_packages: Raise LLVM default version to 15.0.7.
Following specs from #109244 for Blender 4.0.
2023-08-24 22:55:56 +02:00
Campbell Barton b8054b0cb2 Cleanup: white-space for UNIX platform error messages 2023-08-24 10:37:52 +10:00
Campbell Barton 20b4a77872 datatoc: exclude the initial C-style comment from GLSL/MSL/Cuda files
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros:
data_to_c_simple & data_to_c.

Strip leading C-style comments that don't bloat binary size.
Comments are replaced with blank lines so line numbers in error messages
match. Reduces Blender's binary size by ~70kb.
2023-08-19 17:57:12 +10:00
Ray Molenkamp e7c94b35b8 Fix: Missing PDB on windows
Missed one cmake check in 0df3aedfa8
2023-08-19 00:09:19 -06:00
Ray Molenkamp e2af12d368 Cleanup: Update copyright to the new format
Had put my name here since the choice was between the foundation
and me personally, with the blender authors file now being in
place this can be cleaned up.
2023-08-18 11:58:37 -06:00
Ray Molenkamp d5e50460e7 CMake/MSVC: Use /debug:fastlink for debug builds
This changes the default linker options for debug builds to use
fastlinking, this causes the PDB only to be usable on the machine
it is being created on, however since debug builds cannot be
distributed to end users (wont run due to missing debug CRT on
their system) this isn't a problem.

This halves the time required for an incremental link on my system
from 7->3.5 seconds
2023-08-18 10:47:47 -06:00
Campbell Barton accc80c73b CMake: blender_lite no longer caches values for other platforms 2023-08-18 15:28:01 +10:00
Campbell Barton ab18bd6f84 CMake: revert use of cmake_language as it's unavailable in v3.10
Using cmake_language caused an error with 3.10, so revert [0] & [1].

[0]: 206f126617
[1]: e95e6ad66a
2023-08-17 23:00:31 +10:00
Campbell Barton 0a04a6d1a1 Cleanup: quiet GCC's -Wsuggest-attribute=format warning 2023-08-17 16:52:45 +10:00
Campbell Barton 8d26dda40c Fix #111186: Crash backtrace missing on Linux
Regression in [0] which caused `execinfo.h` not to be detected by CMake.

Setting a default variable for other platforms prevented the new
variable from being set.

[0]: f197b1a1f1
2023-08-17 13:45:11 +10:00
Campbell Barton 5478798526 Cleanup: use lowercase cmake commands
The `Find*.cmake` modules originally used uppercase commands to match
CMake's own conventions. Since then CMake uses lower-case and even
within our own find modules, using all uppercase wasn't done
consistently. Opt for lowercase everywhere.
2023-08-17 13:15:56 +10:00
Campbell Barton cfc9473c3f CMake: always define BROTLI_LIBRARIES
Previously FREETYPE_LIBRARIES would sometimes contain
BROTLI libraries, since some configurations set them separately,
declare them separately under all configurations to avoid
changes to one platform breaking others.

Also quiets uninitialized variable warning.
2023-08-17 11:53:58 +10:00
Campbell Barton c713c70781 CMake: quiet uninitialized warnings 2023-08-17 11:53:56 +10:00
Campbell Barton 120fdf1f4b CMake: remove unknown variable _LEVEL_ZERO_INCLUDE_PARENT_DIR 2023-08-17 11:53:53 +10:00
Campbell Barton 72bdcb4e25 CMake: use more conventional checks that libraries were found
The method of checking the library was found cause an undefined
variable warning when it was found.
2023-08-17 11:53:52 +10:00
Campbell Barton 130af96e6b CMake: quiet case sensitivity warning for Boost_DIR
Quiets warning from CMake policy: CMP0144
2023-08-17 11:53:50 +10:00
Brecht Van Lommel 59fb9341cf Build: keep SDL haptics disabled on macOS x86_64
Not yet available for the current minimum of macOS 10.15.
2023-08-16 19:11:41 +02:00
Brecht Van Lommel 51fd4af648 Build: fix OpenVDB Metal patch not applying cleanly 2023-08-16 18:43:23 +02:00
Brecht Van Lommel 1594f7fb95 Build: update SDL to 2.28.2
Older versions don't build with Xcode 14.3.

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110975
2023-08-16 14:39:11 +02:00
Campbell Barton 92c4756d02 Fix replacement of "Blender Foundation" in recent header change
The recent change to header copyrights [0] unintentionally changed
"Blender Foundation" to "Blender Authors" for the WIN32 file path
which blender is installed into.

Revert lines changed that aren't related to copyright text.

[0]: e955c94ed3
2023-08-16 21:21:55 +10:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Ray Molenkamp deb4aa88b0 CMake/CPack: Fix windows distribution
the revert in 282944caac was incomplete
this commit restores the missing bits needed to make blender run
again.
2023-08-13 22:21:12 -06:00
Campbell Barton 282944caac CMake: revert use of CMAKE_INSTALL_PREFIX as it broke CPack on WIN32
Absolute paths aren't supported when using CPack on WIN32.
This effectively reverts [0] & [1].

[0]: 7209ed80bb
[1]: d605cc7574
2023-08-13 21:34:03 +10:00
Campbell Barton d605cc7574 CMake: use CMAKE_INSTALL_PREFIX in more places
Also remove quotes for consistency as they aren't needed and weren't
used in quite a few places.
2023-08-13 14:27:47 +10:00
Campbell Barton 206f126617 Fix regression in remove_cc_flag macro
Recent change in [0] caused the CFLAGS variables not to be manipulated
by remove_cc_flag. Unfortunately EVAL is needed to set a variable
that references a variable name.

[0]: e95e6ad66a
2023-08-12 16:29:46 +10:00
Brecht Van Lommel 11bca76f96 Cycles: update OSL to work with version 1.13.2
While keeping compatibility with older versions.

Ref #110708

Pull Request: https://projects.blender.org/blender/blender/pulls/110980
2023-08-10 20:01:09 +02:00
Ray Molenkamp 4ad63687cb CMake: fix windows build and warning
Missing underscore in platform/platform_win32.cmake
and a quote too many in macros.cmake
2023-08-09 21:47:19 -06:00
Campbell Barton 735273f537 CMake: show WITH_HYDRA on first installation
Also disable OSL for lite builds, only makes a difference when cycles is
enabled for lite builds.
2023-08-10 12:37:54 +10:00
Campbell Barton 5e44b3c147 Fix error in recent refactor to add_check_c{xx}_compiler_flag functions
The variable needs to be set in the parents scope.
2023-08-10 12:17:49 +10:00
Campbell Barton b057c0cce1 Fix building WITH_PYTHON=OFF after discover_nodes.py inclusion
Recently [0] added PYTHON_EXECUTABLE as a build time dependency.
Define PYTHON_EXECUTABLE even with WITH_PYTHON=OFF.

[0]: 19912457c6
2023-08-10 11:57:30 +10:00
Campbell Barton 8cea7519ca Cleanup: wrap long lines in CMake 2023-08-10 11:28:25 +10:00
Campbell Barton e95e6ad66a CMake: replace duplicate lines with a for loop 2023-08-10 11:28:23 +10:00
Campbell Barton 9dfb3fc550 CMake: refactor flag checking function to take multiple argument pairs
Many calls to add_check_c_compiler_flag add_check_cxx_compiler_flag
resulted in over long lines & visual noise. Replace with a function that
takes multiple (cache_var flag) pairs to reduce duplication.
2023-08-10 11:28:22 +10:00
Brecht Van Lommel 2afdc15709 Build: patch OSL to avoid duplicate symbols in static libraries
This was revealed by CMake refactoring in #110394, with the solution
identified by Ray Molenkamp.

Upstream: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1709

Pull Request: https://projects.blender.org/blender/blender/pulls/110974
2023-08-09 19:53:11 +02:00
Campbell Barton d542ecff53 CMake: disable WITH_HYDRA in lite builds 2023-08-09 11:45:24 +10:00
Jot 0a80543f1e Build: Remove confirmations from linux_rocky8_setup.sh
There were "-y" flags missing in the dnf install commands. Running this
from another script would fail because it was asking for confirmation.

Pull Request: https://projects.blender.org/blender/blender/pulls/110502
2023-08-07 17:45:20 +02:00
Brecht Van Lommel 3c5dddf09c Build: patch USD to work with OpenGL core profile
Upstream:
https://github.com/PixarAnimationStudios/OpenUSD/pull/2550

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110474
2023-08-07 16:28:26 +02:00
Hans Goudey ffe4fbe832 Cleanup: Move editors headers to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/110820
2023-08-05 02:57:52 +02:00
Bogdan Nagirniak 04bb5f9995 Render: support USD Hydra render delegates
Hydra is a rendering architecture part of USD, designed to abstract the
host application from the renderer. A renderer implementing a Hydra
render delegate can run in any host application supporting Hydra, which
now includes Blender.

For external renderers this means less code to be written, and improved
performance due to a using a C++ API instead of a Python API.

Add-ons need to subclass bpy.types.HydraRenderEngine. See the example in
the Python API docs for details.

An add-on for Hydra Storm will be included as well. This is USD's
rasterizing renderer, used in other applications like usdview. For users
it can provide a preview of USD file export, and for developers it
serves a reference.

There are still limitations and missing features, especially around
materials. The remaining to do items are tracked in #110765.

This feature was contributed by AMD.

Ref #110765

Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com>
Co-authored-by: Vasyl-Pidhirskyi <vpidhirskyi@gmail.com>
Co-authored-by: Brian Savery <brian.savery@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/104712
2023-08-04 17:01:09 +02:00
Bogdan Nagirniak 61f407d427 Build: install USD Storm and MaterialX libraries by default
* Bundle hdStorm and associated plugins
* Enable WITH_MATERIALX by default to bundle MaterialX libraries
* Set PXR_MTLX_STDLIB_SEARCH_PATHS so Storm can find MaterialX files

Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Ref #110765, #104712
2023-08-04 17:01:09 +02:00
Campbell Barton 7cc3ef3260 Cleanup: use C++ includes, various non-functional changes for C++ 2023-08-02 20:30:02 +10:00
Ray Molenkamp 1a860d123d MSVC: enable Two-phase name lookup
Previously disabled due to OpenMP issues but those have been resolved
on the compilers that are currently our lower bar. (vs2019)

Pull Request: https://projects.blender.org/blender/blender/pulls/110660
2023-08-01 20:44:24 +02:00
Brecht Van Lommel 55413e0fc6 Fix #110615: missing GL dev packages in install_linux_packages.py
The build fails without these.

Pull Request: https://projects.blender.org/blender/blender/pulls/110609
2023-08-01 15:20:32 +02:00
Campbell Barton ed01e16aa6 Cleanup: quiet uninitialized warnings 2023-07-29 13:47:57 +10:00
Campbell Barton 42713bf0f8 Cleanup: quiet uninitialized warnings for finder root directories 2023-07-29 13:47:55 +10:00
Ray Molenkamp 6228338d74 deps_builder: fix zlib homepage
was accidentally committed as a comment
2023-07-28 13:17:04 -06:00
Campbell Barton 6f85a1ae9f Tools: fixes/improvements for 'check_struct_comments' check
- Fix using forward declarations when extracting struct information as
  it causing this check to be ignored.
- Fix extracting comments which sometimes included code fragments.
- Fix extracting the outer comment for struct declarations on a single
  line.
- Skip source files in the build directory.
2023-07-26 15:23:21 +10:00
Campbell Barton b1daf6bfad Tools: add --jobs arguments to clang checker and code-clean tool
Setting jobs to one is useful for debugging, reducing the number
of threads can be useful for code_clean as a background task.
2023-07-21 00:13:13 +10:00
Ray molenkamp dd46519e13 deps_builder: output html report for release manager
request from Thomas, to update the licensing document he needs
a list of all dependencies their versions and their homepage.

for all deps hosted on github the script will do its best to
figure out the landing page, for all others DEPNAME_HOMEPAGE
will have to be set in versions.cmake

To ensure this information is always supplied, the script will
error out with a fatal error informing whoever is working on
the builder to supply this information.

Pull Request: https://projects.blender.org/blender/blender/pulls/109013
2023-07-20 16:09:27 +02:00
Xavier Hallade ece704af45 Fix #109771: deps_builder: crash in Embree HW BVH building
When an offline render was done side by side render preview, further
render preview updates requiring BVH to be rebuilt would trigger a
crash.
This will be fixed upstream the same way in Embree 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/109966
2023-07-19 19:39:54 +02:00
Campbell Barton 2c9aa2c8e5 code checker: add 'make check_struct_comments'
This utility uses Python's clang module to validate comments intended
to match the struct member names. `cmake_static_check_clang.py` has
been written to support adding other checkers in the future.
2023-07-18 14:34:59 +10:00
Campbell Barton 4da96623ff CMake: use mark_as_advancd for most non WITH_* options
Avoid showing many obscure CMake options by default.
2023-07-10 12:02:15 +10:00
Ray Molenkamp 4fa30a317d CMake: Fix list_assert_duplicates
`list_assert_duplicates` validates a list that should contain no
duplicates, contains no duplicates, with scope keywords now being
allowed in `INC` sections, there is the situation where multiple
include paths can have the same scope set on them causing
`list_assert_duplicates` to error out.

To remedy this we remove the scope keywords from the list first,
before running the test.
2023-07-07 11:00:29 -06:00
Campbell Barton 093a948322 Cleanup: remove_cc_flag use in CMake
- Pass multiple arguments at once.
- Move comments above each argument.
- Quote the arguments (for consistency).
2023-07-05 13:27:21 +10:00
Ray Molenkamp 7ad6b7cba4 Cmake: Fix WITH_GPU_BUILDTIME_SHADER_BUILDER on Windows 2023-06-30 18:32:03 +02:00
Ray Molenkamp 4fe7626c49 deps_builder: Update USD repo and hash
USD has recently renamed their repository from USD to OpenUSD leading
to a change in the URI for this dep and the hash for the previously
released USD 23.05 since the tarball now will have the source in the
OpenUSD-23.05 folder.
2023-06-29 07:49:34 -06:00
Campbell Barton d42bc6d433 CPPCheck: excluding text formatting files is no longer needed
Since the large else-if chain was refactored into an array lookup,
these files are no longer a problem.
2023-06-29 10:55:11 +10:00
Ray molenkamp eff9e2f4ce CMake: plumbing for modern CMake usage
This is the minimal change required to start using modern CMake in the
blender build system. This change is designed to allow small
incremental changes to the build system rather than doing it in one
big bang which would be unmaintainable (for me)

The biggest functional change is, previously all libraries in the
`LIB` section of a `blender_add_lib` call had the `INTERFACE` scope,
which is rarely, if ever the correct scope. This diff changes this to
`PRIVATE`

Concrete implications of this diff :

The `LIB`, `INC` and `INC_SYS` sections of an `blender_add_lib` call
now allow scoping keywords (`PUBLIC`, `PRIVATE,` `INTERFACE`) to
declare the scope of the dependency.

Right now the only library using any modern cmake is
`bf_intern_atomic` which is an header only interface library that will
just advertise its include directories.

This allows us to clean up any `CMakeLists.txt` that adds
`../../../intern/atomic` to its `INC` section to remove it in `INC` by
adding a `PRIVATE bf_intern_atomic` to the `LIB` section.

Pull Request: https://projects.blender.org/blender/blender/pulls/107858
2023-06-27 20:57:50 +02:00
Ray Molenkamp db8569a3ca Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-21 15:07:17 -06:00
Ray Molenkamp ae35861a64 deps_builder: Fix USD debug build on windows
Backport, was already fixed in 4.0, should have been fixed
in 3.6 instead.
2023-06-21 15:04:07 -06:00
Ray Molenkamp 5e44da1859 deps_builder: python 3.10.12 + openssl 3.0.9 for windows fixes
Small fixes to make it build on windows.
2023-06-21 15:02:45 -06:00
Bastien Montagne 5cfb9d771f Merge branch 'blender-v3.6-release' 2023-06-21 19:54:29 +02:00
Bastien Montagne 206306405d install_linux_packages: Update python version to 3.10.12.
Re. #104895.
2023-06-21 19:50:30 +02:00
Bastien Montagne c41841da3b install_linux_packages: Add fallback to identify known distro.
Python versions before 3.10 did not have the
`platform.freedesktop_os_release` utils, use the trick based on looking
for distro-specific version files instead as fall-back (same as what was
done in the previous `install_deps.sh` bash script).
2023-06-21 19:50:30 +02:00
Brecht Van Lommel f4e6981513 Merge branch 'blender-v3.6-release' into main 2023-06-21 15:15:23 +02:00
Brecht Van Lommel 97ab330a77 Build: update Python, OpenSSL, libtiff, libxml2 to new versions for security
Ref #104895

Pull Request: https://projects.blender.org/blender/blender/pulls/109133
2023-06-21 15:14:44 +02:00
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