Commit Graph

3511 Commits

Author SHA1 Message Date
Campbell Barton 6b0769c448 Merge branch 'blender-v4.0-release' 2023-10-17 20:01:00 +11:00
Campbell Barton e21dfb4c42 Correct comment in 5ac392ca40 2023-10-17 19:59:58 +11:00
Campbell Barton 5ac392ca40 Fix #102300: SSL/HTTPS Request Unable to Get Local Issuer Certificate
Resolve an error with SSL using a hard coded path to certificates on
Linux causing HTTPS access to fail.
request.urlopen(..) couldn't access any HTTPS URL's.
2023-10-17 19:58:34 +11:00
Brecht Van Lommel 4fe903bef7 Merge branch 'blender-v4.0-release' into main 2023-10-16 20:10:09 +02:00
Brecht Van Lommel 0c958129a3 Fix deps build issues with Ogg/Vorbis on new Xcode, switch to CMake
These were already building with CMake on Windows, do the same for
Linux on macOS.
2023-10-16 20:09:41 +02:00
Brecht Van Lommel 4a376326c9 Fix OpenImageIO wrong dependency builder hash after repository moved
And update to new URL.
2023-10-16 20:09:41 +02:00
Xavier Hallade ef80392721 Cycles: oneAPI: update windows ocloc to 101.4723
The first public Windows driver version with a higher number is
101.4824, so we bump the min-required driver version on Windows to this
one to ensure compatibility.
2023-10-11 14:47:48 +02:00
Campbell Barton b0a6c6c1de Merge branch 'blender-v4.0-release' 2023-10-11 10:44:23 +11:00
Campbell Barton 58442a420e Cleanup: comment for release configuration, quote-style & remove parens 2023-10-11 10:41:16 +11:00
Brecht Van Lommel 03b2523df8 Merge branch 'blender-v4.0-release' into main 2023-10-09 16:14:39 +02:00
Brecht Van Lommel c3c631ebcf Build: make Linux cmake release config consistent with buildbot
Enable dynamic sound library loading so that "make release" produces
binaries that are as portable as buildbot builds.

Remove unnecessary linker flags that are already set by default, and
don't specifiy explicit lib directoy since it is also found by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/113360
2023-10-09 14:41:34 +02:00
Campbell Barton 0c91466785 GHOST/Wayland: remove WITH_GHOST_WAYLAND_DBUS
This was only used for accessing cursor themes which only worked
with gnome and wasn't used in official releases.
Use the default theme or the theme defined by XCURSOR_THEME.

Eventually wp_cursor_shape_manager_v1 can be supported which avoids
having to access the theme.
2023-10-07 21:31:15 +11:00
Campbell Barton f482e5979d CMake: set_and_warn_incompatible now warns if arguments are undefined
Previously this caused an error which can happen on other platforms that
don't define the features being checked.
2023-10-07 21:22:13 +11:00
Campbell Barton 1dafc2786f CMake: fix building on macOS 2023-10-07 20:21:52 +11:00
Campbell Barton 149d80946e Cleanup: CMake formatting 2023-10-07 19:46:38 +11:00
Campbell Barton 833eddafa3 CMake: add set_and_warn_incompatible macro, use for HEADLESS & GHOST_SDL
When WITH_GHOST_SDL or WITH_HEADLESS were used, the message didn't make
much sense, especially since the features warned about weren't
necessarily enabled or even supported by the platform.

Replace with a `set_and_warn_incompatible` macro which only reports
configuration changes based on incompatible features.
2023-10-07 19:11:51 +11:00
Campbell Barton b434d40dbf CMake: quiet noisy messages on every run
Printing that a library is found every time CMake runs isn't helpful.
Restrict these messages for the first execution so messages are limited
to information developers may need to know such as features being
disabled because of incompatible configurations.
2023-10-07 18:20:30 +11:00
Jeroen Bakker 1aca58cf16 Vulkan: Enable as Experimental Option
This PR enables vulkan backend as experimental option.
It will only be available in alpha builds on Linux and Windows.

This option is highly experimental and enabled to get some insight
on supported platforms. Don't expect a fully working Blender
yet. Also don't expect it to have usable performance.

**What is known to not work?**

