Commit Graph

3863 Commits

Author SHA1 Message Date
Bastien Montagne
35f4cd0655 Fix (unreported) fully broken 'set custom envvars' feature for unittests.
A typo in `blender_test_set_envvars` cmake function made it impossible
for calling CMake code to specify custom environment variables.

Noticed that because trying to enable `WITH_UI_TESTS` option was
running my system Blender 4.0 instead of current build...

NOTE: This also revealed another issue (missing file in our Weston
library), will be fixed soon by Linux library maintainer.
2024-10-15 18:16:09 +02:00
Jonas Holzman
bb672a7e7c Build: macOS: Fix shared library rpath length padding error
This commit adds the `-headerpad_max_install_names` to the macOS
`make deps` dependencies build linker flags.

This fixes dependency install errors where the Xcode `install_name_tool`
couldn't properly set certain rpath paths when they were exceeding a
certain length. With this flag ensuring that the maximum amount of
padding is reserved for eventual path changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128959
2024-10-14 14:31:00 +02:00
Campbell Barton
4b1b1b52db Merge branch 'blender-v4.3-release' 2024-10-14 21:50:58 +11:00
Campbell Barton
f8a29ccab5 Update autopep8 1.6.0 -> 2.3.1, remove outdated "toml" module
Bump autopep8 as there has been various improvements & bug-fixes.
Also update pycodestyle 2.8 -> 2.12.1.

autopep8 imported a module "toml" which has been superseded by
Python's own "tomllib". The "toml" module has been removed.

Ref !127553
2024-10-14 21:50:01 +11:00
Clément Foucault
d8ccaa62fb Merge branch 'blender-v4.3-release'
# Conflicts:
#	tests/data
2024-10-11 14:11:58 +02:00
Sebastian Parborg
8bf865e567 install_linux_packages.py: Bump Python minor version 2024-10-11 12:37:37 +02:00
Sergey Sharybin
3f4420247c Merge branch 'blender-v4.3-release' 2024-10-09 09:50:18 +02:00
Sergey Sharybin
33320b50dd Build: Move WIX installer files to release/windows/installer_wix
This allows the files to be re-used between x64 and amd64 builds
for Windows.

This adds 500 kilobyte of files, but they almost never change, they
are required for releases anyway, and having them in the repo solves
all sort of synchronization problems.

A new graphics is now used, as it was long requested by the UI and
release/PR team.

Pull Request: https://projects.blender.org/blender/blender/pulls/128588
2024-10-09 09:49:43 +02:00
Campbell Barton
f3c2deac3e Cleanup: replace U+00A0 with space
Using ASCII space is sufficient in source.
2024-10-09 16:34:39 +11:00
Germano Cavalcante
ae5e72432b Merge branch 'blender-v4.3-release' 2024-10-08 22:18:52 -03:00
Ray Molenkamp
e29cd8604f deps: tbb_win64 fix tbbmalloc proxy on win11
backport of upstream PR

https://github.com/oneapi-src/oneTBB/pull/1478

not applicable to any other platforms than win64
2024-10-08 18:12:08 -06:00
Campbell Barton
e7e477f2b3 Cleanup: use lowercase function names in CMake 2024-10-08 09:41:50 +11:00
Clément Foucault
62af6d467d CMake: Set GENERATED property to processed GLSL file 2024-10-07 15:55:29 +02:00
Sergey Sharybin
ba98ec4a43 Merge branch 'blender-v4.3-release' 2024-10-07 11:23:34 +02:00
Alaska
02973568d6 Cycles Build: Add OptiX 7.4 to FindOpitX.cmake
This helps users building Blender on their own machine get OptiX 7.4
setup for Cycles.

Pull Request: https://projects.blender.org/blender/blender/pulls/128682
2024-10-07 11:22:57 +02:00
Sergey Sharybin
27425b59d7 Merge branch 'blender-v4.3-release' 2024-10-04 17:06:57 +02:00
Sergey Sharybin
4187644215 Build: Fix x64 libraries used by lib_update.cmd on WoA
Use the same logic as in check_libraries.cmd

Pull Request: https://projects.blender.org/blender/blender/pulls/128600
2024-10-04 17:06:15 +02:00
Clément Foucault
0bfd5e3536 GPU: Add GLSL preprocessor
This splits the GLSL processing into its own file
as it will grow in complexity.

Removes the complexity from `datatoc` and chain them
during the build process.

Rel #128076

Pull Request: https://projects.blender.org/blender/blender/pulls/128261
2024-10-04 11:33:21 +02:00
Sergey Sharybin
af19a48e80 Merge branch 'blender-v4.3-release' 2024-10-04 11:16:37 +02:00
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
9a3c6ff420 Merge branch 'blender-v4.3-release' 2024-10-04 11:09:23 +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
fef934c56e Merge branch 'blender-v4.3-release' 2024-10-04 09:58:06 +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
9db8cb5ae4 Merge branch 'blender-v4.3-release' 2024-10-03 12:19:09 +10:00
Campbell Barton
952e1d46d1 Cleanup: match declaration names, avoid shadowing & clear trailing space 2024-10-03 12:12:08 +10:00
Thomas Dinges
4c47c7e634 Revert "Release cycle: Blender 4.3 Beta"
This reverts commit 906bc801f4.
2024-10-02 12:35:26 +02: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