Commit Graph

1572 Commits

Author SHA1 Message Date
Bastien Montagne
4afb48acad Cleanup: Move internal guardedalloc headers to C++.
Pull Request: https://projects.blender.org/blender/blender/pulls/124106
2024-07-03 16:04:18 +02:00
Campbell Barton
a8fae77f10 Cleanup: remove unused icon utilities and make convenience target
Remove utilities to assist in creation of the now removed `*.dat` icons.

Pull Request: https://projects.blender.org/blender/blender/pulls/123837
2024-06-27 18:28:32 +02:00
Bastien Montagne
2afcc9246f Fix (unreported) CMake choosing system wayland paths over pre-built ones.
`find_path` searches for `HINTS` before default system paths, while
`PATHS` are searched last. See also
https://cmake.org/cmake/help/latest/command/find_path.html
2024-06-26 12:17:40 +02:00
Bastien Montagne
73db631440 Fix broken tests build in multi-binaries case.
When `WITH_TESTS_SINGLE_BINARY` is disabled, and `WITH_BUILDINFO` is
enabled, (most of) the generated tests binaries need to link buildinfo.

Pull Request: https://projects.blender.org/blender/blender/pulls/123734
2024-06-26 10:48:15 +02:00
Brecht Van Lommel
3b4d03968b Build: Fix various issue for 4.2 macOS library update
* Auto patch MaterialX cmake config for stripping version from dylib
* Add x265 library
* Fix harvest of OIDN cmake config

Ref #123348
2024-06-21 17:17:21 +02:00
Brecht Van Lommel
20de5647e3 Build: Add /opt/rocm as hint for finding HIP compiler 2024-06-19 19:35:36 +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
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
Xavier Hallade
d8b3f852b9 Build: Upgrade DPC++ compiler to 5.2 release 2024-06-04 18:25:57 +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
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
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
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
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
a654e0dde3 Cleanup: unset temporary variables in CMake 2024-03-14 10:38:15 +11:00
Jesse Yurkovich
5b522359ee Cleanup: Centralize MSVC conformance related cmake items
Move the MSVC conformance flags to a win32-specific central location.

Pull Request: https://projects.blender.org/blender/blender/pulls/119235
2024-03-09 23:42:20 +01:00
Campbell Barton
5214e6f35d Cleanup: unset temporary CMake variables
Also use consistent case (for `_*_SEARCH_DIRS`).
2024-03-08 10:54:56 +11:00
Campbell Barton
0cd414120b Unbreak build on macOS with AppleClang from recent cleanup
Exact an exact match with Clang broke building when the compiler ID
was "AppleClang", reverting parts of [0].

[0]: 6549019ae19cecbea524782054dca0e99cb833b8
2024-03-07 19:56:58 +11:00
Campbell Barton
6549019ae1 Cleanup: use STREQUAL instead of MATCHES for exact comparisons
MATCHES takes a REGEX and searches the input for a match,
this isn't necessary for CMAKE_SYSTEM_PROCESSOR & CMAKE_*_COMPILER_ID.
2024-03-07 17:56:41 +11:00
Campbell Barton
a975c7096a Cleanup: line length in CMake files 2024-03-07 13:26:55 +11:00
Anthony Roberts
445fd42c61 Windows: Add ARM64 support
* Only works on machines with a Qualcomm Snapdragon 8cx Gen3 or above.
  Older generation devices are not and will not be supported due to
  some driver issues
* Requires VS2022 for building.
* Uses new MSVC preprocessor for sse2neon compatibility.
* SIMD is not enabled, waiting on conversion of blenlib to C++.

Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:34 +01:00
Campbell Barton
8c16b612ca Merge branch 'blender-v4.1-release' 2024-03-04 12:53:37 +11:00
Campbell Barton
7e9a36c1fa Cleanup: suppress undefined variable use warnings 2024-03-04 12:51:24 +11:00
Sebastian Parborg
1cdf41a341 Fix: CMake LIBDIR check not working as intended after cleanup
After 65f5e8b775, the LIBDIR cmake check would actually not print any
warnings if the LIBDIR could not be found automatically.
2024-03-01 19:44:02 +01:00
Sebastian Parborg
4b114861c0 Fix: CMake LIBDIR check not working as intended after cleanup
After ca8dc11a85, the LIBDIR cmake check would actually not print any
warnings or error out if the LIBDIR could not be found automatically.

