Commit Graph

3591 Commits

Author SHA1 Message Date
Jeroen Bakker 324ef0cbf4 RenderTest: GPU Render Tests Pass Silently
Add silently fail option to GPU based render tests. This is a pre-requisite to enable
render tests on the buildbot. By default these render tests will pass silently.

* Test will pass when using the `--pass-silently` arguments.
* Only crashes will be reported as failed tests.
* To find out failing test, review the test reports.

`WITH_GPU_RENDER_TESTS_SILENT` compile option can be used to let tests pass (default)
or fail (default for developers).

Although some tests fail, they still passed. In the generated render report,
the silently passed failures are correctly reported to be failures.

Pull Request: https://projects.blender.org/blender/blender/pulls/117629
2024-01-29 15:39:14 +01:00
Sergey Sharybin f11292104d Render Tests: Separate difference of Color and Alpha
This change fixes confusion situation when the render output
is an RGBA image: the difference in color was not visible in
the report because alpha channel was all zeros. This is due
to idiff performing per-channel difference.

The solution to this problem is to have separate images for
color and alpha difference, which makes it clear where the
difference actually is coming from.
2024-01-25 10:04:16 +01:00
Campbell Barton e89fdadf8e CPPCheck: exclude large lookup table in checks 2024-01-25 10:09:00 +11:00
Ray Molenkamp 52152aac90 deps_builder: include all oiio tools for windows
oiiotool is required for PR117481
2024-01-24 08:47:30 -07:00
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 4190a61020.
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]: 802ac5ba5a
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