Commit Graph

3840 Commits

Author SHA1 Message Date
Sergey Sharybin
680a80d61c Build: Hide PugiXML symbols from MaterialX on Linux
This change uses a symbol map to hide PugiXML symbols from MaterialX libraries
when dependencies are built. This avoids conflict with symbols from pugixml.a
used by Blender for the Grease Pencil SVG exporter.

The root cause of the conflict has been addressed upstream:

  https://github.com/AcademySoftwareFoundation/MaterialX/pull/1944

However, the patch does not cleanly apply on 1.38, and it not cleat when the
next 1.39 is released. Additional complication is that reportedly USD does
not yet support MaterialX 1.39.

This fix is only for Linux. Similar thing can be applied on macOS, however so
far I could not reproduce the issue on macOS.

Ref #124173

Pull Request: https://projects.blender.org/blender/blender/pulls/126518
2024-10-04 11:16:05 +02:00
Sergey Sharybin
63650461b7 Build: Update ROCm to version 6.1.3
This is what the Linux workers are using now.

Pull Request: https://projects.blender.org/blender/blender/pulls/128488
2024-10-04 11:08:51 +02:00
Sergey Sharybin
c5e2e8ebc6 Build: Copy tests manifests instead of install
This avoids having INSTALL files with an absolute path that is
different from the "main" install path. In practice this should
solve the problem of WIX failing to package Blender 4.3.

Pull Request: https://projects.blender.org/blender/blender/pulls/128556
2024-10-04 09:57:41 +02:00
Campbell Barton
952e1d46d1 Cleanup: match declaration names, avoid shadowing & clear trailing space 2024-10-03 12:12:08 +10:00
Thomas Dinges
906bc801f4 Release cycle: Blender 4.3 Beta
Splash screen by Blender Studio: studio.blender.org
2024-10-02 12:34:01 +02:00
Ray Molenkamp
042e3b2452 deps: fix build error on windows
ocloc isn't a target on windows causing a dependency error
2024-10-01 09:45:38 -06:00
Brecht Van Lommel
b74dfa8cfc Build: Changes for make deps to work on Linux arm64 again
This is not an officially supported platform, but it was working before
so might as well keep it up to date.

* Tweak logic for various BLENDER_PLATFORM_ARM checks
* Use linux_arm64 name for folders, matching Windows and macOS
* CUDA is enabled, SYCL and HIP are not
* Tested to work on Rocky Linux 8
2024-09-24 15:54:47 +02:00
Brecht Van Lommel
f068b6c6d4 Fix: Wrong make deps xml2 library install on Linux and macOS
Order was swapped in refactoring in #123196.
2024-09-24 15:45:16 +02:00
Sergey Sharybin
ff3a33e05a Remove HIP-RT from pipeline_config.yaml
It is controlled by pre-compiled libraries now.
2024-09-24 15:26:31 +02:00
Sahar A. Kashi
26ed4d3892 Cycles: Linux Support for HIP-RT
This change switches Cycles to an opensource HIP-RT library which
implements hardware ray-tracing. This library is now used on
both Windows and Linux. While there should be no noticeable changes
on Windows, on Linux this adds support for hardware ray-tracing on
AMD GPUs.

The majority of the change is typical platform code to add new
library to the dependency builder, and a change in the way how
ahead-of-time (AoT) kernels are compiled. There are changes in
Cycles itself, but they are rather straightforward: some APIs
changed in the opensource version of the library.

There are a couple of extra files which are needed for this to
work: hiprt02003_6.1_amd.hipfb and oro_compiled_kernels.hipfb.
There are some assumptions in the HIP-RT library about how they
are available. Currently they follow the same rule as AoT
kernels for oneAPI:
- On Windows they are next to blender.exe
- On Linux they are in the lib/ folder