* OCIO textures are not supported on Intel and AMD GPUs. sRGB/Standard is supported
  on those platforms.
* AMD Polaris based GPUs on Linux will generate a crash when drawing the 3d cursor as it
  doesn't support the needed vertex format. Comment out `DRW_draw_cursor` in `DRW_draw_region_info`.
* The colors in the node editor and sequencer are of as sRGB viewports aren't detected correctly.
* The image / UV editor isn't working as many texture formats haven't been tested yet. Some
  tweaks are also needed to do correct depth testing.
* 3D Viewport is known to be flickering. Sometimes workbench doesn't display anything.
* 3D Viewport wireframe will crash as it uses a framebuffer with gaps between color attachments,
  which isn't supported yet. (#113141)
* Rotate the view widget is partially drawn due to incompatible depth clipping.
* GPU Selection isn't working. It is expected to be solved when Overlay-Next will become the
  default engine. For now disable GPU depth picking in the preferences.
* Cycles/EEVEE are known to not work with Vulkan yet. Cycles requires Vulkan Pixel Buffer.
   Cuda <-> Vulkan interop might require a different approach than OpenGL as Vulkan doesn't allow
  importing memory from a Cuda context. EEVEE uses features that aren't available yet in the backend
* Workbench is working, except Workbench shadows.
* EEVEE-Next basics are working. Shadows, lights are known to be not working. Materials/Shading
  works in simple scenes. Changes are expected in EEVEE-Next that will break Vulkan compatibility
  in the near future.
* Systems with multiple GPUs is not expected to work.
* Wayland support is in development and requires some iterations. You can start Blender, but
  the protocols are not aligned yet.
* OpenXR hasn't been modified and is expected to fail.
* The backend is very strict when mis-using the GPU module. In debug builds it may crash
  on asserts.
* Older drivers/GPUs might not have all the features that we require. The workarounds
  for the missing features still need to be implemented.

**A word about performance**

In the project planning we focus first on stability and platform support. The performance of Vulkan is
around 20% of what we want to achieve. The reason is that each command sent to the
GPU is done one at a time. The implementation even waits until we have feedback that the GPU
is idle again.

Geometry is currently stored in System RAM. The GPU will read and cache the data when
accessing geometry. This slows down when using objects with much geometry.
Some performance features like MDI (Multi-Draw-Indirect) hasn't been implemented and
falls back to Single Draw Indirect.

**Why enable it is an experimental option?**

* Ensures that new features are being tested with Vulkan
* Ensure that building with Vulkan is possible on supported platforms
* Get feedback from developers if Vulkan can run on their system or that
  there are special cases that we are not aware of. Main development
  environment has been Linux/X11 with occasionally testing using Windows.
* Validate Add-ons that use the `gpu` module.
* Possible to enable GLSL validation on the buildbot. (Needs more work).
* Does it compile on all machines or does it require more changes to cmake
  config. We expect it to be able to compile without installing the Vulkan SDK.
  The Vulkan SDK is a very powerful tool, but only when actually doing GPU
  development. Otherwise it is an overhead which slows down other
  activities.

**How can the backend be enabled?**

Currently the Vulkan backend can be enabled per Blender session by starting
using the command line argument `--gpu-backend vulkan`. In the future, when
the backend is more mature, we will add a user preference to switch between
OpenGL and Vulkan.

Pull Request: https://projects.blender.org/blender/blender/pulls/113057
2023-10-06 15:24:21 +02:00
Campbell Barton c5d01df691 Merge branch 'blender-v4.0-release' 2023-10-06 21:48:34 +11:00
Campbell Barton 8974ca8f24 Tools: set the number of jobs to the CPU count for various utilities
Previously this was the double the CPU count because:

- Modern CPU's from AMD & Intel support SMT/hyper-threading which
  present twice as many cores, doubling again has little to no benefit.
- Using 2x or 4x the number of physical cores number can use a lot of
  memory on systems with many cores which are becoming more common.
