Commit Graph

3756 Commits

Author SHA1 Message Date
salipourto
0b20c28875 Cycles: HIP support for AMD Strix APUs
This required various compiler and SDK updates
* HIP on Windows updated to 5.7.3
* HIP on Linux updated to 6.3.1
* HIP-RT updated to version 2.0.e1ff193

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/123256
2024-06-19 20:54:04 +02:00
Brecht Van Lommel
20de5647e3 Build: Add /opt/rocm as hint for finding HIP compiler 2024-06-19 19:35:36 +02:00
Attila Áfra
dfd9f9066b Build: Upgrade OIDN to 2.3.0 final
This upgrades OIDN to the final 2.3.0 release.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/123433
2024-06-19 17:53:40 +02:00
Brecht Van Lommel
cddcef6500 Build: Support building with older ffmpeg precompiled libraries
For more convenient bisecting
2024-06-17 14:13:19 +02:00
Campbell Barton
8ab246ddde Build: fix linking FFMPEG & x265 on Linux 2024-06-15 14:15:53 +10:00
Brecht Van Lommel
87dae7d800 Build: Clean up oneAPI cmake messages
* Always define root directories in LIBDIR even when not needed,
  to silence some warnings.
* Only show warnings about not finding libs when oneAPI is enabled.
* Prefix message for context.
2024-06-12 19:21:43 +02:00
Campbell Barton
a5f331afc0 Fix linux build error in x265.cmake
The `ar` wrapper script wasn't handling arguments correctly,
causing it not to merge x265 static libraries.
2024-06-12 10:30:31 +10:00
Ray Molenkamp
a309b4c8d1 deps/win: Fix failing script_bundled_modules test in debug build
The resulting .pyd files for a debug build had wrong filenames.
MaterialX and OpenImageio used incorrect soabi tags, while usd
had a double _d_d postfix.

These changes should not affect linux+mac
2024-06-10 08:38:50 -06:00
Ray Molenkamp
9a71bc176b deps: Fix osl build
OSL needs to know where to find deflate, this was
mentioned during review but not addressed before landing,
my bad.
2024-06-07 07:37:13 -06:00
Ray Molenkamp
9f1f869e16 make.bat: Enable .py formatting with make format
autopep8_format_paths.py was never wired up in the windows tooling,
this PR wires it up, to get around a 8191 limitation for command
lines on windows an alternative "--no-subprocess" option has been
introduced to call the pep8 module directly from python.

TODO: A subprocess is still used for getting the version information

Contributors:

- @campbellbarton fixes to autopep8_format_paths.py to support
  the -no-subprocess option.

Pull Request: https://projects.blender.org/blender/blender/pulls/120794
2024-06-06 09:10:19 -06:00
Ray Molenkamp
f510722a20 deps: change opencollada to maintained branch
the branch @aras_p maintains has either updated or removed
all problematic dependencies

Pull Request: https://projects.blender.org/blender/blender/pulls/122270
2024-06-06 08:32:33 -06:00
Ray Molenkamp
880193d689 Deps: add libx265 build support
This updates the deps builder only, further integration into blender
is still needed to expose it in blender itself.
2024-06-05 09:29:28 -06:00
Thomas Dinges
618c497801 Release: Updates for the 4.2 branch
* Version bumps and pointing gitmodules to the branch.
* Splash screen by Blender Studio (studio.blender.org)
2024-06-05 12:31:19 +02:00
Brecht Van Lommel
dd6b535521 Build: Add USD patch to fix issues with MaterialX EDF on Metal
Ref #122575, #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/122725
2024-06-04 18:59:45 +02:00
Xavier Hallade
8fa578dcc2 Build: Backport sse2neon MSVC compiler fixes to Embree
https://github.com/DLTcollab/sse2neon/pull/588

Pull Request: https://projects.blender.org/blender/blender/pulls/122242
2024-06-04 18:26:06 +02:00
Xavier Hallade
d690b08c1f Build: Upgrade Embree to 4.3.2-blender release 2024-06-04 18:25:57 +02:00
Xavier Hallade
d8b3f852b9 Build: Upgrade DPC++ compiler to 5.2 release 2024-06-04 18:25:57 +02:00
Ray Molenkamp
259367db37 make.bat: update location of addons folder
The addons folder no longer exists, the addons_core folder must be
checked now instead when displaying the hashes.
2024-06-04 07:36:02 -06:00
Ray Molenkamp
8db709e149 deps: oiio, openexr, tiff updates
OpenimageIO v2.5.11.0
OpenEXR 3.2.4
LibTIFF 4.6.0