Performance comparison on Ubuntu 22.04.5:
```
GPU: AMD Radeon PRO W7800
Driver: amdgpu-install_6.1.60103-1_all.deb
                       main         hip-rt
attic                  0.1414s      0.0932s
barbershop_interior    0.1563s      0.1258s
bistro                 0.2134s      0.1597s
bmw27                  0.0119s      0.0099s
classroom              0.1006s      0.0803s
fishy_cat              0.0248s      0.0178s
junkshop               0.0916s      0.0713s
koro                   0.0589s      0.0720s
monster                0.0435s      0.0385s
pabellon               0.0543s      0.0391s
sponza                 0.0223s      0.0180s
spring                 0.1026s      1.5145s
victor                 0.1901s      0.1239s
wdas_cloud             0.1153s      0.1125s
```

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/121050
2024-09-24 14:35:24 +02:00
Campbell Barton
233cb0aeb7 cppcheck: exclude generated data-files & shaders 2024-09-23 13:48:21 +10:00
Lukasz Czyz
788bc5158e UV: add support for the SLIM unwrapping algorithm
Integrate an existing implementation of the SLIM unwrapping algorithm
into Blender. More info about SLIM here:
https://igl.ethz.ch/projects/slim/

This commit is based on the integration code written by Aurel Gruber
for Blender 2.7x (unfinished and never merged with the main branch).

This commit is based on Aurel's code, rebased and further improved.

Details:

- Unwrap has been moved into a sub-menu,
  slim unwrapping is exposed as: "Minimum Stretch".
- Live unwrap with SLIM refines the solutions using a timer.
- When using SLIM there are options to:
  - Set the number of iterations.
  - Weight the influence using vertex weights.
- SLIM can be disabled using the `WITH_UV_SLIM` build option.

Co-authored-by: Aurel Gruber <aurel.gruber@infix.ch>

Ref !114545
2024-09-21 16:48:53 +10:00
Sergey Sharybin
4f5b6b114d Cycles: Bump OptiX version to 7.4
This commit switches buildbot to use OptiX 7.4 to gain performance
and memory optimizations for B-Spline curves.

Ref #125899

Pull Request: https://projects.blender.org/blender/blender/pulls/127861
2024-09-20 10:37:21 +02:00
Campbell Barton
0fc27c8d81 Cleanup: spelling in comments 2024-09-20 13:14:57 +10:00
Jeroen Bakker
91bfd8dfc4 ShaderC: Remove global locale lock
This is a backport of a patch in SPIRV-Tools that will allow faster
parallel compilation.

See https://github.com/KhronosGroup/SPIRV-Tools/issues/5802 for the
original report.

The issue is that SPIRV tools used a stringstream to convert an uint32_t
to a string when optimizing shaders. stdlib provided by the platform
would set a locale and would mutex globally, making parallel compilation
fully lock. Compilation lead times were as fast as single threaded
compilation.

Pull Request: https://projects.blender.org/blender/blender/pulls/127564
2024-09-19 18:05:00 +02:00
Sergey Sharybin
0d76071289 Build: Add option to remove stale files from checkout
This change adds `--prune-destructive` command line argument to the
`make_update.py` script which ensures directories which used to be
an in-worktree checkout do not exist. Currently it is addons and
addons_contrib folders.

This gives buildbot an ability to ensure checkout used for build is
correct, regardless of which branch or patch was built there.

The option is needed because sometimes it is still required to be
able to build patches against v330 or v360 which still use the old
style of addons.

Alternative solution could be to ignore the folders in the INSTALL
command, but this could have impact on users who wants to package
custom addons.

The downside of this solution is that buildbot potentially will be
downloading addons and addons_contrib repositories every time it
builds a patch against v330 or v360. It should not be a problem in
practice since the repositories are rather small, and patches for
these tracks are not built very often.

Ref #126557

Pull Request: https://projects.blender.org/blender/blender/pulls/127798
2024-09-18 17:53:25 +02:00
salipourto
b0a9e45cb5 Build: Add HIP-RT libraries to dependencies builder
This change makes it so that HIP-RT libraries are built as a part
of the rest of the dependencies.

The libraries are built and placed to the `lib-<platform>/hiprt`. They
are not currently used, but are needed to simplify transition of Cycles
to these new libraries.

The actual Cycles side is done in #121050

