Commit Graph

3637 Commits

Author SHA1 Message Date
Stefan Werner
d16d2bbd3a Cycles: Adding OIDN support for CUDA and OptiX devices
Small changes to turn on support and to build OIDN with the CUDA backend.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115828
2024-01-24 08:19:39 +01:00
Brecht Van Lommel
440b1d9179 Cleanup: cmake warning in make deps 2024-01-23 20:29:07 +01:00
Campbell Barton
dd8c42bfaf CMake: mark freetype & tiff directories as advanced
It's not clear what these are used for as they seem like recent
additions and are set to "NOT-FOUND" even when tiff/freetype are found.

Marking as advanced instead of removing so as not to interfere with
freetype/tiff finding logic.
2024-01-23 20:45:19 +11:00
Thomas Dinges
64fc6d7890 Docs: Replace most wiki links with links to new developer docs
Exceptions:
* Links to personal wiki pages
* Pages that are not in the new developer docs yet (like Human Interface Guidelines)
* tools\check_wiki\check_wiki_file_structure.py needs a refactor
2024-01-18 16:49:38 +01:00
Brecht Van Lommel
aefa1cd723 Build: bump sse2neon version to latest hash
This includes an additional fix for precision of some operations that affect
Blender tests.
2024-01-16 14:18:33 +01:00
Campbell Barton
6e9e1557bb Cleanup: tabs to spaces 2024-01-14 11:37:04 +11:00
Campbell Barton
95c0968246 Cleanup: quiet mypy warning 2024-01-11 16:29:19 +11:00
Bastien Montagne
f23ee504d0 Tests: Improve the sanitizer options handling.
Previous code was using the 'nuclear' SAN weapon `exitcode=0`, which
essentially makes testing ignore all sanitizer errors.

This commit removes this option, and instead uses the suppression
list from Blender source repository (`tools/config/analysis/lsan.supp`)
for the leak sanitizer.

It also enables the `allocator_may_return_null` for the address sanitizer.
This should only be needed for one test (the `guardedalloc` one), but for
now it is simpler to define it for all tests. This can be refined at a
later time.

Pull Request: https://projects.blender.org/blender/blender/pulls/116635
2024-01-09 14:26:36 +01:00
Campbell Barton
5afd33d129 PyAPI: drop support for Python 3.10
All platforms have been updated to support 3.11
so supporting 3.10 is no longer needed.
2024-01-09 22:23:41 +11:00
Campbell Barton
cff7415040 Build: bump OpenAL-soft from 1.21.1 to 1.23.1
Along with regular fixes and improvements,
this removes a warning on startup for Linux, see:
https://github.com/kcat/openal-soft/issues/554

Some deprecated CMake variables were removed and needed to be renamed.

Note that the previous URL from http://openal-soft.org/
is no longer responsive, using the GITHUB URL instead.

Ref !116877
2024-01-09 21:29:05 +11:00
Campbell Barton
c6485d5947 CMake: quiet undefined variable warnings 2024-01-09 12:38:42 +11:00
Brecht Van Lommel
df43c8e7ef Fix macOS not auto updating cmake cache for Python 3.11 2024-01-08 13:14:34 +01:00
Brecht Van Lommel
0e4da8d55f Fix macOS ARM build failing with make lite
OpenImageIO headers have a dependency on Imath headers when not on x86_64.
2024-01-08 13:14:34 +01:00
Campbell Barton
5dd91346e1 Cleanup: remove unused imports 2024-01-08 11:40:53 +11:00
Campbell Barton
2783af45ee Cleanup: trailing newlines 2024-01-08 11:31:43 +11:00
Hans Goudey
e90d844dd7 Cleanup: Grammar in comments
"it's own" -> "its own" again. Start new sentences properly.
2024-01-06 09:02:56 -05:00
Bastien Montagne
3e744db9fe Tests: Refactor handling of environment variables when invoking tests.
The current handling had a fairly bad issue: multiple calls to
`set_tests_properties` to set envvars of a same test.

This does not work, only the last call is effective, all previous
ones have absolutely no effect.

This has been addressed by moving all 'set envvar for test' logic into a
single CMake function, `blender_test_set_envvars`.

This function takes optional extra envvars if needed, and define a set
of default ones (currently, `PATH` from `PLATFORM_ENV_INSTALL` if
defined, and the 'nuke' `exitcode=0` `LSAN_OPTIONS` if relevant).

NOTE: The way `blender_test_set_envvars` handles extra envvars passed to
it as parameter is fairly basic and unsafe, in that there is no check
whether a same envvar is defined more than once. Think for now this is
an acceptable limitation.

NOTE: Although this commit _should_ be a non-functional change one, the
unification of the handling of all envvars makes it hard to ensure there is no
side effects.
The `PATH` envvar e.g. was set to either `PLATFORM_ENV_INSTALL` if defined,
or a copy of that variable's definition, but only in Windows case. So technically,
the behavior for this envvar is changed.
2024-01-05 21:13:54 +01:00
Bastien Montagne
95b30b3516 Build: Ninja: Move 'Unity builds' to heavy pooljobs.
This commit adds a new helper to define expected properties when a
target needs to use the unity build feature.

