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-02-22Python: bump minimum version to 3.10Campbell Barton
Since Python 3.10 is now supported on all platform, bump the minimum version to reduce the number of Python versions that need to be supported simultaneously. Reviewed By: LazyDodo, sybren, mont29, brecht Ref D13943
2022-01-28Cleanup: indentation for CMake filesCampbell Barton
Also minor white-space & case changes.
2022-01-26CMake: add WITH_SYSTEM_FREETYPE to link against the systems freetypeCampbell Barton
2022-01-19CMake: Support external callback in configurationAnkit Meel
An external CMake script can be used to debug CMake code, modify/read target properties, inter-target dependencies, non-cache variables etc. Reviewed by: LazyDodo, brecht Differential Revision: https://developer.blender.org/D13830
2022-01-19CMake Cleanup: use set for filepath instead of optionAnkit Meel
See https://developer.blender.org/D13830#368219
2022-01-17Revert "Revert "GPUShaderCreateInfo for interface abstraction""Jeroen Bakker
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7. Fixes compilation error (Missing file BLI_float2.hh)
2022-01-17Revert "GPUShaderCreateInfo for interface abstraction"Jeroen Bakker
This reverts commit 8fb2ff458ba579dba08bfdf57d043ad158b5db07. Missing some files.
2022-01-17GPUShaderCreateInfo for interface abstractionJeroen Bakker
This is a first part of the Shader Create Info system could be. A shader create info provides a way to define shader structure, resources and interfaces. This makes for a quick way to provide backend agnostic binding informations while also making shader variations easy to declare. - Clear source input (only one file). Cleans up the GPU api since we can create a shader from one descriptor - Resources and interfaces are generated by the backend (much simpler than parsing). - Bindings are explicit from position in the array. - GPUShaderInterface becomes a trivial translation of enums and string copy. - No external dependency to third party lib. - Cleaner code, less fragmentation of resources in several libs. - Easy to modify / extend at runtime. - no parser involve, very easy to code. - Does not hold any data, can be static and kept on disc. - Could hold precompiled bytecode for static shaders. This also includes a new global dependency system. GLSL shaders can include other sources by using #pragma BLENDER_REQUIRE(...). This patch already migrated several builtin shaders. Other shaders should be migrated one at a time, and could be done inside master. There is a new compile directive `WITH_GPU_SHADER_BUILDER` this is an optional directive for linting shaders to increase turn around time. What is remaining: - pyGPU API {T94975} - Migration of other shaders. This could be a community effort. Reviewed By: jbakker Maniphest Tasks: T94975 Differential Revision: https://developer.blender.org/D13360
2022-01-14CMake: add WITH_LINKER_MOLD option for GCC/Clang Unix platformsCampbell Barton
Can give considerably faster linking, especially on system with many cores. The mold linker recently reached 1.0, see: https://github.com/rui314/mold The current stable release of GCC can't use this linker via -fuse-ld=mold, so this patch uses the "-B" argument to add a binary directory containing an alternate "ld" command that points to "mold" (which is part of the default mold installation). Some timing tests for linking full builds for AMD TR 3970X: - BFD: 20.78 seconds. - LLD: 12.16 seconds. - GOLD: 7.21 seconds. - MOLD: 2.53 seconds. Ref D13807 Reviewed by: sergey, brecht
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Includes unwanted changes This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
2022-01-12BLI: Refactor vector types & functions to use templatesClment Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:float2) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the blender::math namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: float3::reflect()). Upsides: - Still support .x, .y, .z, .w for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call len_squared_v3v3 in math::length_squared() and call it a day. - Type cast does not work with the template version of the math:: vector functions. Meaning you need to manually cast float * and (float *)[3] to float3 for the function calls. i.e: math::distance_squared(float3(nearest.co), positions[i]); - Some parts might loose in readability: float3::dot(v1.normalized(), v2.normalized()) becoming math::dot(math::normalize(v1), math::normalize(v2)) But I propose, when appropriate, to use using namespace blender::math; on function local or file scope to increase readability. dot(normalize(v1), normalize(v2)) Consideration: - Include back .length() method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches delaunay_2d.cc and the intersection code. I would like to know @Howard Trickey (howardt) opinion on the matter. - The noexcept on the copy constructor of mpq(2|3) is being removed. But according to @Jacques Lucke (JacquesLucke) it is not a real problem for now. I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: http://developer.blender.org/D13791
2022-01-12CMake: exclude linker options for APPLE and non-UNIXCampbell Barton
These are only used for non-apple unix systems.
2021-12-13Cycles: enable Metal GPU renderingBrecht Van Lommel
This adds the remaining bits to enable Metal on macOS. There are still performance optimizations and other improvements planned, but it should now be ready for early testing. This is currently only enabled on in Arm builds for M1 GPUs. It is not yet working on AMD or Intel GPUs. Ref T92212 Differential Revision: https://developer.blender.org/D13503
2021-12-07Build: don't look for CUDA toolkit if not using Cycles CUDA deviceBrecht Van Lommel
2021-12-07Build: remove Cycles CUDA/HIP/OPTIX build options on macOSBrecht Van Lommel
So those device types are not listed in the preferences. Metal will be added instead as the only option.
2021-11-26CMake mini-rewrite: Sync code check with BKE_blender_version_is_alphaDalai Felinto
Reproduce the logic we already do in C (BKE_blender_version_is_alpha) and the CMake file. Otherwise it can get out of sync if we add/rename the non-alpha release cycles. No functional change. Differential Revision: https://developer.blender.org/D13379
2021-11-25Merge branch 'blender-v3.0-release'Brecht Van Lommel
2021-11-25Fix build error with experimental features after recent release cycle bumpBrecht Van Lommel
Hair, pointcloud and simulation datablock types should be disabled in the beta cycles already like other experimental features.
2021-11-24CMake: add WITH_UNITY_BUILD option to improve compile timesJacques Lucke
Unity builds are only used in the `bf_nodes_geometry` module for now. This module has been prepared to support unity builds already. Usually, there is a 2-4x speedup when building `bf_nodes_geometry` compared to without unity builds (e.g. 145s to 55s). For more information about how unity builds work and how they help with compile times, see D13341. Differential Revision: https://developer.blender.org/D13341
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-17Cycles: add build option to enable a debugging feature for MISSebastian Herholz
This patch adds a CMake option "WITH_CYCLES_DEBUG" which builds cycles with a feature that allows debugging/selecting the direct-light sampling strategy. The same option may later be used to add other debugging features that could affect performance in release builds. The three options are: * Forward path tracing (e.g., via BSDF or phase function) * Next-event estimation * Multiple importance sampling combination of the previous two methods Such a feature is useful for debugging light different sampling, evaluation, and pdf methods (e.g., for light sources and BSDFs). Differential Revision: https://developer.blender.org/D13152
2021-11-10Cycles: enable HIP device and binaries on WindowsBrecht Van Lommel
We've now done testing to confirm this works with RDNA and RDNA2 AMD GPUs on Windows. The AMD driver needed for this will soon be released publicly.
2021-11-04Cleanup: capitalize ON/OFF with CMakeCampbell Barton
2021-10-28Fix install paths for blender thumbnailer when not building a portable installSebastian Parborg
When doing a non portable build of blender, the executable blender-thumbnailer would be installed in two locations: /usr/bin/ /usr/ While cleaning up, also make the blender thumbnailer dll optional on windows to bring the logic in line with what it is on linux and mac. Reviewed By: Campbell Barton, Ray molenkamp Differential Revision: http://developer.blender.org/D13014
2021-10-26CMake: expand instructions for accidental 'cmake' run in source dirSybren A. Stüvel
Our CMake setup refuses to run from the source directory (i.e. Blender does not support in-source builds). Instead, it shows instructions on how to clean up after an accidental `cmake` invocation. These instructions missed one directory that should also be removed (`CMakeFiles`), so that's been added to the message now. No functional changes to Blender or the build.
2021-10-22Build: improve descriptions and organization of Cycles build optionsBrecht Van Lommel
2021-10-22Cycles: keep HIP device disabled until we have binariesBrecht Van Lommel
And clear communication about supported hardware. Ref T92397
2021-10-21Deps: Python, bundle zstandard packageSybren A. Stüvel
This package allows Python scripts to handle compressed blend files (see rB2ea66af742bc). This is for example needed by Blender Asset Tracer to send files to a Flamenco render farm. This change includes a new `WITH_PYTHON_INSTALL_ZSTANDARD` build-time option, to control whether to actually install the package. For this the already-existing approach for Requests was copied. Reviewed By: LazyDodo, mont29, brecht Differential Revision: https://developer.blender.org/D12777
2021-10-20HIP device code cleanup and fix for high VRAM usageSayak Biswas
This patch cleans up code for HIP device and makes it more consistent with the CUDA code. It also fixes the issue with high VRAM usage on AMD cards using HIP allowing better performance and usage on cards like 6600XT. Added a check in intern/cycles/kernel/bvh/bvh_util.h to prevent compiler error with hipcc Reviewed By: brecht, leesonw Maniphest Tasks: T92124 Differential Revision: https://developer.blender.org/D12834
2021-10-20CMake: add WITH_BLENDER_THUMBNAILER optionCampbell Barton
Make building the thumbnail extraction executable optional, disable on macOS as this was not linking, further, macOS doesn't use this for thumbnail extraction so it could be left disabled.
2021-10-05Cycles: improve detection of HIP compiler for buildbotBrecht Van Lommel
And fix various broken things in the HIP kernel compilation.
2021-09-28Cycles: add HIP device support for AMD GPUsBrian Savery
NOTE: this feature is not ready for user testing, and not yet enabled in daily builds. It is being merged now for easier collaboration on development. HIP is a heterogenous compute interface allowing C++ code to be executed on GPUs similar to CUDA. It is intended to bring back AMD GPU rendering support on Windows and Linux. https://github.com/ROCm-Developer-Tools/HIP. As of the time of writing, it should compile and run on Linux with existing HIP compilers and driver runtimes. Publicly available compilers and drivers for Windows will come later. See task T91571 for more details on the current status and work remaining to be done. Credits: Sayak Biswas (AMD) Arya Rafii (AMD) Brian Savery (AMD) Differential Revision: https://developer.blender.org/D12578
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-08-22Cleanup: fix comment about compiler support.Ankit Meel
Differential Revision: https://developer.blender.org/D12288
2021-08-21Clang: warn about C++20 designated initializersAnkit Meel
With the ongoing transition to C++ files, Windows build breaks often because of designated initializers. Now we have two compilers to catch the MSVC build error on. Reviewed By: #platform_macos, brecht, campbellbarton Differential Revision: https://developer.blender.org/D11940
2021-08-05Xcode: support cmake options for grouping in foldersGermano Cavalcante
The Xcode IDE can also benefit from the options: - WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS - WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS So add suport to these options and also renames them as they are no longer limited to just Windows and Visual Studio. Reviewed By: brecht, ankitm Differential Revision: https://developer.blender.org/D12132
2021-08-05DRW: New Select Debug EngineGermano Cavalcante
This is a simple engine used only to debug the texture of select ids. It is only used when the `WITH_DRAW_DEBUG` option is enabled and the debug value is 31. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5490
2021-08-03macOS: Portable builds with dynamic libraries.Ankit Meel
For Blender.app: dropping libomp.dylib next to Blender executable is enough for it getting picked up since `@executable_path` is an rpath. For non-distributed binaries datatoc, makesdna, tests etc, code for copying libomp.dylib to build folder is removed and replaced by CMake's rpath option for *build* tree. For bpy.so, the post build rpath change has also been replaced by CMake rpath option for *install* tree. Since -id has been changed in D11748, remove the `install_name_tool -change ...` command. Any dylib can just be dropped at `MAC_BLENDER_TARGET_DYLIBS_DIR` hereafter. Appending dylib path to `CMAKE_BUILD_RPATH` will be needed for datatoc etc if linked against one (instead of copying the dylibs around). Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D11997
2021-08-02Revert "GHOST/X11: enable EGL"Brecht Van Lommel
This is causing issues for some users launching Blender, because EGL indirectly requires GLVND, which is not installed by default on e.g. Ubuntu. This reverts commit 0b18a618b88b22663e05eca0f4d976875710e7cc. Fixes T90374 Ref D12034
2021-07-29GHOST/X11: enable EGLChristian Rauch
This will replace GLX with EGL for X11. GLEW does not support GLX and EGL at the same time. Most distributions build GLEW with GLX support, so we have to use the externally provided GLEW and build with EGL support. This effectively sets WITH_SYSTEM_GLEW to OFF for all Linux configurations. Differential Revision: https://developer.blender.org/D12034
2021-07-28Cycles: remove WITH_CYCLES_DEBUG, add WITH_CYCLES_DEBUG_NANBrecht Van Lommel
WITH_CYCLES_DEBUG was used for rendering BVH debugging passes. But since we mainly use Embree an OptiX now, this information is no longer important. WITH_CYCLES_DEBUG_NAN will enable additional checks for NaNs and invalid values in the kernel, for Cycles developers. Previously these asserts where enabled in all debug builds, but this is too likely to crash Blender in scenes that render fine regardless of the NaNs. So this is behind a CMake option now. Fixes T90240
2021-07-26Revert "cmake: enable Wayland by default"Sybren A. Stüvel
This reverts commit a2ccd0e495d54240f785ee425a15ba1bd2537e5a. This change was part of the still-under-review patch D11489, which hasn't been accepted yet.
2021-07-24cmake: enable Wayland by defaultChristian Rauch
2021-07-15CMake: Have CMake Control the C++ version.Ray Molenkamp
We were manually setting the compiler flags for C++17 support for this previously. CMake can do this for us in a uniform way without having to worry about compiler specifics. Setting these flags manually somehow brought out some unwanted behaviour (CMake switching back to C++14) in the nightly CMake builds. Unsure if that's a CMake bug or planned new behaviour for future version, but best to play it safe. These flags are supported since CMake 3.1 so should not break anything. Reviewed by: Campbell Barton Differential Revision: https://developer.blender.org/D11891
2021-07-05macOS: support Japanese input for text buttonsYuki Hashimoto
Blender did not support to input East Asian characters (Chinese, Japanese, Korean) on macOS. This patch adds support for Japanese input, by implementing the appropriate processing for the NSTextInputClient protocol. Technical notes: * The conversion candidate window is drawn by the input method program calling `firstRectForCharacterRange`. * The string before confirmation (called `composite` in blender) is handled in the `setMarkedText` method called by the input method program. * The string after confirmation (called `result` in the blender) is processed in the `insertText` method called by the input method program. Ref T51283 Differential Revision: https://developer.blender.org/D11695
2021-06-22CMake: Improve python version mismatch errorRay Molenkamp
When CMake detects and incompatible Python version it errors out with an error saying at-least python 3.9 is required, but doesn't mention the version it detected. This makes troubleshooting the problem harder than it needs to be. This diff changes the error message to include the python version CMake detected. Differential Revision: https://developer.blender.org/D11666 Reviewed By: Ray Molenkamp
2021-04-23macOS: Fix unknown -Wsuggest-override warningAnkit Meel
Added in rB7cef01b090c4c2d2703274edb91886ae37d3ce82 and rB87bfa2b207b90b5e34ebd835a23c2a82afbed878 Reviewed by: jbakker, #platform_macos Differential Revision: https://developer.blender.org/D11012
2021-03-31Cleanup/CMake: warning to status to reduce noiseAnkit Meel
Correction in e5f0d176d4cfa020bfb4de78086007dcfd02e8f9