2023-10-06 21:47:03 +11:00
Campbell Barton 273af6855a CMake: cache the HAVE_BROTLI result
Avoid detecting HAVE_BROTLI every time CMake runs,
only re-detect if the freetype includes change.
2023-10-06 17:58:26 +11:00
Campbell Barton a03b1e5df5 Merge branch 'blender-v4.0-release' 2023-10-05 10:51:48 +11:00
Campbell Barton 2f71d9f807 Build: quiet GCC warning for extern/fmtlib 2023-10-05 10:50:58 +11:00
Ray Molenkamp 384d9c9a07 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-09-27 18:03:38 -06:00
Ray Molenkamp 751c9ef620 CMake/MSVC: Fix build error for RelWithDebInfo configuration
CMake decided to link the Debug libs for MaterialX because no specific
RelWithDebInfo configuration was provided, strange default imho but
not difficult to fix.
2023-09-27 18:03:16 -06:00
Hans Goudey afaa30b1eb Merge branch 'blender-v4.0-release' 2023-09-27 18:22:16 -04:00
Hans Goudey 1badb464b0 Fix: Compile error from unused module requested in CMake
The `clangSupport` module isn't provided in the precompiled
libraries anymore, and Blender compiles without it.

Pull Request: https://projects.blender.org/blender/blender/pulls/112981
2023-09-27 23:58:03 +02:00
Thomas Dinges ab26ddc455 Revert "Release cycle: Bcon3 for Blender 4.0"
This reverts commit 8c25952886.
2023-09-27 12:53:52 +02:00
Thomas Dinges 8c25952886 Release cycle: Bcon3 for Blender 4.0 2023-09-27 12:52:04 +02:00
Brecht Van Lommel 2ed8df333b Fix Hydra not being disabled when USD library not found on Linux 2023-09-26 18:53:05 +02:00
Ray Molenkamp 974bb38c51 CMake: Update platform_win32.cmake with webp 1.3 support
WebP 1.3 changed the library filenames to include a lib prefix and
added an additional library.
2023-09-22 08:59:03 -06:00
Ray Molenkamp 3735a4d104 deps_builder: Fix missing Webp support in OIIO build on windows
webp 1.3 changed the filenames on windows to include a `lib` prefix
(ie libwebp.lib rather than webp.lib) now this is a common thing
on linux and cmake has a `CMAKE_FIND_LIBRARY_PREFIXES` variable that
has a list of prefixes to look for during a `find_library` call.

`CMAKE_FIND_LIBRARY_PREFIXES` gets set during the call to the
`project` method in the main CMakeLists of a project. Now for windows
`lib` is *not* a common prefix by CMake, and it doesn't add "lib" to
CMAKE_FIND_LIBRARY_PREFIXES during that call.

so find library doesn't look for it, the libs are not found and an
unhappy time is had by all. Now the most obvious solution would be to
pass `-DCMAKE_FIND_LIBRARY_PREFIXES=lib` to CMake to sidestep this
however, the `project` call will set the variable overwriting
anything you passed through the CLI.

So the fix here is to have `find_library` counter-intuitively look
for both `libwebp` and `webp`
2023-09-22 08:47:23 -06:00
Ray Molenkamp af9523d7c2 deps_builder: OIIO validate deps at configure time
The last webp update changed the filenames of the webp libraries
on windows causing oiio not to find them and oiio silently build
without webp support, which only came to light after all of
blender was build and a test failed.

This change makes the OIIO validate and error out if certain
dependencies are not found at configure time so these mistakes
are caught early.
2023-09-22 08:32:26 -06:00
Brecht Van Lommel 3d15a07bde Revert "install_linux_packages: Raise LLVM default version to 15.0.7."
This reverts commit 607adbca47.

The LLVM upgrade is being postponed to 4.1.

Ref #109244
2023-09-21 18:46:30 +02:00
Brecht Van Lommel f0840cee2a Build: update 4.0 libraries to address CVEs and bugs
And ignore a few CVEs that do not affect Blender.

openimageio 2.4.15
openssl 3.1.2
python 3.10.13
sndfile 1.2.2
webp 1.3.2

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/112529
2023-09-21 17:02:46 +02:00
Brecht Van Lommel d387ef224f macOS: upgrade to Xcode 15
For Blender 4.0 only, 3.3 and 3.6 keep using the older Xcode version.

The new linker in Xcode 15 gives many warnings due to duplicated
libraries, generated by CMake to resolve circular dependencies. For now
use the old linker to silence these warnings.