That new helper does what was already done for existing cases, and in
addition add the target to the Ninja 'heavy' pooljobs if relevant.

Pull Request: https://projects.blender.org/blender/blender/pulls/116791
2024-01-05 18:35:48 +01:00
Brecht Van Lommel
8131a636fb Build: bump supported Python version to 3.11 on macOS
Now that the precompiled libraries have been updated.
2024-01-04 02:51:44 +01:00
Brecht Van Lommel
364beee159 Tests: add option to build one binary per GTest file
Bundling many tests in a single binary reduces build time and disk space
usage, but is less convenient for running individual tests command line
as filter flags need to be used.

This adds WITH_TESTS_SINGLE_BINARY to generate one executable file per
source file. Note that enabling this option requires a significant amount
of disk space.

Due to refactoring, the resulting ctest names are a bit different than
before. The number of tests is also a bit different depending if this
option is used, as one uses gtests discovery and the other is organized
purely by filename, which isn't always 1:1.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114604
2024-01-03 18:35:50 +01:00
Brecht Van Lommel
f63accd3b6 Cleanup: move CMake test utility functions into testing.cmake
Combining functions from macros.cmake and Modules/GTestTesting.cmake.
It was unusual to have Blender specific code in the Modules folder.

Pull Request: https://projects.blender.org/blender/blender/pulls/116719
2024-01-03 14:49:11 +01:00
Sergey Sharybin
b66dec58ed macOS: Silence noisy linker warning about duplicate libraries
The warning was introduced with XCode 15 and conflicted with some
assumptions in the CMake. Even without actual cyclic dependency
between targets CMake might decide to pass library multiple times
to the linker, to ensure all its users find symbols from it.

This behavior is expected to be tweaked in the upcoming CMake
version, but until it is released and became widely used by all
Blender macOS developers silence the warning.

Pull Request: https://projects.blender.org/blender/blender/pulls/116718
2024-01-03 09:24:36 +01:00
Brecht Van Lommel
4ce14a639f Revert "Cleanup: move CMake test utility functions into testing.cmake"
This breaks execution of some Windows tests.

This reverts commit 4190a61020eb1ddde5097ac21aaf0bb77118f140.
2024-01-02 19:06:39 +01:00
Brecht Van Lommel
a815594394 Build: bump sse2neon to latest main
The 1.7.0 version introduced compiler wanings on clang, use a
newer revision with a fix.
2024-01-02 17:29:46 +01:00
Brecht Van Lommel
1f3ce2a311 Build: changes to macOS build flags to fix linker warnings
* Different fix for Mantaflow linker warnings that works with new OpenVDB.
* Use new linker for arm64 as it no longer produces warnings with latest
  Xcode. Still use the old one for x86_64 as some warnings remain.
* Fix wrong x86_64 build target in deps builder.

For the upcoming 4.1 libraries.

Ref #113157

Pull Request: https://projects.blender.org/blender/blender/pulls/116708
2024-01-02 16:22:48 +01:00
Brecht Van Lommel
4190a61020 Cleanup: move CMake test utility functions into testing.cmake
Combining functions from macros.cmake and Modules/GTestTesting.cmake.
It was unusual to have Blender specific code in the Modules folder.
2024-01-02 15:34:52 +01:00
Brecht Van Lommel
e016c1d6c3 Build: bump sse2neon to version 1.7.0
Stable release instead of git hash.

Ref #113157
2024-01-02 14:40:47 +01:00
Ray Molenkamp
fcbb94ed1e deps_builder: include OIIO PR #4062
OIIO was including imaths half.h when it did not
need to, leading to build errors in lite builds.
This issue had been fixed already upstream but
was not yet included in the version we use.
2023-12-26 12:50:10 -07:00
Ray Molenkamp
c6ae08b06b deps_builder: build fixes for oidn
- OIDN doesn't need to be build for debug builds on windows, while
it's mostly C++ code its public API is C
- Python was not found by the HIP build
- Level Zero was downloaded during the build.
2023-12-23 11:45:11 -07:00
Campbell Barton
e18e4a1acf CMake: default to Python 3.10 for macOS
The recent bump to 3.11 should have only changed Linux as updated macOS
libraries have not yet been committed.
2023-12-23 16:19:09 +11:00
Campbell Barton
526019b559 CMake: default to Python 3.11, auto-update existing variables 2023-12-23 14:39:55 +11:00
Campbell Barton
248d7d8340 Fix use of undefined IMATH_INCLUDE_DIRS
New include directory variable from [0] was only set for WIN32,
causing openimageio to fail to build with libraries updated for 4.1.

[0]: 802ac5ba5afc04a2c4bdd72ef52df281d9065824
2023-12-22 21:27:51 +11:00
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 34b3a9583ac2433dd8d223d2bd098adc30bc72bd 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]: 60a8ae7830acd09c3d8e9ab52630d48ecd4d281b
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]: 1015bed2fd89c5a8f741c5f1dd22099a9441bea0
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 8474716abb0db3b06838a57f7217bc945638d8df.

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 5ac392ca403b1af854b2ed17105f0fe7a005c5cf 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