Pull Request: https://projects.blender.org/blender/blender/pulls/127719
2024-09-17 15:26:27 +02:00
Anthony Roberts
f0de0bc8d3 Windows: Enable OpenPGL on ARM64 machines
This is required to reach feature completeness with x64 platforms.

Also patches TBB headers in order to fix a few build errors when compiling OpenPGL.

Pull Request: https://projects.blender.org/blender/blender/pulls/127705
2024-09-17 14:57:04 +02:00
Lukas Tönne
d918c22fcc Revert "CMake: suppress warnings building with mold on Linux"
This reverts commit 0a0551cf26.

This commit broke building on linux with mold. It seems to never
generate the necessary file when something other than the `blender`
binary is the first thing being built.
2024-09-17 10:48:16 +02:00
Campbell Barton
0a0551cf26 CMake: suppress warnings building with mold on Linux
Support manipulating symbols_unix.map using symbols_unix.map.cmake
script.

Currently this removes symbols that generate noisy warnings with the
mold linker.
2024-09-17 14:42:31 +10:00
Campbell Barton
c6afb0e270 Core: remove sdlew/WITH_SDL_DYNLOAD & disable SDL by default
Disable dynamic SDL loading as well as disable SDL for release builds.

This was only used for audio output which can already use OpenAL
if there are back-ends not natively supported by Blender.

- Remove extern/sdlew/
- Remove the WITH_SDL_DYNLOAD build option.
- Remove `bpy.app.sdl.available`.

Ref !127554
2024-09-13 22:44:35 +10:00
Aras Pranckevicius
41cdac536e Cleanup: remove "64 bit compiler detected" cmake message
On Windows, if compiler is 32 bit there already is a fatal error. If it
is 64 bit (normal case, and any case when build can actually work), it
feels like "64 bit compiler detected" status message does not indicate
anything useful.

Pull Request: https://projects.blender.org/blender/blender/pulls/127484
2024-09-12 14:50:13 +02:00
Xavier Hallade
a1182e07b1 Build: upgrade Intel Graphics Compiler and ocloc on Linux
IGC 1.0.17384, ocloc 24.31.30508, which:
- add support for Battlemage and Lunar Lake GPUs
- recover from recent performance regression on Linux
- allow to drop older work-around
  (9d5164d472) and need for a patched
  version on Windows
- ocloc now needs "dg2,mtl" naming for fat binaries.

opencl-clang patches don't get applied anymore by igc build scripts
when llvm is not a git repository, hence I could also drop we can drop
current patch disabling patching.

I've only slightly pushed min-driver-version updates after carefull
testing, instead of jumping to the same version as ocloc as we use to.

Pull Request: https://projects.blender.org/blender/blender/pulls/127251
2024-09-12 09:11:56 +02:00
Xavier Hallade
56db2d393d Cycles: oneAPI: use ocloc 101.5972 on Windows
This new version of the graphics compiler solves a performance
regression on Arc, adds support for Battlemage and Lunar Lake GPUs, and
allows to drop older patch to build fat binaries with broad
compatibility.
This latter change requires using -device dg2,mtl naming instead of
passing architecture ids.

Pull Request: https://projects.blender.org/blender/blender/pulls/127371
2024-09-11 17:34:13 +02:00
Sergey Sharybin
c1010f46c3 Build: LibPNG: Update to 1.6.43
Fixes issue with EXIF after IDAT.

The change also includes new libraries for macos for PNG and OIIO which
were needed to fix the original bug.

Ref #123620
Ref #125241

Pull Request: https://projects.blender.org/blender/blender/pulls/126980
2024-09-11 12:13:22 +02:00
buildxyz-git
a0f653c002 PyAPI: enable draco when building blender as a python module
Allow GLTF IO using Draco compression.

