Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-28MSVC: promote C4033 to an errorRay Molenkamp
C4033 'function' must return a value is a MSVC level-1 warning, clang and GCC treat this as an error however, this change promotes it to an error as well for MSVC to mimic the GCC behaviour.
2022-09-27Cycles: add Path Guiding on CPU through Intel OpenPGLSebastian Herhoz
This adds path guiding features into Cycles by integrating Intel's Open Path Guiding Library. It can be enabled in the Sampling > Path Guiding panel in the render properties. This feature helps reduce noise in scenes where finding a path to light is difficult for regular path tracing. The current implementation supports guiding directional sampling decisions on surfaces, when the material contains a least one diffuse component, and in volumes with isotropic and anisotropic Henyey-Greenstein phase functions. On surfaces, the guided sampling decision is proportional to the product of the incident radiance and the normal-oriented cosine lobe and in volumes it is proportional to the product of the incident radiance and the phase function. The incident radiance field of a scene is learned and updated during rendering after each per-frame rendering iteration/progression. At the moment, path guiding is only supported by the CPU backend. Support for GPU backends will be added in future versions of OpenPGL. Ref T92571 Differential Revision: https://developer.blender.org/D15286
2022-09-27Cleanup: remove workarounds and version checks for unsupported compilersCampbell Barton
Match minimum supported versions from the WIKI [0] by raising them to: - GCC 9.3.1 - CLANG 8.0 - MVCS 2019 (16.9.16 / 1928) Details: - Add CMake checks that ensure supported compiler versions early on. - Previously GCC per-processor version checks served to exclude `__clang__`, in some cases this has been replaced by explicitly excluding `__clang__`. This was needed as CLANG treated some of these flags differently to GCC, causing the build to fail. - Remove USE_APPLE_OMP_FIX GCC-4.2 OpenMP workaround. - Remove linking error workaround for old MSVC versions. [0]: https://wiki.blender.org/wiki/Building_Blender Reviewed by: brecht, LazyDodo Ref D16068
2022-09-23Cleanup: use lowercase function calls & macros in for CMakeCampbell Barton
This is already the case for most CMake usage. Although some find modules are an exception to this, as they were originally maintained externally they use some different conventions. Also corrected bad indentation in: intern/cycles/CMakeLists.txt
2022-09-18Build: fix gtest build flags affecting actual libraryBrecht Van Lommel
Switch to target_ functions to avoid this.
2022-09-18Build: limit Py_ENABLE_SHARED to modules using Python headersBrecht Van Lommel
And remove Python flags from nodes, no longer needed.
2022-09-18Build: disable gtests entirely for Python moduleBrecht Van Lommel
To avoid test failure on Windows.
2022-09-13Cleanup: improve titles for CMake sections, line lengthCampbell Barton
Also use same convention for comments as (space after #).
2022-09-10Python: on macOS, stop requiring framework for building bpy moduleBrecht Van Lommel
Build against Python from precompiled libraries by default, instead of requiring framework from python.org package install. The resulting bpy module can still be used with any Python install of the same version. Use the same CMake find module as Linux. This simplifies code, and makes it possible to manually set PYTHON_* variables in CMake configuration. Remove WITH_PYTHON_FRAMEWORK option for regular Blender build, as this doesn't work well due to missing required Python packages. Advanced users can still set PYTHON_ROOT_DIR=/Library/Frameworks/Python.framework/Versions/3.10 for the same result.
2022-09-09Cleanup: cmake line length, wrappingCampbell Barton
2022-08-29Cycles: add option to specify OptiX runtime root directoryBrecht Van Lommel
This allows individual users or Linux distributions to specify a directory Cycles will automatically look for the OptiX include folder, to compile kernels at runtime. It is still possible to override this with the OPTIX_ROOT_DIR environment variable at runtime. Based on patch by Sebastian Parborg. Ref D15792
2022-08-23Build: add system for shipping with dynamic libraries on Linux and macOSBrecht Van Lommel
PLATFORM_BUNDLED_LIBRARIES gathers shared libraries that will be installed to the lib/ folder. The Blender executable gets a relative rpath pointing to this folder as part of the install step. The build rpath is different and uses absolute paths, so that it works for executables like tests that are in different locations, and to support the case where the build and install folders are different. The system is already used for the OpenMP library on macOS. But on Linux it will only kick in once we start using shared libraries for dependencies. This also removes Mesa libraries from the old location, as these would cause Blender to start with software OpenGL. Ref T99618
2022-08-18CMake: support building with musl libclistout
Instead of using macros like GLIBC we can use the CMake build systems internal functions to check if some header or functions are present on the running system's libc. Add ./build_files/cmake/have_features.cmake to add checks for platform features which can be used to set defines for source files that require them. Reviewed By: campbellbarton Ref D15696
2022-08-15Introduce headless OpenGL rendering on LinuxSebastian Parborg
With this patch true headless OpenGL rendering is now possible on Linux. It changes the logic of the WITH_HEADLESS build flag. The headless backend is now always available with regular builds and Blender will try to fall back to it if it fails to initialize other backends while in background mode. The headless backend only works on Linux as EGL is not used on Mac or Windows. libepoxy does support windows and mac, so this can perhaps be remedied in the future. Reviewed By: Brecht, Jeroen, Campbell Differential Revision: http://developer.blender.org/D15555
2022-08-15Cleanup OpenGL linking and related code after libepoxy mergeSebastian Parborg
This cleans up the OpenGL build flags and linking. It additionally also removes some dead code. One of these dead code paths is WITH_X11_ALPHA which actually never was active even with the build flag on. The call to use this was never called because the default initializer for GHOST was set to have it off per default. Nothing called this function with a boolean value to enable it. These cleanups are needed to support true headless OpenGL rendering. Without these cleanups libepoxy will fail to load the correct OpenGL Libraries as we have already linked them to the blender binary. Reviewed By: Brecht, Campbell, Jeroen Differential Revision: http://developer.blender.org/D15554
2022-08-15GPU: replace GLEW with libepoxyChristian Rauch
With libepoxy we can choose between EGL and GLX at runtime, as well as dynamically open EGL and GLX libraries without linking to them. This will make it possible to build with Wayland, EGL, GLVND support while still running on systems that only have X11, GLX and libGL. It also paves the way for headless rendering through EGL. libepoxy is a new library dependency, and is included in the precompiled libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed. Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton and Sergey Sharybin. Ref T76428 Differential Revision: https://developer.blender.org/D15291
2022-08-09Compositor: Rename compositor build optionOmar Emara
Currently, the compositor can be disabled using the WITH_COMPOSITOR build option. Since, we intent to always build the realtime compositor, we need to make the distinction between both compositors clear. So this patch renames the option to WITH_COMPOSITOR_CPU. Additionally, the check for the option was moved inside the compositor modules' own CMake file in preparation for the realtime compositor code. Differential Revision: https://developer.blender.org/D15622 Reviewed By: Jeroen Bakker, Ray Molenkamp
2022-08-09Cleanup: CMake file indentationCampbell Barton
2022-08-03Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15588
2022-07-15Fix T99706: Crash rendering with headless buildsCampbell Barton
When rendering with headless builds, show an error instead of crashing. Previously GPU_backend_init was called indirectly from DRW_opengl_context_create, a new function is now called from the window manager (GPU_backend_init_once), so it's possible to check if the GPU has a back-end. This also disables the `bgl` Python module when building WITH_HEADLESS. Reviewed By: fclem Ref D15463
2022-07-15GPU: Remove USD dependency from shader_builder.Ray Molenkamp
Dependency was added as shader builder depended to blenkernel as an umbrella, in stead of adding the actual dependencies it required.
2022-07-11GPU: add BUIDTIME to WITH_GPU_SHADER_BUILDERJeroen Bakker
Adds a better name that describes when it is used. The GPU_SHADER_BUILDER is a buildtime tool for developers to pre-validate GLSL (and in the overseen future pre-compile to SpirV). We don't see that this needs to become a required step in the future so WITH_GPU_BUILDTIME_SHADER_BUILDER is more descriptive name.
2022-07-11GPU: Do not allow GPU Shader builder when USD is enabled.Jeroen Bakker
Linking GPU shader builder requires stubs for many functions of the USD library. We don't want to rely on other modules to update the stubs for a tool that is only used by GPU developers. This patch raises an error when both WITH_GPU_SHADER_BUILDER and WITH_USD are enabled. This reduces the maintenance of updating the stubs when USD API changes. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D15422
2022-07-06GHOST/Wayland: support dynamic loading libraries for WaylandCampbell Barton
Add intern/wayland_dynload which is used when WITH_GHOST_WAYLAND_DYNLOAD is enabled (off by default). When enabled, systems without Wayland installed will fall back to X11. This allows Blender to dynamically load: - libwayland-client - libwayland-cursor - libwayland-egl - libdecor-0 (when WITH_GHOST_WAYLAND_LIBDECOR is enabled).
2022-06-29Cycles: Add support for rendering on Intel GPUs using oneAPIXavier Hallade
This patch adds a new Cycles device with similar functionality to the existing GPU devices. Kernel compilation and runtime interaction happen via oneAPI DPC++ compiler and SYCL API. This implementation is primarly focusing on Intel® Arc™ GPUs and other future Intel GPUs. The first supported drivers are 101.1660 on Windows and 22.10.22597 on Linux. The necessary tools for compilation are: - A SYCL compiler such as oneAPI DPC++ compiler or https://github.com/intel/llvm - Intel® oneAPI Level Zero which is used for low level device queries: https://github.com/oneapi-src/level-zero - To optionally generate prebuilt graphics binaries: Intel® Graphics Compiler All are included in Linux precompiled libraries on svn: https://svn.blender.org/svnroot/bf-blender/trunk/lib The same goes for Windows precompiled binaries but for the graphics compiler, available as "Intel® Graphics Offline Compiler for OpenCL™ Code" from https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html, for which path can be set as OCLOC_INSTALL_DIR. Being based on the open SYCL standard, this implementation could also be extended to run on other compatible non-Intel hardware in the future. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D15254 Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com> Co-authored-by: Stefan Werner <stefan.werner@intel.com>
2022-06-28Cycles: enable Vega GPU/APU supportSayak Biswas
Enables Vega and Vega II GPUs as well as Vega APU, using changes in HIP code to support 64-bit waves and a new HIP SDK version. Tested with Radeon WX9100, Radeon VII GPUs and Ryzen 7 PRO 5850U with Radeon Graphics APU. Ref T96740, T91571 Differential Revision: https://developer.blender.org/D15242
2022-06-28Build: when using Wayland, always enable EGL and disable system GLEWChristian Rauch
GLEW does not support GLX and EGL at the same time, and the distribution version is likely to have GLX. This also refactors the code so all OpenGL related CMake options are together. Differential Revision: https://developer.blender.org/D12034
2022-06-27GHOST/Wayland: Add a build time option for DBUS, disable by defaultCampbell Barton
Add WITH_GHOST_WAYLAND_DBUS option, so Blender can be built without DBUS support. Currently it's only used to access the cursor theme. Without this the "default" cursors are used instead. Disabling this since it adds an additional dependency for a minor gain in functionality, with the benefit of removing a library requirement. There is also a problem where Blender hangs on startup for ~5 seconds when DBUS isn't running. Eventually it would be good to be able to avoid this problem without a build option.
2022-06-24GHOST/Wayland: support client-side window decorationsChristian Rauch
This implements client-side window decorations for moving and resizing windows and HiDPI support. This functionality depends on the external project 'libdecor' that is currently a build option: WITH_GHOST_WAYLAND_LIBDECOR. Reviewed by: brecht, campbellbarton Ref D7989
2022-06-08CMake: optionally disable OBJ, STL & GPencil SVG supportCampbell Barton
The following CMake options have been added (enabled by default), except for the lite build configuration. - WITH_IO_STL - WITH_IO_WAVEFRONT_OBJ - WITH_IO_GPENCIL (for grease pencil SVG importing). Note that it was already possible to disable grease pencil export by disabling WITH_PUGIXML & WITH_HARU. This is intended to keep the lite builds fast and small for building, linking & execution. Reviewed By: iyadahmed2001, aras_p, antoniov, mont29 Ref D15141
2022-05-27Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-27Fix T96397: Cycles missing HIP support for gfx1035 devicesJagannadhan Ravi
Such as AMD Radeon RX 6700S. Differential Revision: https://developer.blender.org/D13495
2022-05-25BLI: use no_unique_address attributeJacques Lucke
Even though the `no_unique_address` attribute has only been standardized in C++20, compilers seem to support it with C++17 already. This attribute allows reducing the memory footprint of structs which have empty types as data members (usually that is an allocator or inline buffer in Blender). Previously, one had to use the empty base optimization to achieve the same effect, which requires a lot of boilerplate code. The types that benefit from this the most are `Vector` and `Array`, which usually become 8 bytes smaller. All types which use these core data structures get smaller as well of course. Differential Revision: https://developer.blender.org/D14993
2022-05-20CMake: disable WITH_MOD_FLUID when WITH_PYTHON=OFFCampbell Barton
2022-05-19Cleanup: suppress 'address' warnings for ./extern/glewCampbell Barton
Also add comments noting why some warnings shouldn't be added to strict-flags.
2022-05-11Update Ceres to latest upstream version 2.1.0Sergey Sharybin
This release deprecated the Parameterization API and the new Manifolds API is to be used instead. This is what was done in the Libmv as part of this change. Additionally, remove the bundling scripts. Nowadays those are only leading to a duplicated work to maintain. No measurable changes on user side is expected.
2022-05-11CMake: Fix noisy PUGIXML warning.Ray Molenkamp
When doing a lite build, a warning is displayed that due to PUGIXML being off WITH_CYCLES_OSL is being disabled as well. If WITH_CYCLES is off this is just useless noise. this diff changes the warning to only emit when WITH_CYCLES is on.
2022-05-09Remove unused compile flag on linux x86 GCC platformsSebastian Parborg
The "cast-align" warning is only triggered on Arm CPUs when using GCC. Currently the only officialy supported ARM platform is the Mac platform where we use Clang. So this warning never triggers.
2022-05-04Build: update outdated description of WITH_TBB optionBrecht Van Lommel
2022-04-28CMake: Reduce dependencies of USDSybren A. Stüvel
`PXR_ENABLE_OSL_SUPPORT=OFF`: OpenShadingLanguage is an optional dependency of the Imaging module. However, since that module was included for its support for converting primitive shapes (sphere, cube, etc.) to geometry, OSL is not necessary. Disabling it will make it simpler to build Blender; currently only Cycles uses OSL. `PXR_ENABLE_GL_SUPPORT=OFF`: GL support on Linux also links to X11 libraries. Enabling it would break headless or Wayland-only builds. OpenGL support would be useful if someone wants to work on a Hydra viewport in Blender; when that's actually being worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to separate OpenGL from X11) and contribute it upstream. `PXR_BUILD_OPENIMAGEIO_PLUGIN=OFF`: It's used for loading image textures in Hydra Storm / Embree renderers which we don't use. Reviewed By: LazyDodo, brecht, makowalski Differential Revision: https://developer.blender.org/D14792
2022-04-22Cycles: enable AMD RDNA GPU support on LinuxBrecht Van Lommel
This enables building of HIP binaries for AMD RDNA and RDNA2 GPUs. This requires the 22.10 / ROCm 5.1 driver. Ref T91571 Differential Revision: https://developer.blender.org/D14360
2022-04-20Build: updates for Blender to build against new 3.2 librariesBrecht Van Lommel
Building against the existing 3.1 libraries should continue to work, until the precompiled libraries are committed for all platforms. * Enable WebP by default. * Update Windows for new library file names. * Automatically clear outdated CMake cache variables when upgrading to new libraries. * Fix static library linking order issues on Linux for OpenEXR and OpenVDB. Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel. Ref T95206
2022-04-12Revert "Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on Windows"Brecht Van Lommel
This is not currently working, reverting until the driver/compiler has a fix. This reverts commit c46e58817cd72d1481967d32e3c6f47f42933d39.
2022-03-25CMake: Give some extra space to info_cfg_optionRay Molenkamp
WITH_PYTHON_INSTALL_ZSTANDARD was too long and didn't align very well compared to the other items in the list.
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-24Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on WindowsBrian Savery
Basic testing on windows only so far. Will need some testing on Linux as well when the Linux enablement patch is ready. Does not enable Vega APUs yet (which would be gfx902 or gfx90c). Differential Revision: https://developer.blender.org/D14432
2022-03-23Cycles: Add Hydra render delegatePatrick Mours
This patch adds a Hydra render delegate to Cycles, allowing Cycles to be used for rendering in applications that provide a Hydra viewport. The implementation was written from scratch against Cycles X, for integration into the Blender repository to make it possible to continue developing it in step with the rest of Cycles. For this purpose it follows the style of the rest of the Cycles code and can be built with a CMake option (`WITH_CYCLES_HYDRA_RENDER_DELEGATE=1`) similar to the existing standalone version of Cycles. Since Hydra render delegates need to be built against the exact USD version and other dependencies as the target application is using, this is intended to be built separate from Blender (`WITH_BLENDER=0` CMake option) and with support for library versions different from what Blender is using. As such the CMake build scripts for Windows had to be modified slightly, so that the Cycles Hydra render delegate can e.g. be built with MSVC 2017 again even though Blender requires MSVC 2019 now, and it's possible to specify custom paths to the USD SDK etc. The codebase supports building against the latest USD release 22.03 and all the way back to USD 20.08 (with some limitations). Reviewed By: brecht, LazyDodo Differential Revision: https://developer.blender.org/D14398
2022-03-22Metal: Initial Implementation of Metal Backend for GPU Module.Jason Fielder
Adding WITH_METAL option to CMAKE to guard compilation for macOS only. Implemented stub METALBackend to mirror GPUBackend interface and added capabilities initialisation, along with API initialisation paths. Global rendering coordination commands added to backend with GPU_render_begin and GPU_render_end() commands globally wrapping GPU work. This is required for Metal to ensure temporary resources are generated within an NSAutoReleasePool and freed accordingly. Authored by Apple: Michael Parkin-White, Vil Harvey, Marco Giordano, Michael Jones, Morteza Mostajabodaveh, Jason Fielder Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14293
2022-03-16CMake: Extra flags to ignore for strict compilerSergey Sharybin
Solves warnings generated by default build on macOS.
2022-03-14Fix mistake in 4c951bfa829ed123b57c33e7821569f283658fd9Campbell Barton
Removed WITH_SYSTEM_GLEW by mistake, thanks to @The_Orb for spotting.