This updates OIIO and resolves some CVE's in openexr and libtiff.

some patches that were merged upstream have been removed

Pull Request: https://projects.blender.org/blender/blender/pulls/121823
2024-06-04 14:46:52 +02:00
Ray Molenkamp
e8fe320ea0 deps: USD 24.05
- some of the arm patches are no longer needed
- Core Profile updated from upstream PR #2550 (Thanks brecht)
- Needs blender PR #121636 to build blender
- Needs blender PR #121668 to pass the tests

Pull Request: https://projects.blender.org/blender/blender/pulls/121702
2024-06-04 14:40:34 +02:00
Bastien Montagne
8501472c81 install_linux_packages: Update some lib versions for 4.2 release.
* OpenEXR: 3.2.4
* OIIO: 2.5.11
* USD: 24.05
* Embree: 4.3.2
* OIDN: 2.3.0
* Level Zero: 1.16.1.

Ref. #118455
2024-05-31 16:34:49 +02:00
Brecht Van Lommel
97acee6e68 Cleanup: make format 2024-05-27 12:24:16 +02:00
Brecht Van Lommel
412671a765 Fix: Wrong python tag version in bpy pip package
Did not cause known issues, but better to be right.
2024-05-27 11:58:49 +02:00
Brecht Van Lommel
ef5e04c02e Fix #120181: bpy pip package not installing on macOS
Since macOS 11, the minor version should be zero. Previously 10.x were
major releases.
2024-05-27 11:58:49 +02:00
Sergey Sharybin
a7793a871b Libs: Enable threads support for FFTW library
It originally came from the Compositor work about optimizing Glare
node (#121653), but it might be used in more places later as well.

This PR only contains changes to the build system, the library
itself needs to be re-compiled.

Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/121816
2024-05-24 10:08:14 +02:00
Campbell Barton
701acd01b1 Build: fix building OIDN on Linux
Linux needed an include for std::thread.
2024-05-24 09:28:45 +10:00
Omar Emara
d4bf23771d Compositor: Optimize Fog Glow Glare node
This patches optimizes the Fog Glow Glare node to be about 25x faster
for 4K images. This is mainly achieved by utilizing the FFTW library and
multi-threading support code. Further improvements are still possible by
caching kernels, but the CPU compositor does not support caching yet.

The old Hartley transform was removed, so the node no longer works when
FFTW is disabled as a build time option, much like the OIDN node. A new
BLI library was introduced for FFTW, it includes some helper routines
relevant for FFTW as well as an initialization routine that sets up
multithreading using TBB as well as thread safety.

Build system support for threaded FFTW was also added, which defines the
relevant variables to detect threading support as well as add the
relevant libraries.

We do not currently have the threaded FFTW libs in our precompiled libs,
so the threading code is disabled until the libs lands in the coming
weeks. So currently, the code is only about 9x faster.

The only functional change is that the kernel is now odd sized, which
should produce more accurate results, but the final result is almost
identical and mostly undetectable.

The plan is to port this to the GPU as well similar to how we implement
OIDN until we have a GPU FFT implementation. GPU compositor can also do
caching, so it should be faster, being able to compute a 4K image in
under half a second.

Pull Request: https://projects.blender.org/blender/blender/pulls/121653
2024-05-17 12:45:21 +02:00
Campbell Barton
c4a0bbb1f4 Extensions: Support online extensions and move add-ons outside Blender
The extensions system allows to extend Blender with connectivity to the internet. Right now it means Blender can
discover and install add-ons and themes directly from the internet, and notify users about their updates.

By default this is disabled (opt-in), and users can enable it the first time they try to install an extension or visit
the Prefences > Extensions tab. If this is enabled, Blender will automatically check for updates for
extensions.blender.org upon startup.

When will Blender access the remote repositories:

* Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json)
* Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json).
* Every time you start Blender: selected repositories get checked for the latest info (json).

------------------

From the Blender code point of view, this means that most of the add-ons and themes originally bundled with Blender
will now be available from the online platform, instead of bundled with Blender. The exception are add-ons which are
deemed core functionality which just happened to be written as Python add-ons.

Links:
* Original Extenesions Platform Announcement: https://code.blender.org/2022/10/blender-extensions-platform/
* Extensions website: https://extensions.blender.org/
* User Manual: https://docs.blender.org/manual/en/4.2/extensions/index.html#extensions-index
* Technical specifications: https://developer.blender.org/docs/features/extensions/
* Changes on add-ons bundling: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

------------------

