4204 Commits

Author SHA1 Message Date
Nikita Sirgienko
980624cc91 Build: Introduce new Device ID to OIDN 2.3.3
This ensures that OIDN 2.3.3 will support additional
Intel IP, which is important for the LTS version that
will be supported for two years into the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/139267
2025-05-22 12:04:10 +02:00
Sebastian Parborg
1858eba473 Fix: Jemalloc settings not getting applied as version check fails
Some Linux multi lib setups have a helper include file for Jemalloc that
in turn includes the actual header file. This makes our version regex fail.

As the Jemalloc version we are checking for is no longer in any of
the currently supported LTS linux distros, we can safely drop it.

Pull Request: https://projects.blender.org/blender/blender/pulls/139225
2025-05-21 19:10:57 +02:00
Campbell Barton
9819725666 Deps: update wayland dependencies
- wayland-protocols: 1.44
- wayland: 1.23.1
- weston: 14.0.2

Ref: !139127
2025-05-21 11:09:25 +10:00
Campbell Barton
7473124d0f Cleanup: remove trailing space 2025-05-20 11:52:08 +10:00
Campbell Barton
29ab328f35 CMake: use "mode" argument for messages
While it's optional, include by convention and helps to clarify the
purpose of a message.
2025-05-20 11:15:35 +10:00
Ray Molenkamp
73c751afaf Deps_builder: Win: X64: Fix msys2 setup
on a freshly installed environment diff.exe requires newer runtime
dll's. For now only fix this on X64 as on windows on arm there's
issues with newer msys2 versions (but I do now know exactly what
they are anthony has brought it up in the past) this can however
not remain in a broken state, so fixing it for X64 only.

Also fix typo in download_package function

These two fixes together should bring a fresh vmprep install back
to working order.
2025-05-19 14:43:49 -06:00
Ray Molenkamp
aafd3a53bd deps: vmprep: update cmake to 3.31.7 needed for USD
Also fix typo in HIP version.
2025-05-19 13:58:35 -06:00
Ray Molenkamp
ee04d69edc deps: win: shaderc: do not harvest debug libs for shaderc
While shaderc is a c++ library, its api is a C based one so
we do not need a debug version of this library, the blender
side was already updated in f2b9dd3462 this cleans up the
builder side of things.
2025-05-19 13:50:03 -06:00
Nikita Sirgienko
cfb8aa24b2 Build: Upgrade OIDN to the release v2.3.3
This release brings several fixes that Blender no longer needs
to patch manually, as well as support for various new and
upcoming hardware.

Pull Request: https://projects.blender.org/blender/blender/pulls/138171
2025-05-19 17:39:41 +02:00
Brecht Van Lommel
d10493aa21 Build: Avoiding linking against system yaml-cpp and pystring on macOS
OpenColorIO is now a dynamic library, and these are included in it. The
legacy code for the static library case was causing the Homebrew libraries
to be found and linked to.

Pull Request: https://projects.blender.org/blender/blender/pulls/139087
2025-05-19 14:38:55 +02:00
Nikita Sirgienko
2a4ca81af2 Build: Upgrade Embree library to release v4.4.0
This new version brings several fixes that Blender no
longer needs to patch manually. In addition, it includes
an internal change related to GPU memory management which,
together with the new API, could address several tickets
and issues currently reported in relation to Embree GPU execution.

Pull Request: https://projects.blender.org/blender/blender/pulls/138176
2025-05-19 11:34:19 +02:00
Lukas Stockner
6749695ccb Deps: Build OSL with LLVM bitcode
Split out from #138161.

I checked with a locally built OSL (on Linux), and all tests (incl. OptiX OSL)
still pass without the Cycles-side changes in that PR, so we can merge this and
update the libs separately.