Ref: !125556
2024-09-06 21:15:38 +10:00
Bastien Montagne
b2d441a93a install_linux_packages.py: Remove SVN requirement.
We do not have any SVN repository left in our Blender sources.
2024-08-26 11:41:26 +02:00
Aras Pranckevicius
246a0ec46a Fix #126394: ffmpeg on win64 is built without SIMD optimizations
Since ee1b2f53cc the ffmpeg libraries for Windows x64 are built effectively
without CPU specific SIMD optimizations. `--arch=x64` is not an architecture
that ffmpeg configure understands, so it falls back to "nothing is known,
turn any architecture specific bits off" code path.

Pull Request: https://projects.blender.org/blender/blender/pulls/126396
2024-08-22 10:36:18 +02:00
Campbell Barton
08d5eb8f9c Cleanup: cmake formatting 2024-08-21 23:20:34 +10:00
Anthony Roberts
b4c9986447 Windows: Enable external manifest by default on ARM64
This also fixes tests not having external manifests when the option is enabled, and properly detects clang-cl in the libdir setup.

Pull Request: https://projects.blender.org/blender/blender/pulls/126563
2024-08-21 15:01:04 +02:00
Lukas Tönne
400c738db9 GPv3: Import and export for SVG and PDF
Implements the SVG import/export and PDF export operators for GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/123996
2024-08-20 11:41:37 +02:00
Sergey Sharybin
abb3f2b0eb Build: Upgrade sse2neon
The previous update introduced a regression #126408

This update pulls a fix committed to the upstream:
  https://github.com/DLTcollab/sse2neon/pull/646