This PR does the following:

* Move extensions out of experimental.
* No longer install `scripts/addons` & `scripts/addons_contrib`.
* Add `scripts/addons_core` to blender's repository.

These add-ons will still be bundled with Blender and will be always enabled in the future, with their preferences
moved to be more closely integrated with the rest of Blender. This will happen during the remaining bcon2 period.
For more details, see #121830

From scripts/addons:

* copy_global_transform.py
* hydra_storm
* io_anim_bvh
* io_curve_svg
* io_mesh_uv_layout
* io_scene_fbx
* io_scene_gltf2
* pose_library
* ui_translate
* viewport_vr_preview

Extra: bl_pkg (scripts/addons_contrib)

Note: The STL (legacy) add-on is going to be moved to the extensions platform. There is already a C++ version on core
which is enabled by default.

All the other add-ons are already available at extensions.blender.org. To use them you need to:

* Go to User Preferences > Extensions
* You will be greated with an "Online Extensions" message, click on "Enable Repository".
* Search the add-on you are looking for (e.g, Import Images as Planes).
* Click on Install

Over time their maintaince will be transferred over to the community so their development can carry on. If you used to
help maintain a bundled add-on please read: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

Ref: !121825
2024-05-15 19:26:29 +02:00
Ray Molenkamp
a602e4fa40 CMake: Fix ASAN builds on windows
When building with asan enabled on windows tools such as
msgfmt will run before the install phase which normally
copies the required asan dlls next to the binaries preventing
msgfmt from stating and causing a build error.

This change adds the MSVC path to the PLATFORM_ENV_BUILD_DIRS
so when we run the various tools the asan shared libs can
be found.
2024-05-07 12:19:20 -06:00
Campbell Barton
45fe1dcdf2 cppcheck: exclude file that hangs for hours 2024-05-07 13:07:04 +10:00
Brecht Van Lommel
794df958f6 Build: Explicitly specify Homebrew Bison path on macOS for libs
To avoid using the too old system version.
2024-05-06 19:09:45 +02:00
Brecht Van Lommel
3aa00e14e4 Build: Use CMake for sndfile deps building on all platforms
Resolves issues finding opus, and makes Linux and macOS match
Windows more closely.

Pull Request: https://projects.blender.org/blender/blender/pulls/121401
2024-05-06 17:06:38 +02:00
Attila Áfra
205b909669 Build: Upgrade OIDN to 2.3.0-beta
This updates OIDN to 2.3.0-beta. The final version is planned to be
released in time for Blender 4.2 Beta. The most relevant changes:

1. Much higher quality when denoising with accurate prefiltering in *high*
   quality mode, but at the cost of lower performance (use *balanced*
   quality mode to revert to previous *high* quality mode)
2. Added new *fast* quality mode for 1.5-2x higher performance viewport
   denoising
3. Lazy device module loading to avoid potential stability issues caused by
   drivers of unused devices
4. Release CUDA primary context as soon as the OIDN device gets destroyed
   to prevent potential memory leaks

To enable 2 and 3, code changes are needed in Blender, to be committed
separately.

Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/121359
2024-05-06 14:14:58 +02:00
Campbell Barton
9d6ab4b1dc cppcheck: ignore more checks in the log summary 2024-05-06 11:50:03 +10:00
Campbell Barton
1c50e12d86 cppcheck: support canceling without overwriting the previous log
Without this canceling cppcheck part way through meant comparing old/new
log-files wasn't possible without manual renaming.

Now the new log-files are only written (and previous execution renamed
to ".old.log") once generating the log has completed.
2024-05-06 09:20:02 +10:00
Campbell Barton
28783890b4 cppcheck: exclude noisy unusedPrivateFunction from log summary 2024-04-30 12:52:53 +10:00
Brecht Van Lommel
5a458fe92a Build: Patch OIIO to not load plugins from (DY)LD_LIBRARY_PATH
This can cause crashes when loading incompatible plugins that happen to
be installed in one of the directories.

This change has been merged upstream, but there will likely be no stable
release in time for the next Blender release. So patch locally for now.

Fix #120480: Blender fails to launch on Steam on Arch Linux

Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/121136
2024-04-26 17:02:39 +02:00
Ben-7
0136289cb6 CMake: Windows: clang-cl fixes
Support for building blender with clang on windows on x64 was added
years ago but given there are no active users support has crumbled a
bit.

This PR brings the build system back into working order but upstream
patches in openVDB are still required for a successful build see PR
#120317 for details.