Pull Request: https://projects.blender.org/blender/blender/pulls/118975
2024-03-01 19:37:36 +01:00
Bastien Montagne
c3d3528280 Fix broken CMake file after recent refactor.
Basically all 'normal' builds were erroring in CMake config after
ca8dc11a85.
2024-03-01 12:17:44 +01:00
Campbell Barton
ca8dc11a85 Merge branch 'blender-v4.1-release' 2024-03-01 16:25:29 +11:00
Campbell Barton
65f5e8b775 Cleanup: undefined defined variable warnings with CMake 2024-03-01 16:22:06 +11:00
Falk David
5c7e4e15ca Cleanup: Fix typo 2024-02-28 15:23:09 +01:00
Sebastian Parborg
203d3e0d40 Linux: Don't always enable the CPU checker
When building a non portable build or when not using the precompiled
libraries, do not enable the CPU checker.

Make the cmake configure step error out when building with
WITH_STRICT_BUILD_OPTIONS if the LIBDIR can not be found.

Pull Request: https://projects.blender.org/blender/blender/pulls/118519
2024-02-26 15:41:22 +01:00
Brecht Van Lommel
056becae8a Merge branch 'blender-v4.1-release' into main 2024-02-22 14:36:13 +01:00
Brecht Van Lommel
8dfb87d1af Fix: Update tests data path to new directory 2024-02-22 14:25:54 +01:00
Sergey Sharybin
396348eea9 Merge branch 'blender-v4.1-release' 2024-02-22 13:51:48 +01:00
Sergey Sharybin
3dc832a904 Switch SVN to Git submodules using Git-LFS
This change makes it so build system and update utilities for Blender builds
are using pre-compiled libraries and other resources attached as Git modules
instead of using checkout of SVN repositories in the parent folder.

The directory layout:
```
  * release/datafiles/
    * assets/        -> blender-assets.git
      * publish/
      * ...
      * README.txt
  * lib/
    * darwin_x64/    -> lib-darwin_x64.git
    * darwin_arm64/  -> lib-darwin_arm64.git
    * linux_x64/     -> lib-linux_x64.git
    * windows_x64/   -> lib-windows_x64.git
  * tests/
    * data/         -> blender-test-data.git
```

The changes about configuring the actual Git sub-modules are not included
into this patch, as those require repository to actually exist before it
can be used.

The assets submodule is enabled by default, and the rest of them are
disabled. This means that if someone runs `git submodule update --init`
they will not get heavy libraries. The platform-specific and tests
related submodules are enabled when using `make update` or `make test`.

All the submodules are tracked: this means that when new commits are
done to the submodule, the blender.git repository is to be updated to
point them to the new hash. This causes some extra manual work, but it
allows to more easily update Blender and its dependencies to known good
state when performing operations like bisect.

Ref #108978

Pull Request: https://projects.blender.org/blender/blender/pulls/117946
2024-02-22 13:50:55 +01:00
Aras Pranckevicius
f09c7dc4ba Video: Remove non-ffmpeg AVI support
Blender had a very limited (only uncompressed or MJPEG frames) .avi file
support, for both reading and writing. This is something that ffmpeg can
fully do.

This removes all of that. 3500 lines of code gone, primary motivations being:
- ffmpeg can read and write .avi files just fine, including ones with
  uncompressed or MJPEG frames.
- Blender's ffmpeg integration could also be taught to produce uncompressed or
  MJPEG .avi files, but TBH I don't see a particular reason to do that. Modern
  formats like H264 are better in every way, and already support "lossless"
  option if needed.
- The "Lite" blender build configuration was excluding both ffmpeg and avi
  anyway, so that config is something that can't read nor write any movies.

User visible changes:

- In scene image output type, under Video section now there's only Ffmpeg Video
  (AVI Raw and AVI JPEG are gone)
- Whenever loading an existing file, if output was one of AVI Raw / AVI JPEG,
  it is set to Ffmpeg Video.

Pull Request: https://projects.blender.org/blender/blender/pulls/118409
2024-02-20 13:15:50 +01:00
Brecht Van Lommel
0f2064bc3b Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was 4bf6a2e564ad2.
2024-02-19 15:59:59 +01:00