Remove legacy flags for libc++, this is the default for a long time and
generates warnings with the new linker.

Reason for upgrade is to take advantage of MetalRT curve support.

Pull Request: https://projects.blender.org/blender/blender/pulls/110243
2023-09-20 16:25:14 +02:00
Ray Molenkamp bf9b699089 Fix: make.bat showhash
This broke when we moved the submodules around and no one ever noticed

This will now list:
-The current branch
-The current branch hash
-Addons branch
-Addons branch hash
-Libs url
-Libs revision
-Libs last-changed-date

So it'll be a little easier to diagnose what exactly the state of
things are when someone asks for help building.
2023-09-16 10:32:30 -06:00
Ray Molenkamp cf973a2d16 deps_builder: Fix zlib URI
zlib's uri is a bit unstable as when they release a new version they
move the last release "elsewhere"

This change switches the upstream URI over to github, which should be
a bit more reliable.
2023-09-12 10:23:03 -06:00
bsavery 281fbf72f0 Cycles: support building with Windows ROCm 5.5 SDK
The official SDK was released, add correct paths for that version. The
old paths can be removed once the buildbot uses this SDK.

The SDK installer sets a HIP_PATH environment variable. This is used to
automatically detect the location when HIP_ROOT_DIR is not manually
specified.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/110519
2023-09-07 17:22:18 +02:00
Brecht Van Lommel 526f935981 Fix broken OPTIX_ROOT_DIR environment variable for setting up build
Changes in 42713bf made it ignore the environment variable if there is a
defined but empty CMake variable. Also make similar changes for other
GPU compute APIs, to guard against future problems like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111928
2023-09-04 17:28:00 +02:00
Brecht Van Lommel 19da2fba83 Fix macOS Arm build of OSL library dependency
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
2023-09-04 15:08:02 +02:00
Xavier Hallade 400f7c22bc Cycles: update ocloc to 101.4369 on Windows
As discussed on #108314, oidn 2.0 needs an updated version of ocloc.
No need to bump the min required driver version as it's already
high enough on Windows (101.4644).

Pull Request: https://projects.blender.org/blender/blender/pulls/111729
2023-09-01 15:21:54 +02:00
Marcos Perez 1015bed2fd VSE: Sound equalizer modifier
The sound equalizer is using the Audaspace FFT Convolver.
The blender part creates an array of descriptions of power per "band"
and orders the creation of Equalizer (ISound) in the Audaspace.

Modifier can be created on sound strips. It lets you define
amplification or attenuation over frequency range from 30Hz to 20 kHz.
The power is limited to -30 db - 30 db. This is done using curve
mapping widget.

Co-authored-by: menda <alguien@aqui.es>
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/105613
2023-08-30 22:36:36 +02:00
Brecht Van Lommel 62c898f2e0 Fix (DY)LD_LIBRARY_PATH ignored for oslc and shader builder in build
Accidentally used CMake instead of environment variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/111234
2023-08-30 17:00:02 +02:00
Campbell Barton 46edf61180 CMake: adjust the error message when a non-default version wasn't found
The error message was written assuming the default version was set,
making the error confusing.
Adjust the error message when the non-default version is missing.
2023-08-30 15:20:50 +10:00
Campbell Barton 3de8900ed6 Cleanup: spelling in comments 2023-08-25 09:40:42 +10:00
Bastien Montagne 607adbca47 install_linux_packages: Raise LLVM default version to 15.0.7.
Following specs from #109244 for Blender 4.0.
2023-08-24 22:55:56 +02:00
Campbell Barton b8054b0cb2 Cleanup: white-space for UNIX platform error messages 2023-08-24 10:37:52 +10:00
Campbell Barton 20b4a77872 datatoc: exclude the initial C-style comment from GLSL/MSL/Cuda files
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros:
data_to_c_simple & data_to_c.

Strip leading C-style comments that don't bloat binary size.
Comments are replaced with blank lines so line numbers in error messages
match. Reduces Blender's binary size by ~70kb.
2023-08-19 17:57:12 +10:00
Ray Molenkamp e7c94b35b8 Fix: Missing PDB on windows
Missed one cmake check in 0df3aedfa8
2023-08-19 00:09:19 -06:00