The only file that needs to be updated in the deps is `liboslexec.so`,
and probably `llvm/lib/clang/17/include/__clang_cuda_device_functions.h`
(we don't use this when building Blender, but since it's changed,
it's probably cleaner to update it anyways).

Pull Request: https://projects.blender.org/blender/blender/pulls/138788
2025-05-18 14:53:13 +02:00
Jacques Lucke
1816a2665e Tests: Geometry Nodes: add initial Import CSV node tests
Previously, the test files still had absolute instead of relative paths in them.

Pull Request: https://projects.blender.org/blender/blender/pulls/139020
2025-05-18 07:34:57 +02:00
Ray Molenkamp
67ba636006 deps: Fix windows build.
Broken by PR#134221

- Couple of missing deps
- Windows is not happy with -J when building python deps
as multiple processes will try to write to the same .pdb
- Wrong .lib file name for the zstandard python module.
2025-05-15 09:19:29 -06:00
Ray Molenkamp
2c5b9e182b CMake: Add code coverage support for clang
Pretty bare bones but gets the job done, unlike the gcc
tooling, this will work for release builds, the performance cost
of it is on the high side of things, the full test suite tests take over
an hour for me with code coverage support enabled on a release build.
I have not timed a debug build. Given developers can just run their
tests to get coverage data over what they are working on, I feel this
is still useful tooling to have.

This adds the 3 targets for clang and adds a single gcc target

coverage-reset - this removes the collected code coverage data and
report

coverage-report - This merges the collected data and generates the
report (new for gcc)

coverage-show - This merges the collected data and generates the report
and opens it in the browser

This relies on llvm-cov and llvm-profdata being available if not found
code coverage is disabled.

Note: A full test run requires an obscene amount of disk space, a
complete test run takes about 125GB and takes 12 minutes to merge, so
provision the COMPILER_CODE_COVERAGE_DATA_DIR folder accordingly

Example report in PR
2025-05-12 16:28:41 +02:00
Campbell Barton
5e75a9c1e8 Cleanup: spelling in comments 2025-05-11 17:00:47 +10:00
Hans Goudey
1c21de6f77 Cleanup: Formatting 2025-05-09 10:14:44 -04:00
Sebastian Parborg
6d442ca4f1 Build: Make Linux Lib building reproducible
There are two parts for this PR. One is to change some of our build pipeline to make certain libs reproducible. For this part I want to clarify two things:

1. Why change python to use `--disable-optimizations`?
This is because `--enable-optimizations` turns on PGO (Profile Guided Optimization). PGO is sadly not deterministic and will create different binaries on every recompile. So to create reproducible build this needs to be turned off. This also seems to only have been turned on for Linux specifically(?) on our side. So on Windows and Mac our python build already doesn't have PGO.

2. Why split out cython and zstandard from site-packages?
Sadly pip does not seem to respect `SOURCE_DATE_EPOCH`. It also creates temporary folders with random hashes in them that is then recorded into the Cython libraries (I'll touch on this again later). I've looked at the discussions about this upstream and sadly the pip maintainers do not really want people to use pip as a reproducible build system pipeline and instead directs users to other solutions if they want reproducible builds.

The other part is about setting up our pipeline to not introduce any random hashes or build timestamps into our libraries. Here I do two things:

1. We need to set the `SOURCE_DATE_EPOCH` environmental variable to a specific date that will not change.
This is needed as the compile time date is recorded in certain libraries and files. (So hard coding it with this env var will make the end result reproducible)

2. We need to strip the created static and shared libraries. This is because the static libraries are not created in a deterministic way. For shared libraries some of our libraries includes debug symbols which contains paths to temporary files with random hashes. To solve this without stripping in post, we would need to either patch the linker on Rocky8 or patch a lot of our libraries. I think it is better to just do this as a post build step. (This seems to be what most linux distributions do as well).

With all this, we can make our Linux library builds is almost 100% reproducible. (At least on my machine where I tested)
By almost, I mean that there is sadly a catch in that certain libraries like Cython saves the source code path in their libraries for error messages. However now the builds are reproducible if the folder path is the same.
IE if the libraries are always built in `/home/builder/build_linux/deps_x64`, then they should now be reproducible.

Pull Request: https://projects.blender.org/blender/blender/pulls/134221
2025-05-09 15:25:16 +02:00
Sergey Sharybin
7ceb4495c5 Refactor: OpenColorIO integration
Briefly about this change:
- OpenColorIO C-API is removed.
- The information about color spaces in ImBuf module is removed.
  It was stored in global ListBase in colormanagement.cc.
- Both OpenColorIO and fallback implementation supports GPU drawing.
- Fallback implementation supports white point, RGB curves, etc.
- Removed check for support of GPU drawing in IMB.

Historically it was implemented in a separate library with C-API, this
is because way back C++ code needed to stay in intern. This causes all
sort of overheads, and even calls that are strictly considered bad
level.

This change moves OpenColorIO integration into a module within imbuf,
next to movie, and next to IMB_colormanagement which is the main user
of it. This allows to avoid copy of color spaces, displays, views etc
in the ImBuf: they were used to help quickly querying information to
be shown on the interface. With this change it can be stored in the
same data structures as what is used by the OpenColorIO integration.
While it might not be fully avoiding duplication it is now less, and
there is no need in the user code to maintain the copies.

In a lot of cases this change also avoids allocations done per access
to the OpenColorIO. For example, it is not needed anymore to allocate
image descriptor in a heap.

The bigger user-visible change is that the fallback implementation now
supports GLSL drawing, with the whole list of supported features, such
as curve mapping and white point. This should help simplifying code
which relies on color space conversion on GPU: there is no need to
figure out fallback solution in such cases. The only case when drawing
will not work is when there is some actual bug, or driver issue, and
shader has failed to compile.

The change avoids having an opaque type for color space, and instead
uses forward declaration. It is a bit verbose on declaration, but helps
avoiding unsafe type-casts. There are ways to solve this in the future,
like having a header for forward declaration, or to flatten the name
space a bit.

There should be no user-level changes under normal operation.
When building without OpenColorIO or the configuration has a typo or
is missing a fuller set of color management tools is applies (such as the
white point correction).

Pull Request: https://projects.blender.org/blender/blender/pulls/138433
2025-05-09 14:01:43 +02:00
Campbell Barton
b9d4b3b9a4 Cleanup: unused import 2025-05-09 13:36:18 +10:00
Ray Molenkamp
f2b9dd3462 CMake: Windows: Use release libs of shaderc for debug builds.
While shaderc is a c++ library that normally requires debug libs
for ABI reasons, shaderc only exports a C interface, so it will
link release mode libs just fine even for debug builds.

This drops the time required for GPU_shader_compile_static in a
debug build from 5 mins to 3 sec for @pragma37

no changes for release configurations.
2025-05-08 09:14:03 -06:00
Sebastian Parborg
16a4a6c5b3 CMake: Add minimum version to TBB.
Since https://projects.blender.org/blender/blender/pulls/138370 we now
require at least tbb 2021.13.0.
2025-05-07 18:24:20 +02:00
Jesse Yurkovich
e1cd8c322a Build: Fix wrong CMake target used for the manifold library
Pull Request: https://projects.blender.org/blender/blender/pulls/138520
2025-05-06 23:49:05 +02:00
Sergey Sharybin
d0bc85487a Cleanup: Formatting of make_update.py 2025-05-06 13:47:41 +02:00
Sergey Sharybin
1ec9aa1cf1 Fix: make update does not update benchmark data
A mistake in the #137219 which cleanup too much code.

Pull Request: https://projects.blender.org/blender/blender/pulls/138483
2025-05-06 12:21:41 +02:00
Sergey Sharybin
617d79be76 Fix: maker test was checking for the old test files location
There is no need to do this anymore, as the files are expected to
always be there.
2025-05-05 16:52:55 +02:00
Brecht Van Lommel
dfccf9510d Build: Auto add Git LFS fallback remote in "make update"
For the official GitHub mirror and other repositories that do not include LFS
files, this adds an `lfs-fallback` remote. It will be used automatically if a
file can't be found on the regular remote.

Ref #137215

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137615
2025-05-05 15:33:53 +02:00
Sergey Sharybin
bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00
Miguel Pozo
f24ad7a470 Build: Add WITH_OPTIMIZED_BUILD_TOOLS
Enable optimizations on Debug builds for executables used for the build
process (datatoc and glsl_preprocess) and enable unity builds for
shader preprocessing targets.

Debug: From 28.9s to 5.7s
Release: From 4.9s to 3.5s

Pull Request: https://projects.blender.org/blender/blender/pulls/138274
2025-05-02 18:33:44 +02:00
Brecht Van Lommel
2c99edbffa Cycles: Bump Embree minimum version to 4.0.0
The build is already failing with Embree 3, as noticed in #137556.
And Embree 4 was released 2 years ago.

Pull Request: https://projects.blender.org/blender/blender/pulls/138221
2025-04-30 19:50:14 +02:00
Ray Molenkamp
fb4b9a2785 win_x64: Re-enable hiprt
Given the SDK required is now available, we can enable this again.
2025-04-29 18:03:33 -06:00
Ray Molenkamp
8fe645370d WinX64_VM: Bump HIP to 6.3.42560 2025-04-29 18:02:10 -06:00
Clément Foucault
d24b0e4a4e GPU: Remove runtime parsing of GLSL source
See #129009 for context.

The preprocessor parses metadata and writes a header file containing
an inline function that inits the `GPUSource` with the metadata.

These header files are then included inside `gpu_shader_dependency.cc`.

This still keep the usage of the `metadata` enums and classes to avoid
pulling the whole blender module inside the preprocessor executable.

This speeds-up startup time in Debug build:
`gpu_shader_dependency_init`
- Before : 37ms
- After : 4ms

I didn't measure release, but it is unlikely to be noticeable (in the
order of 4ms > 1ms).

Pull Request: https://projects.blender.org/blender/blender/pulls/138070
2025-04-29 15:32:36 +02:00
Lukas Stockner
8fdeebbcb2 Deps: Add missing dependency in apt install guide 2025-04-28 14:59:18 +02:00
Campbell Barton
682e5e3597 Cleanup: spelling in comments (make check_spelling_*) 2025-04-26 00:48:04 +00:00
Campbell Barton
01c32a9ccc Cleanup: trailing space 2025-04-24 12:44:27 +10:00
Howard Trickey
dd559259d8 Modeling: Add a new boolean solver based on the Manifold library.
Adds the 'manifold' solver option to the Boolean geo node and to
the Boolean modifier. This solver is about as fast, or faster,
than the current float solver, and is robust against floating
point issues like the Exact solver. But currently it only
works on mesh arguments that are strictly manifold.

See https://projects.blender.org/blender/blender/issues/120182
for many more details.
2025-04-22 21:23:37 -04:00
Johan Walles
8afde59054 macOS: Default to modern linker on x64
This patch changes the default macOS x64 linker from the slower legacy
"classic" linker, to the much faster default modern macOS linker. A new
CMake option `WITH_LEGACY_MACOS_X64_LINKER` was also introduced to use
the old linker, set to OFF by default.

As an example from testing on an Intel Macbook, this makes linking time
go from 3min25s to 10s after this change. The reason why the legacy
linker was enforced on x64 in the first place was to silence "platform
load command not found" warnings during linking. Since this behavior is
still desired on the BuildBot, the `WITH_LEGACY_MACOS_X64_LINKER` option
is enforced in the BuildBot macOS configs.

Pull Request: https://projects.blender.org/blender/blender/pulls/134639
2025-04-21 10:56:36 +02:00
Aras Pranckevicius
cc741fbf99 IO: New FBX importer (C++, via ufbx)
Adds a C++ based FBX importer, using 3rd party ufbx library (design task:
#131304). The old Python based importer is still there; the new one is marked
as "(experimental)" in the menu item. Drag-and-drop uses the old Python
importer; the new one is only in the menu item.

The new importer is generally 2x-5x faster than the old one, and often uses
less memory too. There's potential to make it several times faster still.

- ASCII FBX files are supported now
- Binary FBX files older than 7.1 (SDK 2012) version are supported now
- Better handling of "geometric transform" (common in 3dsmax), manifesting
  as wrong rotation for some objects when in a hierarchy (e.g. #131172)
- Some FBX files that the old importer was failing to read are supported now
  (e.g. cases 47344, 134983)
- Materials import more shader parameters (IOR, diffuse roughness,
  anisotropy, subsurface, transmission, coat, sheen, thin film) and shader
  models (e.g. OpenPBR or glTF2 materials from 3dsmax imports much better)
- Importer now creates layered/slotted animation actions. Each "take" inside
  FBX file creates one action, and animated object within it gets a slot.
- Materials that use the same texture several times no longer create
  duplicate images; the same image is used
- Material diffuse color animations were imported, but they only animated
  the viewport color. Now they also animate the nodetree base color too.
- "Ignore Leaf Bones" option no longer ignores leaf bones that are actually
  skinned to some parts of the mesh.
- Previous importer was creating orphan invisible Camera data objects for
  some files (mostly from MotionBuilder?), new one properly creates these
  cameras.

Import settings that existed in Python importer, but are NOT DONE in the new
one (mostly because not sure if they are useful, and no one asked for them
from feedback yet):

- Manual Orientation & Forward/Up Axis: not sure if actually useful. FBX
  file itself specifies the axes fairly clearly. USD/glTF/Alembic also do
  not have settings to override them.
- Use Pre/Post Rotation (defaults on): feels like it should just always be
  on. ufbx handles that internally.
- Apply Transform (defaults off, warning icon): not sure if needed at all.
- Decal Offset: Cycles specific. None of other importers have it.
- Automatic Bone Orientation (defaults off): feels like current behavior
  (either on or off) often produces "nonsensical bones" where bone direction
  does not go towards the children with either setting. There are discussions
  within I/O and Animation modules about different ways of bone
  visualizations and/or different bone length axes, that would solve this
  in general.
- Force Connect Children (defaults off): not sure when that would be useful.
  On several animated armatures I tried, it turns armature animation
  into garbage.
- Primary/Secondary Bone Axis: again not sure when would be useful.

Importer UI screenshots, performance benchmark details and TODOs for later
work are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/132406
2025-04-16 09:55:00 +02:00
Clément Foucault
dde18802a5 GPU: Remove WITH_GPU_RENDER_TESTS_SILENT option
This was introduced during EEVEE-next developement
cycle to not make the buildbot fail because of EEVEE
render tests.

These have stabilized now and we can remove this option.

Pull Request: https://projects.blender.org/blender/blender/pulls/137545
2025-04-15 17:56:16 +02:00
Jonas Holzman
291bde7b78 CMake: TBB: Replace FindTBB module with TBB's own TBBConfig module
This patch replaces our own FindTBB module with TBB's own TBBConfig
module. On the technical side of things, this harvests the TBB CMake
config modules, and switches our TBB CMake find_package calls from
Module mode to Config mode. Integration was done using OpenPGL as a
blueprint for parsing TBB target's property back into CMake variables
(TBB_LIBRARIES and TBB_INCLUDE_DIRS).

Pull Request: https://projects.blender.org/blender/blender/pulls/137063
2025-04-15 17:31:36 +02:00
Thomas Dinges
6655c6fa75 Release: Update installer graphic for 4.4
Also switch to .png format for better compression.

Pull Request: https://projects.blender.org/blender/blender/pulls/137471
2025-04-14 17:36:09 +02:00
Campbell Barton
5affe5fc6d Cleanup: spelling in comments (make check_spelling_*) 2025-04-12 19:31:29 +10:00
Brecht Van Lommel
3c483e3d40 Fix: CMake error with old or incomplete HIP install
Pull Request: https://projects.blender.org/blender/blender/pulls/137294
2025-04-10 18:56:47 +02:00
Campbell Barton
3a51d140d8 Cleanup: remove WITH_X11_XF86VMODE since mode setting is no longer used
Setting the display mode was last used for the Game Engine
remove the CMake option WITH_X11_XF86VMODE and the associated code.

Ref: !137126
2025-04-08 10:56:27 +00:00
Josh Belanich
65512c0f5c Tests: Adjust gtest filter to avoid skipping some Vulkan tests
Removes '/' prefix from gtest filter for parameterized tests. This prefix
was causing tests in fixtures like VKRenderGraphTestScheduler and
VKRenderGraphTestRender to be skipped in `make test`.

Only parameterized tests with an InstantiationName will have a '*/' in
their names as part of a prefix. But according to the spec, InstantiationName
is optional, and if not set it wont generate prefixes. In these cases, the
gtest_filter produced will not match the test names, and cause `make test`
to not run the tests.

Removing this '*/' prefix should still match any tests with a non-empty
InstantiationName.

Pull Request: https://projects.blender.org/blender/blender/pulls/136987
2025-04-07 16:45:07 +02:00
Brecht Van Lommel
4970bac061 Tests: Properly disable tests when data directory is missing
And clean up cmake output to be less verbose.
2025-04-07 16:29:14 +02:00
Aras Pranckevicius
5649b1c7f7 CMake: put test executables under folders in visual studio solution
Majority of projects within generated VS IDE solution are put under
their respective source folders, except the test executables. Majority
of which are various libmv tests. Use the same cmake macro to arrange
them in folders as what is used for regular libraries.

Pull Request: https://projects.blender.org/blender/blender/pulls/137028
2025-04-05 22:01:55 +02:00
Campbell Barton
e544f543a0 CMake: pass a mode argument to message
While omitting the mode is supported it's generally better to clarify
the purpose of a message.
2025-04-05 21:42:16 +11:00
Campbell Barton
f48b4e3abf Cleanup: wrap long lines for CMake 2025-04-05 20:30:37 +11:00