Blender when build with clang the classroom scenes rendered on the cpu
with cycles is seeing a 5% reduction in render time on both an
AMD 7700x and an Intel 14900k.
2024-04-24 15:59:47 +02:00
Sergey Sharybin
c3e1f63635 Build: Add pipeline overrides for Windows arm64 platform 2024-04-19 14:51:35 +02:00
Campbell Barton
06adfcaf38 Cleanup: unused imports 2024-04-19 16:09:30 +10:00
Campbell Barton
0ceefd6358 Cleanup: cmake syntax 2024-04-19 15:50:26 +10:00
Ray molenkamp
39c901407e MSVC: Add cmake option for external manifests
This PR adds a cmake option `WITH_WINDOWS_EXTERNAL_MANIFEST`
which is off by default which addresses the following 2 problems:

The CI env occasionally fails to link the manifest into blender.exe
with mt.exe getting file in use error. The solutions mentioned online
vary wildly between, just rebuild, turn off your AV, use this magic
switch. None of them actually point to a root cause we can address.

When building blender with clang and the visual studio generator
it also somehow doesn't embed the manifest.

If the bots stay problematic this option can be turned on for the CI
environment, and will be automatically turned on when it detects clang
and the visual studio generator being used.

Pull Request: https://projects.blender.org/blender/blender/pulls/111683
2024-04-18 16:57:04 +02:00
Campbell Barton
a7d1bd9735 cppcheck: use source relative paths in the summary
Reduces visual noise & make it more convenient to compare summaries
from different systems.

Also use a more strict regex when checking for error ID's.
2024-04-16 14:50:46 +10:00
Campbell Barton
f6605523e8 cppheck: improvements to checking script
Various changes that simplify running cppcheck, comparing results
from the previous execution.

- Create a summary of the log that groups errors by type,
  useful since some kinds of warnings tend to lead to errors in the
  code more than others.
- Keep a copy of the previous runs logs - useful for comparisons.
- Log the output in the order of the files selected to check.
- Fix non thread-safe output sometimes mixing warnings from different
  processes.
2024-04-14 20:44:03 +10:00
Ray Molenkamp
8b9743eb40 CMake: Change build flags to use SSE42 if available
This cleans up our `TEST_SSE_SUPPORT` macro to only test
for SSE42 and passes the flags to the CMAKE_C/CXX_FLAGS

the cpu check module needed to move to its own folder since
the flags at the end of a CMakeLists.txt appear to be used
for all targets inside a CMakeLists file and cpu_check cannot
be build with sse42 flags.

This only affects Mac/Linux since MSVC has no buildflags
to target SSE42

Pull Request: https://projects.blender.org/blender/blender/pulls/118468
2024-04-11 20:46:14 +02:00
Jeroen Bakker
c15e5116ab Vulkan: MoltenVK Support for Developers
MoltenVK original intent was to let developers work on a mac system developing
for the vulkan eco-system. MoltenVK doesn't support all the features that we
require and would require additional workarounds to be actually supported.

It is not expected that we will release Blender with MoltenVK for this reason.
But it still has value for shader developers to validate shaders on metal and
vulkan on a single platform.

![image](/attachments/9a4a9904-a5f6-4922-896d-744dfb78244c)

Pull Request: https://projects.blender.org/blender/blender/pulls/117940
2024-04-11 11:04:43 +02:00
Campbell Barton
51fd558be2 cppcheck: suppress noisy output
Some of these could be enabled if there is an interest to consider
them warnings, until then they're noisy and don't often hint at errors
in the code.
2024-04-08 12:02:58 +10:00
Campbell Barton
cbee0f5477 cppcheck: update the checking utility to resolve issues in source/
The script to run cppcheck failed for most files in source/ because
of a syntax error in MEM_guardedalloc.h with attribute functions.

Workaround the error by including BLI_compiler_attrs.h directly.

Other changes:

- Specify c++17 / c11 standards for C++ & C.
- Resolve errors from undefined integer ranges.
- Set the check level to exhaustive so checks always run.
- Suppress noisy missingIncludeSystem warning.
- Move run-time compiler defines into a temporary include
  which resolves argument quoting errors when cppcheck is used with
  clang's parser.
2024-04-02 17:02:23 +11:00
Campbell Barton
03d728e281 Cleanup: improve type checking in project_source_info.py
Since the type hints were added it seems mypy has been improved
making it possible to remove the workarounds.
2024-04-02 10:26:14 +11:00
Campbell Barton
ae950451ea Cleanup: remove redundant f-string use 2024-04-01 16:51:32 +11:00