Pull Request: https://projects.blender.org/blender/blender/pulls/126413
2024-08-16 18:35:17 +02:00
Campbell Barton
6e823d3f6f CMake: library path reference for PLATFORM_ENV_BUILD unix/macos (#2)
Correct fix from [0].

The previous fix seemed to work but on further testing the environment
wasn't properly expanded. Using "$$" prefix resolves the problem.

[0]: b0ec4bba70
2024-08-16 17:13:05 +10:00
Anthony Roberts
37e86dbf6f Build: Add patch to OIIO fixing Windows ARM64 + clang
Pull Request: https://projects.blender.org/blender/blender/pulls/126331
2024-08-15 17:27:15 +02:00
Campbell Barton
bd4e535009 CMake: fail with an error if wayland-scanner can't be found 2024-08-15 21:50:46 +10:00
Campbell Barton
b0ec4bba70 CMake: library path reference for PLATFORM_ENV_BUILD on unix & macos
The value used for the the library path was being evaluated by CMake
instead of forwarding the value to the shell expression (as intended).

This meant any build-time binaries that depended on the environments
library-path would failed to run.
2024-08-15 21:50:46 +10:00
Anthony Roberts
b664ece0fe Build: Upgrade sse2neon
Pull Request: https://projects.blender.org/blender/blender/pulls/126237
2024-08-15 12:31:26 +02:00
Alaska
1330d0ddda Cycles render tests: Add the option to test with OSL enabled
This commit adds a new cmake variable `WITH_CYCLES_TEST_OSL`
that runs every Cycles test a second time with OSL enabled.

At the moment only CPU OSL is enabled. There are plans to enable
OptiX OSL in the future when stability issues with OptiX OSL
have been resolved.

Some render tests have been blocked from running until we can figure
out a fix. The most notiable being all the Pricincipled BSDF tests
as some of them are failing due to noise differences.

Ref #123012

Pull Request: https://projects.blender.org/blender/blender/pulls/124601
2024-08-14 17:00:48 +02:00
Anthony Roberts
9576576039 Windows: Enable clang-cl for ARM64
This gets Windows ARM64 to compile with clang-cl, which gives up to 40% performance improvements in certain scenes rendered with cycles, compared to MSVC.

This is all tested using LLVM 18.1.8 and a VS2022 `vcvarsall` window.

Subsequent PRs with various lib version updates, etc to go in at a later point.

Pull Request: https://projects.blender.org/blender/blender/pulls/124182
2024-08-12 16:50:07 +02:00
Sergey Sharybin
de10f8513c Libs: Update Python version to 3.11.9
This is to bring all accumulated security updates and bug fixes,
including the ones from Pip.

The bzip2, ffi, and sqlite library version does not seem to have
changed.

Ref #125241

Pull Request: https://projects.blender.org/blender/blender/pulls/125771
2024-08-08 11:20:49 +02:00
Sergey Sharybin
4bf9482c7e CVE checker: Add CPE for pip
Python bundles pip, but does not track CVEs reported against it.
Add an explicit CPE to be able to detect CVEs affecting pip version
bundled with Python.

Currently it is a manual process of keeping the version in sync with
the one used in Python.

The CVE-2018-20225 is essentially marked as ignored. It is not fixed
upstream, and other users like Debian are also essentially ignoring
this CVE:

  https://security-tracker.debian.org/tracker/CVE-2018-20225

Pull Request: https://projects.blender.org/blender/blender/pulls/125648
2024-08-01 10:40:48 +02:00
Sergey Sharybin
80bf51be27 CVE checker: Update remarks for latest version
The mnemonic for the remark Ignored has been split into False Positive
and Not Affected in the recent version of cve_bin_tool, preventing it
from properly parsing the CVS file and not being able to do proper
report.

Use Not Affected, as it is seems to be the closest to what Ignored was
used for in our case.

Pull Request: https://projects.blender.org/blender/blender/pulls/125645
2024-08-01 10:30:33 +02:00
Sergey Sharybin
46d0e8acbe Update OpenCollada library version
Ref #124859 (original bug report)
Ref #125241 (library management task)

Pull Request: https://projects.blender.org/blender/blender/pulls/125304
2024-07-24 11:25:30 +02:00
Jesse Yurkovich
ec4fc2d34a CMake: Modernize the optional TBB dependency
This continues the cmake modernization effort and introduces support for
allowing our optional dependencies to integrate properly. TBB is added
here as it's proven troublesome to maintain correctly.

Currently the only Blender project which uses the TBB headers directly
is `blenlib`.  However, all downstream projects which require blenlib as
their dependency, and wish to properly make use of its threading
facilities, needed to define various TBB items in their CMake files. Not
only is this unnecessary and arcane, but several projects didn't do this
and ended up not using threading as well as producing ODR violations
along the way[1].

This PR makes TBB a modern dependency and exposes it PUBLIC'ly from
`blenlib`.  All downstream projects which depend on blenlib will now
receive everything they require from TBB automatically. This includes
the `WITH_TBB` define, the headers, and the library itself.

[1] blender/blender@05241f47f5

Pull Request: https://projects.blender.org/blender/blender/pulls/124916
2024-07-19 23:30:56 +02:00
Ben-7
be6d82a485 Cmake: Improve finding openmp with clang-cl compiler on windows
When having several clang versions installed cmake would default
to the last llvm directory in the registry when finding the openmp
libraries. Two problems with that are :

1- The registry entry may not exist
2- Even if it exists it may not point to the right folder for the
   Current compiler.

This PR changes the behaviour to look relative to the clang binary
to find the openmp libraries.

Pull Request: https://projects.blender.org/blender/blender/pulls/125101
2024-07-19 20:03:47 +02:00
Campbell Barton
fd4fb94751 PyAPI: Enable audaspace when building blender as a python module
Without audaspace, the sequence editor can't load audio files
which can be useful from Python.

Resolves #125007.
2024-07-19 14:37:49 +10:00
Sergey Sharybin
389b322975 CMake: Add buildbot configuration for all platforms
It allows to more easily override cmake options which we want to
be enabled on the buildbot.

In a way it was possible to do via the pipeline config, but this
change provides a more natural way for Blender developers to set
CMake configuration which is to be enabled on buildbot, but not
on local developer machines.

Pull Request: https://projects.blender.org/blender/blender/pulls/124892
2024-07-17 16:48:18 +02:00
Campbell Barton
eaa5542314 Merge branch 'blender-v4.2-release' 2024-07-16 17:50:47 +10:00
Campbell Barton
bf738fd35a Build: add missing ROCm installation step 2024-07-16 17:50:03 +10:00
Campbell Barton
355aced2c4 Cleanup: various non-functional changes, remove redundant null check 2024-07-13 16:56:55 +10:00